* doc/Makefile.am: Rewrite patterns ``perl X `find Y''' as
``find Y -exec perl X {} \;'' to avoid long `perl' command lines and
please the shell.
---
ChangeLog | 8 ++++++++
doc/Makefile.am | 27 +++++++++++++++------------
2 files changed, 23 insertions(+), 12 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index b4cd1f4..aa9606d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2013-06-14 Roland Levillain <roland(a)lrde.epita.fr>
+
+ Shell-related portability fixes in Olena's Makefiles.
+
+ * doc/Makefile.am: Rewrite patterns ``perl X `find Y''' as
+ ``find Y -exec perl X {} \;'' to avoid long `perl' command lines and
+ please the shell.
+
2013-06-17 Roland Levillain <roland(a)lrde.epita.fr>
Use `perl -pi' instead of `sed -i' in Olena.
diff --git a/doc/Makefile.am b/doc/Makefile.am
index e10944a..30fa31d 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -121,9 +121,10 @@ $(srcdir)/user-refman.stamp: $(srcdir)/$(DOXYFILE).in $(REFMAN_deps)
$(DOXYGEN) $(DOXYFILE_USER)
rm -rf $(srcdir)/$(USER_REFMAN)
## Fix path to the main page of the documentation.
- perl -pi -e "s,\@relcommondocpath\@,../../,g;" \
- -e "s,\@userrefman\@,$(USER_REFMAN),g" \
- `find $(USER_REFMAN).tmp/html -name '*.html'`
+ find $(USER_REFMAN).tmp/html -name '*.html' -exec \
+ perl -pi -e "s,\@relcommondocpath\@,../../,g;" \
+ -e "s,\@userrefman\@,$(USER_REFMAN),g" \
+ {} \;
## FIXME: Moving directories between file systems is not portable.
mv $(USER_REFMAN).tmp $(srcdir)/$(USER_REFMAN)
@mv -f $@.tmp $@
@@ -212,10 +213,11 @@ install-data-local:
cp -r $(srcdir)/$(USER_REFMAN)/html $(DESTDIR)$(htmldir)/$(USER_REFMAN)
# Fix documentation paths
chmod -R u+w $(DESTDIR)$(htmldir)/$(USER_REFMAN)
- perl -pi -e
"s,../../../milena/doc/$(USER_REFMAN)/html,../milena/$(USER_REFMAN),g;" \
- -e
"s,../../../scribo/doc/$(USER_REFMAN)/html,../scribo/$(USER_REFMAN),g;" \
- -e "s,../../$(USER_REFMAN)/html,../$(USER_REFMAN),g" \
- `find $(DESTDIR)$(htmldir)/$(USER_REFMAN) -name '*.html'`
+ find $(DESTDIR)$(htmldir)/$(USER_REFMAN) -name '*.html' -exec \
+ perl -pi -e
"s,../../../milena/doc/$(USER_REFMAN)/html,../milena/$(USER_REFMAN),g;" \
+ -e
"s,../../../scribo/doc/$(USER_REFMAN)/html,../scribo/$(USER_REFMAN),g;" \
+ -e "s,../../$(USER_REFMAN)/html,../$(USER_REFMAN),g" \
+ {} \;
## Try GNU chmod's X mode before resorting to something slower but
## more standard.
chmod -R a+rX $(DESTDIR)$(htmldir) || \
@@ -230,8 +232,9 @@ uninstall-local:
doc-teamcity:
- perl -pi \
- -e "s,../../../milena/doc/$(USER_REFMAN)/html,../milena.doc,g;" \
- -e "s,../../../scribo/doc/$(USER_REFMAN)/html,../scribo.doc,g;" \
- -e "s,../../$(USER_REFMAN)/html,../olena.doc,g" \
- `find $(srcdir)/$(USER_REFMAN) -name '*.html'`
+ find $(srcdir)/$(USER_REFMAN) -name '*.html' -exec \
+ perl -pi \
+ -e "s,../../../milena/doc/$(USER_REFMAN)/html,../milena.doc,g;" \
+ -e "s,../../../scribo/doc/$(USER_REFMAN)/html,../scribo.doc,g;" \
+ -e "s,../../$(USER_REFMAN)/html,../olena.doc,g" \
+ {} \;
--
1.7.10.4