diff options
| author | Mike Buland <eichlan@xagasoft.com> | 2009-12-21 18:04:02 +0000 |
|---|---|---|
| committer | Mike Buland <eichlan@xagasoft.com> | 2009-12-21 18:04:02 +0000 |
| commit | fb28f6800864176be2ffca29e8e664b641f33170 (patch) | |
| tree | ba9180ac442939edc4eacbe1fdae93c5a7f87cee /default.bld | |
| parent | 51e21a316be6e052251b3dfc7d671061ebd67cee (diff) | |
| download | build-fb28f6800864176be2ffca29e8e664b641f33170.tar.gz build-fb28f6800864176be2ffca29e8e664b641f33170.tar.bz2 build-fb28f6800864176be2ffca29e8e664b641f33170.tar.xz build-fb28f6800864176be2ffca29e8e664b641f33170.zip | |
m3 is copied into trunk, we should be good to go, now.
Diffstat (limited to '')
| -rw-r--r-- | default.bld | 129 |
1 files changed, 129 insertions, 0 deletions
diff --git a/default.bld b/default.bld new file mode 100644 index 0000000..9b71c4b --- /dev/null +++ b/default.bld | |||
| @@ -0,0 +1,129 @@ | |||
| 1 | # | ||
| 2 | # default.bld for build mark 3. This guy does it all, so watch out! | ||
| 3 | # :) | ||
| 4 | # | ||
| 5 | |||
| 6 | CXXFLAGS += "-ggdb -W -Wall"; | ||
| 7 | |||
| 8 | action "default" | ||
| 9 | { | ||
| 10 | build: "build-m3"; | ||
| 11 | } | ||
| 12 | |||
| 13 | action "man" | ||
| 14 | { | ||
| 15 | build: targets("all"); | ||
| 16 | } | ||
| 17 | |||
| 18 | action "pkg" | ||
| 19 | { | ||
| 20 | build: targets("pkg"); | ||
| 21 | } | ||
| 22 | |||
| 23 | action "clean" | ||
| 24 | { | ||
| 25 | clean: "build-m3"; | ||
| 26 | } | ||
| 27 | |||
| 28 | action "devinstall" | ||
| 29 | { | ||
| 30 | if "$(id -u)" != "0\n" then | ||
| 31 | { | ||
| 32 | error "You can only install as the root user, su then run this."; | ||
| 33 | } | ||
| 34 | install: targets("devinstall"); | ||
| 35 | } | ||
| 36 | |||
| 37 | action "viminstall" | ||
| 38 | { | ||
| 39 | if "$(id -u)" != "0\n" then | ||
| 40 | { | ||
| 41 | error "You can only install as the root user, su then run this."; | ||
| 42 | } | ||
| 43 | install: targets("viminstall"); | ||
| 44 | } | ||
| 45 | |||
| 46 | target "build-m3" | ||
| 47 | { | ||
| 48 | input [files("src/*.y"), files("src/*.l"), files("src/*.cpp")]; | ||
| 49 | rule "exe"; | ||
| 50 | LDFLAGS += "-Llibbu++ -lbu++ -ldl"; | ||
| 51 | CXXFLAGS += "-Ilibbu++"; | ||
| 52 | tag "tools"; | ||
| 53 | } | ||
| 54 | |||
| 55 | target "build-r$(svnversion "-n").tar.bz2" | ||
| 56 | { | ||
| 57 | input [ | ||
| 58 | "build.conf", | ||
| 59 | "Doxyfile", | ||
| 60 | "default.bld", | ||
| 61 | "docs/build.1", | ||
| 62 | "docs/build.7", | ||
| 63 | "support/vim/syntax/build.vim", | ||
| 64 | "support/vim/ftdetect/build.vim", | ||
| 65 | "support/vim/ftplugin/build.vim", | ||
| 66 | files("src/*.y"), | ||
| 67 | files("src/*.l"), | ||
| 68 | files("src/*.cpp"), | ||
| 69 | files("src/*.h"), | ||
| 70 | files("share/autoinclude/*"), | ||
| 71 | files("share/include/*") | ||
| 72 | ]; | ||
| 73 | rule "tarball"; | ||
| 74 | tag "pkg"; | ||
| 75 | } | ||
| 76 | |||
| 77 | // We want to override the c rule, and just use c++ for it | ||
| 78 | rule "c" | ||
| 79 | { | ||
| 80 | input "*.c"; | ||
| 81 | output replace(".c", ".o"); | ||
| 82 | tag "auto-source"; | ||
| 83 | requires getMakeDeps("g++ ${CXXFLAGS} -M ${INPUT}"); | ||
| 84 | profile "build" | ||
| 85 | { | ||
| 86 | execute("g++ ${CXXFLAGS} -c -o ${OUTPUT} ${INPUT}"); | ||
| 87 | } | ||
| 88 | } | ||
| 89 | |||
| 90 | rule "tarball" | ||
| 91 | { | ||
| 92 | input matches("*.cpp", "*.h", "*.c", "*.y", "*.l", "*.conf", "Doxyfile", | ||
| 93 | "*.1", "*.7", "*.vim"); | ||
| 94 | profile "build" | ||
| 95 | { | ||
| 96 | OUTDIR = OUTPUT.replace(".tar.bz2",""); | ||
| 97 | execute("tar --transform=\"s@^@${OUTDIR}/@\" -c ${INPUT} |" | ||
| 98 | " bzip2 -9 > ${OUTPUT}"); | ||
| 99 | } | ||
| 100 | } | ||
| 101 | |||
| 102 | target "/usr/share/build" | ||
| 103 | { | ||
| 104 | input "$(echo -n $PWD)/share"; | ||
| 105 | tag "devinstall"; | ||
| 106 | profile "install" | ||
| 107 | { | ||
| 108 | execute("ln -fsv ${INPUT} \"${OUTPUT}\""); | ||
| 109 | } | ||
| 110 | } | ||
| 111 | |||
| 112 | for vimdir in dirs("/usr/share/vim/vim*") do | ||
| 113 | { | ||
| 114 | for ftype in ["ftplugin/build.vim", "ftdetect/build.vim", | ||
| 115 | "syntax/build.vim"] do | ||
| 116 | { | ||
| 117 | target vimdir + "/" + ftype | ||
| 118 | { | ||
| 119 | input "support/vim/" + ftype; | ||
| 120 | tag "viminstall"; | ||
| 121 | display "install"; | ||
| 122 | profile "install" | ||
| 123 | { | ||
| 124 | execute("cp -f ${INPUT} ${OUTPUT}"); | ||
| 125 | } | ||
| 126 | } | ||
| 127 | } | ||
| 128 | } | ||
| 129 | |||
