aboutsummaryrefslogtreecommitdiff
path: root/default.bld
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2009-12-21 18:04:02 +0000
committerMike Buland <eichlan@xagasoft.com>2009-12-21 18:04:02 +0000
commitfb28f6800864176be2ffca29e8e664b641f33170 (patch)
treeba9180ac442939edc4eacbe1fdae93c5a7f87cee /default.bld
parent51e21a316be6e052251b3dfc7d671061ebd67cee (diff)
downloadbuild-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 'default.bld')
-rw-r--r--default.bld129
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
6CXXFLAGS += "-ggdb -W -Wall";
7
8action "default"
9{
10 build: "build-m3";
11}
12
13action "man"
14{
15 build: targets("all");
16}
17
18action "pkg"
19{
20 build: targets("pkg");
21}
22
23action "clean"
24{
25 clean: "build-m3";
26}
27
28action "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
37action "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
46target "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
55target "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
78rule "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
90rule "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
102target "/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
112for 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