diff options
author | Mike Buland <eichlan@xagasoft.com> | 2010-01-06 17:05:45 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2010-01-06 17:05:45 +0000 |
commit | 3c7e81d3baba06cb1bf37de84aeaa6cad277652a (patch) | |
tree | 166e9309a0be01e6b4e8591434372e4817a65d76 /default.bld | |
parent | e809677b1d5a02b93a0be7a9fce8a6b67d0d91be (diff) | |
download | build-3c7e81d3baba06cb1bf37de84aeaa6cad277652a.tar.gz build-3c7e81d3baba06cb1bf37de84aeaa6cad277652a.tar.bz2 build-3c7e81d3baba06cb1bf37de84aeaa6cad277652a.tar.xz build-3c7e81d3baba06cb1bf37de84aeaa6cad277652a.zip |
Wow, ok, well, I added some more error handling, that's positive, also switched
conditions and functions to a plugger system like views, and all of them now
load builtin and external plugins flawlessly. It's actually a lot of fun.
I also added the example/test plugin condition "random" it randomly builds
targets...it's not really useful...
Diffstat (limited to '')
-rw-r--r-- | default.bld | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/default.bld b/default.bld index 8fc8fb4..784fdda 100644 --- a/default.bld +++ b/default.bld | |||
@@ -3,13 +3,16 @@ | |||
3 | # :) | 3 | # :) |
4 | # | 4 | # |
5 | 5 | ||
6 | CXXFLAGS += "-fPIC -rdynamic"; | ||
7 | LDFLAGS += "-fPIC -rdynamic -Wl,-export-dynamic"; | ||
6 | CXXFLAGS += "-ggdb -W -Wall"; | 8 | CXXFLAGS += "-ggdb -W -Wall"; |
7 | 9 | ||
8 | CC = CXX; // We actually want to use c++ to compile our c files. | 10 | CC = CXX; // We actually want to use c++ to compile our c files. |
9 | 11 | ||
10 | action "default" | 12 | action "default" |
11 | { | 13 | { |
12 | build: "build"; | 14 | // build: "build"; |
15 | build: ["build", targets("plugins")]; | ||
13 | } | 16 | } |
14 | 17 | ||
15 | action "man" | 18 | action "man" |
@@ -55,6 +58,18 @@ target "build" | |||
55 | tag "tools"; | 58 | tag "tools"; |
56 | } | 59 | } |
57 | 60 | ||
61 | for IN in files("src/plugins/*.cpp") do | ||
62 | { | ||
63 | target IN.replace("src/","").replace(".cpp", ".so") | ||
64 | { | ||
65 | input IN; | ||
66 | rule "so"; | ||
67 | LDFLAGS += "-Llibbu++ -lbu++ -ldl"; | ||
68 | CXXFLAGS += "-Ilibbu++ -Isrc"; | ||
69 | tag "plugins"; | ||
70 | } | ||
71 | } | ||
72 | |||
58 | target "build-r$(svnversion "-n").tar.bz2" | 73 | target "build-r$(svnversion "-n").tar.bz2" |
59 | { | 74 | { |
60 | input [ | 75 | input [ |
@@ -93,9 +108,21 @@ target "/usr/share/build" | |||
93 | { | 108 | { |
94 | input "$(echo -n $PWD)/share"; | 109 | input "$(echo -n $PWD)/share"; |
95 | tag "devinstall"; | 110 | tag "devinstall"; |
111 | display "symlink"; | ||
112 | profile "install" | ||
113 | { | ||
114 | execute("ln -fsv \"${INPUT}\" \"${OUTPUT}\""); | ||
115 | } | ||
116 | } | ||
117 | |||
118 | target "/usr/lib/build" | ||
119 | { | ||
120 | input "$(echo -n $PWD)/plugins"; | ||
121 | tag "devinstall"; | ||
122 | display "symlink"; | ||
96 | profile "install" | 123 | profile "install" |
97 | { | 124 | { |
98 | execute("ln -fsv ${INPUT} \"${OUTPUT}\""); | 125 | execute("ln -fsv \"${INPUT}\" \"${OUTPUT\""); |
99 | } | 126 | } |
100 | } | 127 | } |
101 | 128 | ||