aboutsummaryrefslogtreecommitdiff
path: root/docs/buildm3notes.txt
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 /docs/buildm3notes.txt
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 'docs/buildm3notes.txt')
-rw-r--r--docs/buildm3notes.txt99
1 files changed, 99 insertions, 0 deletions
diff --git a/docs/buildm3notes.txt b/docs/buildm3notes.txt
new file mode 100644
index 0000000..72e68e4
--- /dev/null
+++ b/docs/buildm3notes.txt
@@ -0,0 +1,99 @@
1Rules
2Targets
3 Profiles
4 Build
5 Clean
6 Install
7 Package
8 etc.
9 Dependancies
10 Force Ruleset / mode
11 Input
12 Produces / Output
13Actions (functions)
14 Execute
15 Delete
16 Download
17 GetDependencies
18 ExecuteTest
19 RunTarget
20
21Mode Variables - switch modes for a variety of things (debug/release, platforms)
22
23Includes (including default includes)
24
25Bash style variable replacements / execute / etc.
26
27Functions?
28 files() returns list (globbing)
29 querySystemParam()
30
31if blocks can be anywhere.
32
33semi-typed variables, default to string
34
35variables in a target: INPUT, OUTPUT (by default instead of target and match)
36
37---- ast processing order ----
381) import all environment variables
392) import all cached data
403) set all variables specified on the command line
414) root level "script"
424.1) execute root level items, for target, rule, and non-auto, non-global config
43 this means building the target, rule, and config tables.
44 for global config and auto-config, run them as we hit them.
455) execute specified target(s) with specified profile
46
47---- pseudo code -----
48
49set CXXFLAGS += "param"; // ensure there are spaces so it works for a command
50set CXXFLAGS << "param"; // append like you'd expect, no extra changes
51
52unset PREFIX; // may be handy to be able to unset things
53
54include "otherbuild.h"; // oh yeah includes
55
56notice "something good?"; // display a notice to the user, just info...
57warning "yeah yeah yeah..."; // display a warning message, but don't exit
58error "something or other"; // exit immediately with an error message
59
60target "libbu++.a"
61{
62 input files("src/*.cpp");
63 set CXXFLAGS="-ggdb";
64 condition file;
65 requires [];
66
67 hidden; // Hides this from the user, but still callable
68}
69
70target ["file a", files("src/*.cpp), files("src/*y")].replace("bob", "sam")...
71{
72 condition always;
73}
74
75auto config "X"
76{
77}
78
79config "EXTRA_DEBUG"
80{
81 display "Debugging/Extra debugging";
82 type int; (or string, or bool, or list, or version)
83 default 0;
84 allow ["0-5","6"];
85
86}
87
88rule "cpp"
89{
90 input glob("*.cpp"); // or just a string, pretend it's a glob
91 output "${INPUT}".replace(".cpp",".o");
92 requires getDeps("g++ ${CXXFLAGS} -M ${OUTPUT} ${INPUT}", "make");
93 profile "build"
94 {
95 fnc1() tag "c++";
96 fnc2();
97 }
98}
99