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

Use `perl -pi' instead of `sed -i' in Milena.

	* doc/Makefile.am,
	* doc/tools/clearbanner.sh,
	* 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 480f7d1f
2013-06-17 Roland Levillain <roland@lrde.epita.fr>
Use `perl -pi' instead of `sed -i' in Milena.
* doc/Makefile.am,
* doc/tools/clearbanner.sh,
* 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-06-13 Roland Levillain <roland@lrde.epita.fr>
 
Update the documentation of mln_trace.
......@@ -261,9 +261,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 $@
......@@ -348,8 +348,8 @@ $(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\@,$(top_srcdir)/doc/$(DEVEL_REFMAN)/html/,g" \
$(DEVEL_REFMAN).tmp/html/index.html
perl -pi -e "s,\@relcommondocpath\@,$(top_srcdir)/doc/$(DEVEL_REFMAN)/html/,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 $@
......@@ -776,8 +776,9 @@ install-data-local:
cp -r $(srcdir)/$(USER_REFMAN)/html $(DESTDIR)$(htmldir)/milena/$(USER_REFMAN)
## Fix path to the main page of the documentation.
chmod -R u+w $(DESTDIR)$(htmldir)/milena/$(USER_REFMAN)
sed -i -e "s,../../../../doc/$(USER_REFMAN)/html,../../$(USER_REFMAN),g" \
`find $(DESTDIR)$(htmldir)/milena/$(USER_REFMAN) -name '*.html'`
perl -pi \
-e "s,../../../../doc/$(USER_REFMAN)/html,../../$(USER_REFMAN),g" \
`find $(DESTDIR)$(htmldir)/milena/$(USER_REFMAN) -name '*.html'`
# Other HTML directories can be processed uniformly.
for d in $(DATA_html_dirs_inst); do \
rm -rf $(DESTDIR)$(htmldir)/milena/$$d; \
......@@ -802,5 +803,5 @@ uninstall-local:
doc-teamcity:
sed -i -e "s,../../../../doc/$(USER_REFMAN)/html,../olena.doc,g" \
`find $(srcdir)/$(USER_REFMAN) -name '*.html'`
perl -pi -e "s,../../../../doc/$(USER_REFMAN)/html,../olena.doc,g" \
`find $(srcdir)/$(USER_REFMAN) -name '*.html'`
#!/bin/sh
# 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.
#
......@@ -16,6 +17,6 @@
# You should have received a copy of the GNU General Public License
# along with Olena. If not, see <http://www.gnu.org/licenses/>.
sed -i -e 's,<HR SIZE=2><BLOCKQUOTE CLASS="quote"><EM>This document was translated from L<sup>A</sup>T<sub>E</sub>X by,,g' $1
sed -i -e 's,<A HREF="http://hevea.inria.fr/index.html">H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A</A>.</EM></BLOCKQUOTE></BODY>,,g' $1
perl -pi -e 's,<HR SIZE=2><BLOCKQUOTE CLASS="quote"><EM>This document was translated from L<sup>A</sup>T<sub>E</sub>X by,,g' $1
perl -pi -e 's,<A HREF="http://hevea.inria.fr/index.html">H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A</A>.</EM></BLOCKQUOTE></BODY>,,g' $1
......@@ -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
Supports Markdown
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