* doc/Makefile.am (EXTRA_DIST, MAINTAINERCLEANFILES):
Add $(srcdir)/user-refman.stamp, $(srcdir)/devel-refman.stamp,
$(srcdir)/figures.stamp, $(srcdir)/split-examples.stamp and
$(srcdir)/split-outputs.stamp.
---
milena/ChangeLog | 9 +++++++++
milena/doc/Makefile.am | 11 ++++++++++-
2 files changed, 19 insertions(+), 1 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index a85c5f0..bde2cc3 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,14 @@
2010-03-15 Roland Levillain <roland(a)lrde.epita.fr>
+ Distribute and clean documentation timestamps.
+
+ * doc/Makefile.am (EXTRA_DIST, MAINTAINERCLEANFILES):
+ Add $(srcdir)/user-refman.stamp, $(srcdir)/devel-refman.stamp,
+ $(srcdir)/figures.stamp, $(srcdir)/split-examples.stamp and
+ $(srcdir)/split-outputs.stamp.
+
+2010-03-15 Roland Levillain <roland(a)lrde.epita.fr>
+
Improve doc/'s cleaning rules.
* doc/Makefile.am (CLEANFILES): Remove
diff --git a/milena/doc/Makefile.am b/milena/doc/Makefile.am
index 6bd729e..553a8dd 100644
--- a/milena/doc/Makefile.am
+++ b/milena/doc/Makefile.am
@@ -157,6 +157,8 @@ $(srcdir)/$(USER_REFMAN_PDF): $(srcdir)/$(USER_REFMAN)
cd $(srcdir)/$(USER_REFMAN)/latex && $(MAKE) $(AM_MAKEFLAGS) pdf
cp -f $(srcdir)/$(USER_REFMAN)/latex/refman.pdf $@
+EXTRA_DIST += $(srcdir)/user-refman.stamp
+MAINTAINERCLEANFILES += $(srcdir)/user-refman.stamp
## FIXME: Are dependencies (`$(refman_dependencies)') set on the right
## rule? Does Doxygen make a copy of figures, or does it generate
## LaTeX inputs relying on the existence of such figures in the
@@ -238,6 +240,8 @@ $(srcdir)/$(DEVEL_REFMAN_PDF): $(srcdir)/$(DEVEL_REFMAN)
cd $(srcdir)/$(DEVEL_REFMAN)/latex && $(MAKE) $(AM_MAKEFLAGS) pdf
cp -f $(srcdir)/$(DEVEL_REFMAN)/latex/refman.pdf $@
+EXTRA_DIST += $(srcdir)/devel-refman.stamp
+MAINTAINERCLEANFILES += $(srcdir)/devel-refman.stamp
## FIXME: Are dependencies (`$(refman_dependencies)') set on the right
## rule? Does Doxygen make a copy of figures, or does it generate
## LaTeX inputs relying on the existence of such figures in the
@@ -693,7 +697,8 @@ MAINTAINERCLEANFILES += $(REF_GUIDE_HH)
$(srcdir)/figures/figures.mk: $(srcdir)/headers.stamp
include $(srcdir)/figures/figures.mk
-EXTRA_DIST += figures.stamp
+EXTRA_DIST += $(srcdir)/figures.stamp
+MAINTAINERCLEANFILES += $(srcdir)/figures.stamp
$(srcdir)/figures.stamp: $(FIGURES_SRCDIR)/*.p*m
rm -f $@.tmp
touch $@.tmp
@@ -1005,6 +1010,8 @@ EXAMPLES = \
# files easier. We probably also nee a stamp file to keep track of
# dependencies.
+EXTRA_DIST += $(srcdir)/split-examples.stamp
+MAINTAINERCLEANFILES += $(srcdir)/split-examples.stamp
# FIXME: Loops are bad, as they prevent parallelism. And we prefer
# data-driven actions anyway. This would imply that we know in
# advance the list out outputs (here, split examples). Maybe we can
@@ -1020,6 +1027,8 @@ $(srcdir)/split-examples.stamp: $(EXAMPLES)
done
@mv -f $@.tmp $@
+EXTRA_DIST += $(srcdir)/split-outputs.stamp
+MAINTAINERCLEANFILES += $(srcdir)/split-outputs.stamp
# FIXME: Loops are bad, as they prevent parallelism. And we prefer
# data-driven actions anyway. This would imply that we know in
# advance the list out outputs (here, split outputs). Maybe we can
--
1.5.6.5
* doc/tools/todoxygen.sh: Take an output file as second argument
instead of an output directory.
* doc/Makefile.am
($(TECHNICAL_HH), $(TUTORIAL_HH), $(REF_GUIDE_HH)): Adjust.
Use a temporary file to prevent todoxygen.sh from generating
incomplete outputs.
---
milena/ChangeLog | 11 +++++++++++
milena/doc/Makefile.am | 24 +++++++++++++++++++++---
milena/doc/tools/todoxygen.sh | 4 ++--
3 files changed, 34 insertions(+), 5 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 1264b4d..f24a57f 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,16 @@
2010-03-15 Roland Levillain <roland(a)lrde.epita.fr>
+ Prevent todoxygen.sh from generating incomplete outputs.
+
+ * doc/tools/todoxygen.sh: Take an output file as second argument
+ instead of an output directory.
+ * doc/Makefile.am
+ ($(TECHNICAL_HH), $(TUTORIAL_HH), $(REF_GUIDE_HH)): Adjust.
+ Use a temporary file to prevent todoxygen.sh from generating
+ incomplete outputs.
+
+2010-03-15 Roland Levillain <roland(a)lrde.epita.fr>
+
Adjust todoxygen.sh to TeX4ht outputs.
* doc/tools/todoxygen.sh: Here.
diff --git a/milena/doc/Makefile.am b/milena/doc/Makefile.am
index 17a26bf..6c035ee 100644
--- a/milena/doc/Makefile.am
+++ b/milena/doc/Makefile.am
@@ -357,7 +357,13 @@ TECHNICAL_HH = $(technical_dir)/technical.hh
# $(TECHNICAL_HTML). Anyway, this shortcut should vanish soon.
technical-html: $(TECHNICAL_HH)
$(TECHNICAL_HH): $(TECHNICAL_HTML) $(doc_dir)/tools/todoxygen.sh
- $(doc_dir)/tools/todoxygen.sh $< $(technical_dir) $(doc_dir)
+# The script `todoxygen.sh' may fail and still create a (partial and
+# invalid) file, thus preventing Make from trying to generate it
+# again. The solution is to use a temporary file as output and rename
+# it if the script succeeds.
+ rm -f $@.tmp
+ $(doc_dir)/tools/todoxygen.sh $< $@.tmp $(doc_dir)
+ mv -f $@.tmp $@
# Final product.
@@ -454,7 +460,13 @@ TUTORIAL_HH = $(tutorial_dir)/tutorial.hh
# $(TUTORIAL_HTML). Anyway, this shortcut should vanish soon.
tutorial-html: $(TUTORIAL_HH)
$(TUTORIAL_HH): $(TUTORIAL_HTML) $(doc_dir)/tools/todoxygen.sh
- $(doc_dir)/tools/todoxygen.sh $< $(tutorial_dir) $(doc_dir)
+# The script `todoxygen.sh' may fail and still create a (partial and
+# invalid) file, thus preventing Make from trying to generate it
+# again. The solution is to use a temporary file as output and rename
+# it if the script succeeds.
+ rm -f $@.tmp
+ $(doc_dir)/tools/todoxygen.sh $< $@.tmp $(doc_dir)
+ mv -f $@.tmp $@
# Final product.
@@ -657,7 +669,13 @@ REF_GUIDE_HH = $(ref_guide_dir)/ref_guide.hh
# $(REF_GUIDE_HTML). Anyway, this shortcut should vanish soon.
ref-guide-html: $(REF_GUIDE_HH)
$(REF_GUIDE_HH): $(REF_GUIDE_HTML) $(doc_dir)/tools/todoxygen.sh
- $(doc_dir)/tools/todoxygen.sh $< $(ref_guide_dir) $(doc_dir)
+# The script `todoxygen.sh' may fail and still create a (partial and
+# invalid) file, thus preventing Make from trying to generate it
+# again. The solution is to use a temporary file as output and rename
+# it if the script succeeds.
+ rm -f $@.tmp
+ $(doc_dir)/tools/todoxygen.sh $< $@.tmp $(doc_dir)
+ mv -f $@.tmp $@
# Final product.
diff --git a/milena/doc/tools/todoxygen.sh b/milena/doc/tools/todoxygen.sh
index 19a204a..0a85632 100755
--- a/milena/doc/tools/todoxygen.sh
+++ b/milena/doc/tools/todoxygen.sh
@@ -19,10 +19,10 @@
# along with Olena. If not, see <http://www.gnu.org/licenses/>.
test $# -eq 3 \
- || { echo "Usage: $0 <file.html> <output dir> <path to .sty>"; exit 1; }
+ || { echo "Usage: $0 <input.html> <output.hh> <path to .sty>"; exit 1; }
html="$1"
-out="$2/`basename $1 .html`.hh"
+out="$2"
bodyl=`grep -n -i "<BODY" $html | cut -d ':' -f 1`
nlines=`wc -l $html | cut -d ' ' -f 1`
--
1.5.6.5