Commit f00d513a authored by Roland Levillain's avatar Roland Levillain
Browse files

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/.
parent 01197589
2013-06-17 Roland Levillain <roland@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@lrde.epita.fr>
* scribo/binarization/sauvola_ms_split.hh: Make use of all arguments.
......
......@@ -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'`
......@@ -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/&#XA0/\&nbsp/g' $out
sed -i -e 's/&#X21A6/\&map/g' $out
sed -i -e 's/&#X2019/\&rsquo/g' $out
sed -i -e 's/&#X2192/\&rarr/g' $out
sed -i -e 's/&#X201C/\&ldquo/g' $out
sed -i -e 's/&#X201D/\&rdquo/g' $out
sed -i -e 's/&#X2261/\&equiv/g' $out
perl -pi -e 's/&#XA0/\&nbsp/g' $out
perl -pi -e 's/&#X21A6/\&map/g' $out
perl -pi -e 's/&#X2019/\&rsquo/g' $out
perl -pi -e 's/&#X2192/\&rarr/g' $out
perl -pi -e 's/&#X201C/\&ldquo/g' $out
perl -pi -e 's/&#X201D/\&rdquo/g' $out
perl -pi -e 's/&#X2261/\&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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment