* doc/Makefile.am,
* doc/tools/todoxygen.sh:
Here, as `sed -i' (with no backup file) behaves differently on
GNU/Linux and Mac OS X. For more information, see:
http://stackoverflow.com/questions/5694228/.
---
scribo/ChangeLog | 10 ++++++++++
scribo/doc/Makefile.am | 25 +++++++++++++------------
scribo/doc/tools/todoxygen.sh | 23 ++++++++++++-----------
3 files changed, 35 insertions(+), 23 deletions(-)
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index 90de65c..b357b08 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,3 +1,13 @@
+2013-06-17 Roland Levillain <roland(a)lrde.epita.fr>
+
+ Use `perl -pi' instead of `sed -i' in Scribo.
+
+ * doc/Makefile.am,
+ * doc/tools/todoxygen.sh:
+ Here, as `sed -i' (with no backup file) behaves differently on
+ GNU/Linux and Mac OS X. For more information, see:
+
http://stackoverflow.com/questions/5694228/.
+
2013-04-26 Guillaume Lazzara <z(a)lrde.epita.fr>
* scribo/binarization/sauvola_ms_split.hh: Make use of all arguments.
diff --git a/scribo/doc/Makefile.am b/scribo/doc/Makefile.am
index 8579a87..5e0dec9 100644
--- a/scribo/doc/Makefile.am
+++ b/scribo/doc/Makefile.am
@@ -99,9 +99,9 @@ $(srcdir)/user-refman.stamp: $(srcdir)/$(DOXYFILE).in $(REFMAN_deps)
test -f $(USER_REFMAN).tmp/latex/refman.tex
rm -rf $(srcdir)/$(USER_REFMAN)
## Fix path to the main page of the documentation.
- sed -i -e "s,\@relcommondocpath\@,../../../../doc/,g" \
- -e "s,\@userrefman\@,$(USER_REFMAN),g" \
- `find $(USER_REFMAN).tmp -name '*.html'`
+ perl -pi -e "s,\@relcommondocpath\@,../../../../doc/,g;" \
+ -e "s,\@userrefman\@,$(USER_REFMAN),g" \
+ `find $(USER_REFMAN).tmp -name '*.html'`
## FIXME: Moving directories between file systems is not portable.
mv $(USER_REFMAN).tmp $(srcdir)/$(USER_REFMAN)
@mv -f $@.tmp $@
@@ -182,9 +182,9 @@ $(srcdir)/devel-refman.stamp: $(srcdir)/$(DOXYFILE).in $(REFMAN_deps)
test -f $(DEVEL_REFMAN).tmp/latex/refman.tex
rm -rf $(srcdir)/$(DEVEL_REFMAN)
## Fix path to the main page of the documentation.
- sed -i -e "s,\@relcommondocpath\@,../../../../doc/,g" \
- -e "s,\@userrefman\@,$(DEVEL_REFMAN),g" \
- $(DEVEL_REFMAN).tmp/html/index.html
+ perl -pi -e "s,\@relcommondocpath\@,../../../../doc/,g;" \
+ -e "s,\@userrefman\@,$(DEVEL_REFMAN),g" \
+ $(DEVEL_REFMAN).tmp/html/index.html
## FIXME: Moving directories between file systems is not portable.
mv $(DEVEL_REFMAN).tmp $(srcdir)/$(DEVEL_REFMAN)
@mv -f $@.tmp $@
@@ -238,9 +238,9 @@ install-data-local:
$(DESTDIR)$(htmldir)/scribo/$(USER_REFMAN)
## Fix path to the main page of the documentation.
chmod -R u+w $(DESTDIR)$(htmldir)/scribo/$(USER_REFMAN)
- sed -i -e "s,../../../../doc/$(USER_REFMAN)/html,../../$(USER_REFMAN),g" \
- -e
"s,../../../../milena/doc/$(USER_REFMAN)/html,../../milena/$(USER_REFMAN)/,g" \
- `find $(DESTDIR)$(htmldir)/scribo/$(USER_REFMAN) -name '*.html'`
+ perl -pi -e "s,../../../../doc/$(USER_REFMAN)/html,../../$(USER_REFMAN),g;" \
+ -e
"s,../../../../milena/doc/$(USER_REFMAN)/html,../../milena/$(USER_REFMAN)/,g" \
+ `find $(DESTDIR)$(htmldir)/scribo/$(USER_REFMAN) -name '*.html'`
# Other HTML directories can be processed uniformly.
for d in $(DATA_html_dirs_inst); do \
rm -rf $(DESTDIR)$(htmldir)/scribo/$$d; \
@@ -265,6 +265,7 @@ uninstall-local:
doc-teamcity:
- sed -i -e "s,../../../../milena/doc/$(USER_REFMAN)/html,../milena.doc,g" \
- -e "s,../../../../doc/$(USER_REFMAN)/html,../olena.doc,g" \
- `find $(srcdir)/$(USER_REFMAN) -name '*.html'`
+ perl -pi \
+ -e "s,../../../../milena/doc/$(USER_REFMAN)/html,../milena.doc,g;" \
+ -e "s,../../../../doc/$(USER_REFMAN)/html,../olena.doc,g" \
+ `find $(srcdir)/$(USER_REFMAN) -name '*.html'`
diff --git a/scribo/doc/tools/todoxygen.sh b/scribo/doc/tools/todoxygen.sh
index 0a85632..29199ae 100755
--- a/scribo/doc/tools/todoxygen.sh
+++ b/scribo/doc/tools/todoxygen.sh
@@ -2,7 +2,8 @@
# todoxygen.sh: Turn HTML files into suitable inputs for doxygen.
-# Copyright (C) 2009, 2010 EPITA Research and Development Laboratory (LRDE).
+# Copyright (C) 2009, 2010, 2013 EPITA Research and Development
+# Laboratory (LRDE).
#
# This file is part of Olena.
#
@@ -33,18 +34,18 @@ echo '\htmlonly' >> $out
tail -n $tail_line $html >> $out
echo '\endhtmlonly */' >> $out
-sed -i -e 's/ /\ /g' $out
-sed -i -e 's/↦/\&map/g' $out
-sed -i -e 's/’/\&rsquo/g' $out
-sed -i -e 's/→/\&rarr/g' $out
-sed -i -e 's/“/\&ldquo/g' $out
-sed -i -e 's/”/\&rdquo/g' $out
-sed -i -e 's/≡/\&equiv/g' $out
+perl -pi -e 's/ /\ /g' $out
+perl -pi -e 's/↦/\&map/g' $out
+perl -pi -e 's/’/\&rsquo/g' $out
+perl -pi -e 's/→/\&rarr/g' $out
+perl -pi -e 's/“/\&ldquo/g' $out
+perl -pi -e 's/”/\&rdquo/g' $out
+perl -pi -e 's/≡/\&equiv/g' $out
# Doxygen wants us to preserve '\n' after commands.
# \ref and \see do not need that extra new line.
for keyword in include section page subpage subsection subsubsection image; do
- sed -i -e "s/\\\\endhtmlonly\\\\$keyword/\\\\endhtmlonly\n\n\\\\$keyword/g"
$out
- sed -i -e "s/\\\\endhtmlonly\*\//\\\\endhtmlonly\n\n\*\/\n\n/g" $out
- sed -i -e "s/\\\\$keyword \(.*\)\\\\htmlonly/\\\\$keyword
\1\n\n\\\\htmlonly\n/g" $out
+ perl -pi -e "s/\\\\endhtmlonly\\\\$keyword/\\\\endhtmlonly\n\n\\\\$keyword/g"
$out
+ perl -pi -e "s/\\\\endhtmlonly\*\//\\\\endhtmlonly\n\n\*\/\n\n/g" $out
+ perl -pi -e "s/\\\\$keyword \(.*\)\\\\htmlonly/\\\\$keyword
\1\n\n\\\\htmlonly\n/g" $out
done
--
1.7.10.4