* 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