* 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.
Wrap some long lines.
---
milena/ChangeLog | 9 +++++++++
milena/doc/Makefile.am | 29 +++++++++++++++++------------
2 files changed, 26 insertions(+), 12 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 769d2d9..f39e9e5 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,12 @@
+2013-06-14 Roland Levillain <roland(a)lrde.epita.fr>
+
+ Shell-related portability fixes in Milena'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.
+ Wrap some long lines.
+
2013-06-17 Roland Levillain <roland(a)lrde.epita.fr>
Use `perl -pi' instead of `sed -i' in Milena.
diff --git a/milena/doc/Makefile.am b/milena/doc/Makefile.am
index 3e70841..44e4211 100644
--- a/milena/doc/Makefile.am
+++ b/milena/doc/Makefile.am
@@ -261,9 +261,10 @@ $(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.
- perl -pi -e "s,\@relcommondocpath\@,../../../../doc/,g;" \
- -e "s,\@userrefman\@,$(USER_REFMAN),g" \
- `find $(USER_REFMAN).tmp -name '*.html'`
+ find $(USER_REFMAN).tmp -name '*.html' -exec \
+ perl -pi -e "s,\@relcommondocpath\@,../../../../doc/,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 $@
@@ -348,7 +349,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.
- perl -pi -e "s,\@relcommondocpath\@,$(top_srcdir)/doc/$(DEVEL_REFMAN)/html/,g"
\
+ 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)
@@ -776,9 +778,10 @@ 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)
- perl -pi \
- -e "s,../../../../doc/$(USER_REFMAN)/html,../../$(USER_REFMAN),g" \
- `find $(DESTDIR)$(htmldir)/milena/$(USER_REFMAN) -name '*.html'`
+ find $(DESTDIR)$(htmldir)/milena/$(USER_REFMAN) -name '*.html' -exec \
+ perl -pi \
+ -e "s,../../../../doc/$(USER_REFMAN)/html,../../$(USER_REFMAN),g" \
+ {} \;
# Other HTML directories can be processed uniformly.
for d in $(DATA_html_dirs_inst); do \
rm -rf $(DESTDIR)$(htmldir)/milena/$$d; \
@@ -786,9 +789,10 @@ install-data-local:
done
## Try GNU chmod's X mode before resorting to something slower but
## more standard.
- chmod -R a+rX $(DESTDIR)$(htmldir)/milena/ || \
- find $(DESTDIR)$(htmldir)/milena/ \( -type d -a -exec chmod a+rx {} \; \) \
- -o -exec chmod a+r {} \;
+ chmod -R a+rX $(DESTDIR)$(htmldir)/milena/ || \
+ find $(DESTDIR)$(htmldir)/milena \
+ \( -type d -a -exec chmod a+rx {} \; \) \
+ -o -exec chmod a+r {} \;
uninstall-local:
for d in $(DATA_html_dirs_inst); do \
@@ -803,5 +807,6 @@ uninstall-local:
doc-teamcity:
- perl -pi -e "s,../../../../doc/$(USER_REFMAN)/html,../olena.doc,g" \
- `find $(srcdir)/$(USER_REFMAN) -name '*.html'`
+ find $(srcdir)/$(USER_REFMAN) -name '*.html' -exec \
+ perl -pi -e "s,../../../../doc/$(USER_REFMAN)/html,../olena.doc,g" \
+ {} \;
--
1.7.10.4