---
ChangeLog | 4 ++++
bootstrap | 52 ++++++++++++++++++++++++++++++++++++++--------------
2 files changed, 42 insertions(+), 14 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index bf62855..c725ed7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-03-22 Roland Levillain <roland(a)lrde.epita.fr>
+
+ * bootstrap: Various fixes.
+
2010-03-18 Roland Levillain <roland(a)lrde.epita.fr>
* bootstrap: Regen the list of split outputs of the documentation.
diff --git a/bootstrap b/bootstrap
index d607402..4484b9d 100755
--- a/bootstrap
+++ b/bootstrap
@@ -145,8 +145,9 @@ trap cleanup 0 1 2 3 6 15
Test
\end{document}
EOF
- htlatex >/dev/null 2>&1 test.tex || fatal "TeX4ht is required"
-)
+ htlatex >/dev/null 2>&1 test.tex
+) || fatal "TeX4ht is required"
+
# dvipng is required by TeX4ht.
require dvipng 1.11
@@ -156,42 +157,65 @@ run milena `pwd`/build-aux/generate_dist_headers.sh mln ./headers.mk
./nodist-he
# Generate scribo/headers.mk
run scribo `pwd`/build-aux/generate_dist_headers.sh . headers.mk nodist-headers scribo
scribo
-# Generate lists of files to be part of the distribution
-# for the tutorial.
+# Generate files of Milena's documentation.
# * Figures.
gen_doc_figures()
{
+ rm -f "milena/doc/$2-figures.mk.tmp"
milena/doc/gen-make-variable "$1" \
`find milena/doc/figures/*.$2 | sed 's,^milena/doc,\$(srcdir),'` \
- >"milena/doc/$2-figures.mk" \
- || fatal "unexpected failure: $@"
+ >"milena/doc/$2-figures.mk.tmp"
+ mv -f "milena/doc/$2-figures.mk.tmp" "milena/doc/$2-figures.mk"
+ chmod -w "milena/doc/$2-figures.mk"
}
gen_doc_figures PBM_FIGURES pbm
gen_doc_figures PGM_FIGURES pgm
gen_doc_figures PPM_FIGURES ppm
-run milena/doc/ ./generate_dist_files.sh outputs txt
# * Examples.
+rm -f milena/doc/examples.mk.tmp
milena/doc/gen-make-variable EXAMPLES \
`find milena/doc/examples -name '*.cc' | sed
's,^milena/doc,\$(srcdir),'` \
- >milena/doc/examples.mk
+ >milena/doc/examples.mk.tmp
+mv -f milena/doc/examples.mk.tmp milena/doc/examples.mk
+chmod -w milena/doc/examples.mk
# * Split examples.
-cd milena/doc && ./gen-split-examples-mk >split-examples.mk
+(
+ cd milena/doc
+ rm -f split-examples.mk.tmp
+ ./gen-split-examples-mk >split-examples.mk.tmp
+ mv -f split-examples.mk.tmp split-examples.mk
+ chmod -w split-examples.mk
+)
# * Outputs.
+rm -f milena/doc/outputs.mk.tmp
milena/doc/gen-make-variable OUTPUTS \
`find milena/doc/examples \
-name \*.cc -a \! -path milena/doc/examples/trash/\* \
| sed -e 's,milena/doc/examples/,,' \
-e 'y,/,_,' \
- -e 's,\(.*\)\.cc$,milena/doc/outputs/\1.txt,'` \
- >milena/doc/outputs.mk
+ -e 's,\(.*\)\.cc$,$(srcdir)/outputs/\1.txt,'` \
+ >milena/doc/outputs.mk.tmp
+mv -f milena/doc/outputs.mk.tmp milena/doc/outputs.mk
+chmod -w milena/doc/outputs.mk
# * Outputs rules and timestamps.
-cd milena/doc && \
+(
+ cd milena/doc
+ rm -f examples-outputs.mk.tmp
./gen-examples-outputs-mk \
`find examples -name \*.cc -a \! -path examples/trash/\* \
| env LC_ALL=C sort` \
- >examples-outputs.mk
+ >examples-outputs.mk.tmp
+ mv -f examples-outputs.mk.tmp examples-outputs.mk
+ chmod -w examples-outputs.mk
+)
# * Split outputs.
-cd milena/doc && ./gen-split-outputs-mk >split-outputs.mk
+(
+ cd milena/doc
+ rm -f split-outputs.mk.tmp
+ ./gen-split-outputs-mk >split-outputs.mk.tmp
+ mv -f split-outputs.mk.tmp split-outputs.mk
+ chmod -w split-outputs.mk
+)
# Generate unit test files.
run . ./build-aux/build_unit_test.sh `pwd`/milena/mln milena/tests/unit_test
milena/tests/unit_test/disabled_tests
--
1.5.6.5