~ubuntu-branches/ubuntu/raring/oxref/raring

« back to all changes in this revision

Viewing changes to build

  • Committer: Package Import Robot
  • Author(s): Frank B. Brokken, Frank B. Brokken, tony mancill
  • Date: 2013-01-25 10:57:14 UTC
  • mfrom: (6.1.2 sid)
  • Revision ID: package-import@ubuntu.com-20130125105714-m799hyuxueycrtte
Tags: 0.91.00-1
[ Frank B. Brokken ]
* --help, --version options return 0, catching Errno exceptions removed from
  main() 

[ tony mancill ]
* Bump Standards-Version to 3.9.4 (no changes).
* Change build-dep for CXX to g++-4.7.
* Update Vcs fields to point to new package repo on git.debian.org.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/icmake -qt/tmp/oxref
2
 
 
3
 
#include "INSTALL.im"
4
 
 
 
1
#!/usr/bin/icmake -qt/tmp/bisonc++
 
2
 
 
3
#include "icmconf"
 
4
 
 
5
#include "icmake/setopt"
5
6
#include "icmake/run"
6
7
#include "icmake/md"
7
 
#include "icmake/getenv"
8
8
#include "icmake/special"
 
9
 
9
10
#include "icmake/clean"
10
11
#include "icmake/manpage"
11
 
#include "icmake/library"
12
 
#include "icmake/program"
13
12
#include "icmake/install"
14
 
#include "icmake/xref"
15
 
 
16
 
void main(int argc, list argv, list envp)
 
13
 
 
14
string  g_cwd = chdir("");  // initial working directory
 
15
 
 
16
void main(int argc, list argv)
17
17
{
18
18
    string option;
19
19
    string strip;
20
20
 
21
 
    g_env = envp;
22
 
 
23
 
    setLocations();     // from INSTALL.im
24
 
 
25
 
    my_getenv("DRYRUN");
26
 
    g_dryrun = g_envvar;
27
 
 
28
 
    option = element(1, argv);
29
 
    if (element(2, argv) == "strip")
30
 
        strip = "-s";
 
21
    option = argv[1];
31
22
 
32
23
    if (option == "clean")
33
24
        clean(0);
36
27
        clean(1);
37
28
 
38
29
    if (option == "install")
39
 
        install(element(2, argv), 1);
40
 
 
41
 
    if (option == "installprog")
42
 
        install(element(2, argv), 0);
 
30
        install(argv[2], argv[3]);
 
31
 
 
32
    if (option != "")
 
33
        special();
 
34
 
 
35
    if (option == "sourceforge")
 
36
        exit(0);
43
37
 
44
38
    if (option == "man")
45
39
        manpage();
46
40
 
47
 
    if (option == "sourceforge")
48
 
    {
49
 
        special();
50
 
        exit(0);
51
 
    }
52
 
 
53
41
    if (option == "library")
54
 
        library(1);
 
42
    {
 
43
        system("icmbuild library");
 
44
        exit(0);
 
45
    }
55
46
 
 
47
    if (argv[2] == "strip")
 
48
        strip = "strip";
 
49
    
56
50
    if (option == "program")
57
51
    {
58
 
        program(strip);
59
 
        exit(0);
60
 
    }
61
 
 
62
 
    if (option == "xref")
63
 
    {
64
 
        xref(strip);
65
 
        exit(0);
66
 
    }
67
 
        
 
52
        system("icmbuild program " + strip);
 
53
        exit(0);
 
54
    }
 
55
 
 
56
    if (option == "oxref")
 
57
    {
 
58
        system("icmbuild program " + strip);
 
59
        run("oxref -fxs tmp/lib" LIBRARY ".a > " PROGRAM ".xref");
 
60
        exit(0);
 
61
    }
 
62
 
 
63
    if (option == "scanner")
 
64
    {
 
65
        chdir("scanner");
 
66
        system("flexc++ lexer");
 
67
        chdir("..");
 
68
        system("icmbuild program " + strip);
 
69
        exit(0);
 
70
    }
68
71
 
69
72
    printf("Usage: build [-p] what\n"
70
73
        "Where `what' is one of:\n"
71
 
        "   clean              - clean up remnants of previous compilations\n"
72
 
        "   distclean          - clean + fully remove tmp/\n"
73
 
        "   library            - build oxref's library\n"
74
 
        "   man                - build the man-page (requires Yodl)\n"
75
 
        "   program [strip]    - build oxref (optionally strip the\n"
76
 
        "                        executable)\n"
77
 
        "   install <base>     - install the software in the locations "
78
 
                                                            "defined\n"
79
 
        "                        in the INSTALL.im file, optionally "
80
 
                                                            "below <base>\n"
81
 
        "   installprog <base> - only install the program\n"
82
 
        "   sourceforge        - create a new release.yo for sourceforge\n"
83
 
        "   xref [strip]       - create oxref's cross-reference file\n"
84
 
        "                        (when needed create an optionally stripped\n"
85
 
        "                         executable first)\n"
 
74
        "   clean                - clean up remnants of previous "
 
75
                                                            "compilations\n"
 
76
        "   distclean            - clean + fully remove tmp/\n"
 
77
        "   library              - build " PROGRAM "'s library\n"
 
78
        "   man                  - build the man-page (requires Yodl)\n"
 
79
        "   manual               - build the manual (requires Yodl)\n"
 
80
        "   program [strip]      - build " PROGRAM " (optionally strip the\n"
 
81
        "                          executable)\n"
 
82
        "   oxref [strip]        - same a `program', also builds xref file\n"
 
83
        "                          using oxref\n"
 
84
        "   install program [path] - install the program at `path'\n"
 
85
        "                          (by default below `" PROGRAM "')\n"
 
86
        "   install man [base]   - install the man pages below `base'\n"
 
87
        "                          (by default below `" MAN "')\n"
 
88
        "   install std [base]   - install standard docs below `base'\n"
 
89
        "                          (by default below `" STD "')\n"
 
90
        "   sourceforge          - prepare sourceforge's index update\n"
86
91
        "\n"
87
92
        "If the environment variable DRYRUN is defined, no commands are\n"
88
93
        "actually executed\n"