diff options
Diffstat (limited to '')
-rw-r--r-- | default.bld | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/default.bld b/default.bld index d88f3cd..467274b 100644 --- a/default.bld +++ b/default.bld | |||
@@ -9,6 +9,11 @@ CXXFLAGS += "-ggdb -W -Wall"; | |||
9 | 9 | ||
10 | 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. |
11 | 11 | ||
12 | if PREFIX == null then | ||
13 | { | ||
14 | PREFIX = "/usr/local"; | ||
15 | } | ||
16 | |||
12 | action "default" | 17 | action "default" |
13 | { | 18 | { |
14 | build: ["build", targets("plugins")]; | 19 | build: ["build", targets("plugins")]; |
@@ -24,6 +29,11 @@ action "clean" | |||
24 | clean: "build"; | 29 | clean: "build"; |
25 | } | 30 | } |
26 | 31 | ||
32 | action "docs" | ||
33 | { | ||
34 | build: targets("docs"); | ||
35 | } | ||
36 | |||
27 | action "devinstall" | 37 | action "devinstall" |
28 | { | 38 | { |
29 | if "$(id -u)" != "0" then | 39 | if "$(id -u)" != "0" then |
@@ -106,3 +116,53 @@ for vimdir in dirs("/usr/share/vim/vim*") do | |||
106 | } | 116 | } |
107 | } | 117 | } |
108 | 118 | ||
119 | target "docs/build-manual.pdf" | ||
120 | { | ||
121 | display "pdflatex"; | ||
122 | tag "docs"; | ||
123 | profile "build" | ||
124 | { | ||
125 | condition always; | ||
126 | execute("mkdir -p docs/pdf"); | ||
127 | // You have to do this multiple times to get the TOC right. | ||
128 | for j in range(1,3) do | ||
129 | { | ||
130 | notice "Pass ${j}..."; | ||
131 | execute("cd docs/pdf; pdflatex ../build-manual.tex > /dev/null"); | ||
132 | } | ||
133 | execute("mv docs/pdf/build-manual.pdf docs"); | ||
134 | execute("rm -Rf docs/pdf"); | ||
135 | } | ||
136 | } | ||
137 | |||
138 | target "docs/html-single/build-manual.html" | ||
139 | { | ||
140 | display "htlatex"; | ||
141 | tag "docs"; | ||
142 | profile "build" | ||
143 | { | ||
144 | condition always; | ||
145 | execute("mkdir -p docs/html-single"); | ||
146 | execute("cd docs/html-single; htlatex ../build-manual.tex > /dev/null"); | ||
147 | } | ||
148 | profile "clean" | ||
149 | { | ||
150 | execute("rm -Rf docs/html-single"); | ||
151 | } | ||
152 | } | ||
153 | |||
154 | target "docs/html-multi" | ||
155 | { | ||
156 | display "htlatex"; | ||
157 | tag "docs"; | ||
158 | profile "build" | ||
159 | { | ||
160 | condition always; | ||
161 | execute("mkdir -p docs/html-multi"); | ||
162 | execute("cd docs/html-multi; htlatex ../build-manual.tex \"html,3\" > /dev/null"); | ||
163 | } | ||
164 | profile "clean" | ||
165 | { | ||
166 | execute("rm -Rf docs/html-multi"); | ||
167 | } | ||
168 | } | ||