diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/build.1 | 5 | ||||
-rw-r--r-- | docs/build.7 | 84 | ||||
-rw-r--r-- | docs/buildm3notes.txt | 99 |
3 files changed, 188 insertions, 0 deletions
diff --git a/docs/build.1 b/docs/build.1 new file mode 100644 index 0000000..118c744 --- /dev/null +++ b/docs/build.1 | |||
@@ -0,0 +1,5 @@ | |||
1 | .TH build 1 "October 30, 2009" "Xagasoft" "Geekgene" | ||
2 | Build is awesome, try it out | ||
3 | .P | ||
4 | This is a new paragraph | ||
5 | .SH SYNOPSIS | ||
diff --git a/docs/build.7 b/docs/build.7 new file mode 100644 index 0000000..5d6ab34 --- /dev/null +++ b/docs/build.7 | |||
@@ -0,0 +1,84 @@ | |||
1 | .TH build 1 "October 30, 2009" "Xagasoft" "Geekgene" | ||
2 | .SH NAME | ||
3 | .P | ||
4 | build.conf configuration files. | ||
5 | .SH SYNOPSIS | ||
6 | .P | ||
7 | These files describe how to build something, generally software from source | ||
8 | code, but it can really be anything. | ||
9 | .SH DESCRIPTION | ||
10 | .P | ||
11 | For now, I'm just going to list some things here, here are the functions | ||
12 | available to you for general use at the moment: | ||
13 | .TP | ||
14 | .B | ||
15 | dirs() | ||
16 | Takes any number of string parameters, matches the file system based on glob | ||
17 | patterns and returns all directories that match the given patterns. | ||
18 | .TP | ||
19 | .B | ||
20 | files() | ||
21 | Takes any number of string parameters, matches the file system based on glob | ||
22 | patterns and returns all files that match the given patterns. | ||
23 | .TP | ||
24 | .B | ||
25 | execute() | ||
26 | Takes one string parameter, and executes it as a command using your shell. | ||
27 | .TP | ||
28 | .B | ||
29 | exists() | ||
30 | Checks to see if the given file/directory/etc exists on the file system, if it | ||
31 | does, true is returned, otherwise, false. | ||
32 | .TP | ||
33 | .B | ||
34 | matches() | ||
35 | Checks the input of the function to see if it matches a given wildcard pattern, | ||
36 | the pattern may include any number of * (meaning match any number of any | ||
37 | character) or ? (meaning match one of any character) symbols. If the input is | ||
38 | a string, then true or false is returned. If the input is a list, a filtered | ||
39 | version of the list is returned, containing only the elements that matched the | ||
40 | pattern. | ||
41 | .TP | ||
42 | .B | ||
43 | replace() | ||
44 | Takes two string parameters and replaces all occurances of the first with the | ||
45 | second in the input string or list of strings. | ||
46 | .TP | ||
47 | .B | ||
48 | targets() | ||
49 | Returns a list of target outputs, this will return every output for any target | ||
50 | that it finds seperately, so targets with multiple outputs will be in the list | ||
51 | more than once. With no parametrs it returns a list of all explicitly defined | ||
52 | targets, with a string parameter it returns all targets that have the given | ||
53 | tag. | ||
54 | .TP | ||
55 | .B | ||
56 | toString() | ||
57 | Takes the input and converts it to a string, with no parameters it uses default | ||
58 | formatting, this means that for lists it puts a space between each element. | ||
59 | .TP | ||
60 | .B | ||
61 | unlink() | ||
62 | Unlinks (deletes) the given file or files from the filesystem. It can take any | ||
63 | number of string or string list parameters. | ||
64 | .TP | ||
65 | .B | ||
66 | getMakeDeps() | ||
67 | Returns a list of files ready for use in a requires statement from the stdout of the command provided in the only string parameter. The command should output the dependancies in makefile format. | ||
68 | .TP | ||
69 | .B | ||
70 | fileName() | ||
71 | Returns the file portion of the string provided as input. That is, it returns everything after the last '/' character. This may not always be a file, it could be a directory, or even just an arbitrary part of a string that may or may not have '/' in it. If the input ends with a slash this will return an empty string. | ||
72 | .TP | ||
73 | .B | ||
74 | dirName() | ||
75 | Returns the directory portion of the string provided as input. That is, it returns everything before the last '/' character. Read the caveat for fileName about what this really means. If the input ends with a slash this will return the entire string, except the trailing slash. | ||
76 | .P | ||
77 | Here, lets list functions we wish we had... | ||
78 | .SH ENVIRONMENT | ||
79 | .SH FILES | ||
80 | .SH CONFORMING TO | ||
81 | .SH NOTES | ||
82 | .SH BUGS | ||
83 | .SH EXAMPLE | ||
84 | .SH SEE ALSO | ||
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 @@ | |||
1 | Rules | ||
2 | Targets | ||
3 | Profiles | ||
4 | Build | ||
5 | Clean | ||
6 | Install | ||
7 | Package | ||
8 | etc. | ||
9 | Dependancies | ||
10 | Force Ruleset / mode | ||
11 | Input | ||
12 | Produces / Output | ||
13 | Actions (functions) | ||
14 | Execute | ||
15 | Delete | ||
16 | Download | ||
17 | GetDependencies | ||
18 | ExecuteTest | ||
19 | RunTarget | ||
20 | |||
21 | Mode Variables - switch modes for a variety of things (debug/release, platforms) | ||
22 | |||
23 | Includes (including default includes) | ||
24 | |||
25 | Bash style variable replacements / execute / etc. | ||
26 | |||
27 | Functions? | ||
28 | files() returns list (globbing) | ||
29 | querySystemParam() | ||
30 | |||
31 | if blocks can be anywhere. | ||
32 | |||
33 | semi-typed variables, default to string | ||
34 | |||
35 | variables in a target: INPUT, OUTPUT (by default instead of target and match) | ||
36 | |||
37 | ---- ast processing order ---- | ||
38 | 1) import all environment variables | ||
39 | 2) import all cached data | ||
40 | 3) set all variables specified on the command line | ||
41 | 4) root level "script" | ||
42 | 4.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. | ||
45 | 5) execute specified target(s) with specified profile | ||
46 | |||
47 | ---- pseudo code ----- | ||
48 | |||
49 | set CXXFLAGS += "param"; // ensure there are spaces so it works for a command | ||
50 | set CXXFLAGS << "param"; // append like you'd expect, no extra changes | ||
51 | |||
52 | unset PREFIX; // may be handy to be able to unset things | ||
53 | |||
54 | include "otherbuild.h"; // oh yeah includes | ||
55 | |||
56 | notice "something good?"; // display a notice to the user, just info... | ||
57 | warning "yeah yeah yeah..."; // display a warning message, but don't exit | ||
58 | error "something or other"; // exit immediately with an error message | ||
59 | |||
60 | target "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 | |||
70 | target ["file a", files("src/*.cpp), files("src/*y")].replace("bob", "sam")... | ||
71 | { | ||
72 | condition always; | ||
73 | } | ||
74 | |||
75 | auto config "X" | ||
76 | { | ||
77 | } | ||
78 | |||
79 | config "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 | |||
88 | rule "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 | |||