[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.12-3
From: |
Stefano Lattarini |
Subject: |
[Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.12-345-g042e132 |
Date: |
Wed, 30 May 2012 17:07:59 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".
http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=042e1321b539cb1f474bd1bee2238c16e2a463a4
The branch, ng/master has been updated
via 042e1321b539cb1f474bd1bee2238c16e2a463a4 (commit)
via cf27616322b4b0e051397ffefaaff6869272a4e0 (commit)
from 45263630bcf83255f6a176cebd10e2ca0dcad618 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 042e1321b539cb1f474bd1bee2238c16e2a463a4
Author: Stefano Lattarini <address@hidden>
Date: Wed May 30 10:23:03 2012 +0200
[ng] texinfo: take advantage of GNU make features in several recipes
* lib/am/texibuild.am: In a recipe, use $(@D) instead of extracting
the directory component from '$@' with echo+sed.
* lib/am/texinfos.am (am__create_installdir): New private helper
variable.
Rewrite several rules to take advantage of it and of GNU make automatic
variables (like $^) and builtins (like $(and), $(addprefix), $(notdir)).
Add a workaround for a misfeature of the Automake parser/preprocessor
that might sometimes prevent us from using the '$^' automatic variable
correctly in our recipe.
Signed-off-by: Stefano Lattarini <address@hidden>
commit cf27616322b4b0e051397ffefaaff6869272a4e0
Author: Stefano Lattarini <address@hidden>
Date: Wed May 30 09:04:24 2012 +0200
[ng] coverage: VPATH build with PDF, DVI and PostScript Texinfo output
* t/txinfo21b.sh: New test.
Signed-off-by: Stefano Lattarini <address@hidden>
-----------------------------------------------------------------------
Summary of changes:
lib/am/texibuild.am | 2 +-
lib/am/texinfos.am | 188 ++++++++++++++------------------------
t/{txinfo21.sh => txinfo21b.sh} | 21 +++--
3 files changed, 83 insertions(+), 128 deletions(-)
copy t/{txinfo21.sh => txinfo21b.sh} (90%)
diff --git a/lib/am/texibuild.am b/lib/am/texibuild.am
index 10f5b36..049d894 100644
--- a/lib/am/texibuild.am
+++ b/lib/am/texibuild.am
@@ -44,7 +44,7 @@
rc=$$?; \
## Beware that backup info files might come from a subdirectory.
?INSRC? $(am__cd) $(srcdir) && \
- $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
+ $$restore $$backupdir/* $(@D); \
fi; \
rm -rf $$backupdir; exit $$rc
diff --git a/lib/am/texinfos.am b/lib/am/texinfos.am
index c15b729..2c94db1 100644
--- a/lib/am/texinfos.am
+++ b/lib/am/texinfos.am
@@ -15,6 +15,9 @@
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
+## FIXME: this should probably be moved to header-vars.am ...
+am__create_installdir = $(if $(and $1,$^),$(MKDIR_P) $(DESTDIR)$1,@:)
+
## ----------- ##
## Variables. ##
## ----------- ##
@@ -133,29 +136,25 @@ if %?LOCAL-TEXIS%
include inst-vars.am
-install-dvi-am: $(DVIS)
- @$(NORMAL_INSTALL)
- @list='$(DVIS)'; test -n "$(dvidir)" || list=; \
- if test -n "$$list"; then \
- echo " $(MKDIR_P) '$(DESTDIR)$(dvidir)'"; \
- $(MKDIR_P) "$(DESTDIR)$(dvidir)" || exit 1; \
- fi; \
- for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- echo "$$d$$p"; \
- done | $(am__base_list) | \
- while read files; do \
- echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dvidir)'"; \
- $(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)" || exit $$?; \
- done
-
-install-html-am: $(HTMLS)
+## FIXME: Extra indirection required because Automake proprocessing groups
+## FIXME: dependencies for a given '*-am' together, so that we might end up
+## FIXME: in our genereated Makefile with something like:
+## FIXME:
+## FIXME: install-pdf-am: $(PDFS) install-pdf-local
+## FIXME: ... [RECIPE] ...
+## FIXME:
+## FIXME: which would cause a huge mess with our usages of '$^' in the recipes.
+
+install-dvi-am: am--install-dvi
+install-ps-am: am--install-ps
+install-pdf-am: am--install-pdf
+install-info-am: am--install-info
+install-html-am: am--install-html
+
+am--install-html: $(HTMLS)
@$(NORMAL_INSTALL)
+ $(call am__create_installdir,$(htmldir))
@list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \
- if test -n "$$list"; then \
- echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)'"; \
- $(MKDIR_P) "$(DESTDIR)$(htmldir)" || exit 1; \
- fi; \
for p in $$list; do \
if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \
$(am__strip_dir) \
@@ -180,76 +179,62 @@ install-html-am: $(HTMLS)
$(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \
done; }
-install-info-am: $(INFO_DEPS)
+am--install-info: $(INFO_DEPS)
@$(NORMAL_INSTALL)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
- if test -n "$$list"; then \
- echo " $(MKDIR_P) '$(DESTDIR)$(infodir)'"; \
- $(MKDIR_P) "$(DESTDIR)$(infodir)" || exit 1; \
- fi; \
+ $(call am__create_installdir,$(infodir))
+ @list='$(and $(infodir),$^)'; test -n "$$list" || exit 0; \
for file in $$list; do \
-## Strip possible $(srcdir) prefix.
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- esac; \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9]; do \
- if test -f $$ifile; then \
- echo "$$ifile"; \
- else : ; fi; \
+ for ifile in $$file $$file-[0-9] $$file-[0-9][0-9]; do \
+ test ! -f $$ifile || echo "$$ifile"; \
done; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \
- $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; \
+ done
@$(POST_INSTALL)
- @if $(am__can_run_installinfo); then \
- list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
- for file in $$list; do \
-## Strip directory
- relfile=`echo "$$file" | sed 's|^.*/||'`; \
+ @$(am__can_run_installinfo) || exit 0; \
+ rellist='$(notdir $(and $(infodir),$^))'; \
+ test -n "$$rellist" || exit 0; \
+ for relfile in $$rellist; do \
+ echo " install-info --info-dir='$(DESTDIR)$(infodir)'
'$(DESTDIR)$(infodir)/$$relfile'";\
## Run ":" after install-info in case install-info fails. We really
## don't care about failures here, because they can be spurious. For
## instance if you don't have a dir file, install-info will fail. I
## think instead it should create a new dir file for you. This bug
## causes the "make distcheck" target to fail reliably.
- echo " install-info --info-dir='$(DESTDIR)$(infodir)'
'$(DESTDIR)$(infodir)/$$relfile'";\
-## Use "|| :" here because Sun make passes -e to sh; if install-info
-## fails then we'd fail if we used ";".
- install-info --info-dir="$(DESTDIR)$(infodir)"
"$(DESTDIR)$(infodir)/$$relfile" || :;\
- done; \
- else : ; fi
+ install-info --info-dir="$(DESTDIR)$(infodir)"
"$(DESTDIR)$(infodir)/$$relfile" || :;\
+ done; \
-install-pdf-am: $(PDFS)
+am--install-dvi: $(DVIS)
@$(NORMAL_INSTALL)
- @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
- if test -n "$$list"; then \
- echo " $(MKDIR_P) '$(DESTDIR)$(pdfdir)'"; \
- $(MKDIR_P) "$(DESTDIR)$(pdfdir)" || exit 1; \
- fi; \
- for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- echo "$$d$$p"; \
- done | $(am__base_list) | \
+ $(call am__create_installdir,$(dvidir))
+ @list='$(and $(dvidir),$^)'; test -n "$$list" || exit 0; \
+ for p in $$list; do echo "$$p"; done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dvidir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)" || exit $$?; \
+ done
+
+am--install-pdf: $(PDFS)
+ @$(NORMAL_INSTALL)
+ $(call am__create_installdir,$(pdfdir))
+ @list='$(and $(pdfdir),$^)'; test -n "$$list" || exit 0; \
+ for p in $$list; do echo "$$p"; done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pdfdir)'"; \
- $(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)" || exit $$?; done
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)" || exit $$?; \
+ done
-install-ps-am: $(PSS)
+am--install-ps: $(PSS)
@$(NORMAL_INSTALL)
- @list='$(PSS)'; test -n "$(psdir)" || list=; \
- if test -n "$$list"; then \
- echo " $(MKDIR_P) '$(DESTDIR)$(psdir)'"; \
- $(MKDIR_P) "$(DESTDIR)$(psdir)" || exit 1; \
- fi; \
- for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- echo "$$d$$p"; \
- done | $(am__base_list) | \
+ $(call am__create_installdir,$(psdir))
+ @list='$(and $(psdir),$^)'; test -n "$$list" || exit 0; \
+ for p in $$list; do echo "$$p"; done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(psdir)'"; \
- $(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)" || exit $$?; done
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)" || exit $$?; \
+ done
else ! %?LOCAL-TEXIS%
install-dvi-am:
@@ -274,22 +259,20 @@ if %?LOCAL-TEXIS%
uninstall-dvi-am:
@$(NORMAL_UNINSTALL)
- @list='$(DVIS)'; test -n "$(dvidir)" || list=; \
- for p in $$list; do \
- $(am__strip_dir) \
- echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \
- rm -f "$(DESTDIR)$(dvidir)/$$f"; \
- done
+ $(if $(and $(DVIS),$(dvidir)),rm -f $(addprefix
'$(DESTDIR)$(dvidir)'/,$(notdir $(DVIS))))
+
+uninstall-pdf-am:
+ @$(NORMAL_UNINSTALL)
+ $(if $(and $(PDFS),$(pdfdir)),rm -f $(addprefix
'$(DESTDIR)$(pdfdir)'/,$(notdir $(PDFS))))
+
+uninstall-ps-am:
+ @$(NORMAL_UNINSTALL)
+ $(if $(and $(PSS),$(psdir)),rm -f $(addprefix
'$(DESTDIR)$(psdir)'/,$(notdir $(PSS))))
uninstall-html-am:
@$(NORMAL_UNINSTALL)
- @list='$(HTMLS)'; test -n "$(htmldir)" || list=; \
- for p in $$list; do \
- $(am__strip_dir) \
-## $f can be a directory, hence the -r.
- echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \
- rm -rf "$(DESTDIR)$(htmldir)/$$f"; \
- done
+## The HTML 'files' can be directories actually, hence the '-r'.
+ $(if $(and $(HTMLS),$(htmldir)),rm -rf $(addprefix
'$(DESTDIR)$(htmldir)'/,$(notdir $(HTMLS))))
uninstall-info-am:
@$(PRE_UNINSTALL)
@@ -318,46 +301,13 @@ uninstall-info-am:
else :; fi); \
done
-uninstall-pdf-am:
- @$(NORMAL_UNINSTALL)
- @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
- for p in $$list; do \
- $(am__strip_dir) \
- echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \
- rm -f "$(DESTDIR)$(pdfdir)/$$f"; \
- done
-
-uninstall-ps-am:
- @$(NORMAL_UNINSTALL)
- @list='$(PSS)'; test -n "$(psdir)" || list=; \
- for p in $$list; do \
- $(am__strip_dir) \
- echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \
- rm -f "$(DESTDIR)$(psdir)/$$f"; \
- done
endif %?LOCAL-TEXIS%
if %?LOCAL-TEXIS%
.PHONY: dist-info
dist-info: $(INFO_DEPS)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- list='$(INFO_DEPS)'; \
- for base in $$list; do \
-## Strip possible $(srcdir) prefix.
- case $$base in \
- $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \
- esac; \
- if test -f $$base; then d=.; else d=$(srcdir); fi; \
- base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \
- for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9]
$$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \
- if test -f $$file; then \
-## Strip leading '$$d/'.
- relfile=`expr "$$file" : "$$d/\(.*\)"`; \
- test -f "$(distdir)/$$relfile" || \
- cp -p $$file "$(distdir)/$$relfile"; \
- else :; fi; \
- done; \
- done
+ @$(foreach f,$(foreach x,$^,$(wildcard $x $x-[0-9] $x-[0-9][0-9])), \
+ cp -p $f $(distdir)/$(patsubst $(srcdir)/%,%,$f);)
endif %?LOCAL-TEXIS%
diff --git a/t/txinfo21.sh b/t/txinfo21b.sh
similarity index 90%
copy from t/txinfo21.sh
copy to t/txinfo21b.sh
index 258cba3..429c2bb 100755
--- a/t/txinfo21.sh
+++ b/t/txinfo21b.sh
@@ -15,7 +15,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Test support for building HTML documentation, and the many
-# install-DOC flavors.
+# install-DOC flavors, in VPATH builds.
+# Keep in sync with sister test 'txinfo21.sh'.
+# FIXME: in the long term, the best thing to do is probably to
+# FIXME: convert this test and the sister test 'txinfo21b.sh' to
+# FIXME: TAP, and merge them.
required='makeinfo-html tex texi2dvi'
. ./defs || Exit 1
@@ -81,7 +85,9 @@ $ACLOCAL
$AUTOMAKE --add-missing
$AUTOCONF
-./configure
+mkdir build
+cd build
+../configure
$MAKE
@@ -93,11 +99,11 @@ test -d sub/main2.html
test -d rec/main3.html
# Rebuilding main.html should cause its timestamp to be updated.
-is_newest main.html main.texi
+is_newest main.html ../main.texi
$sleep
-touch main.texi
+touch ../main.texi
$MAKE html
-is_newest main.html main.texi
+is_newest main.html ../main.texi
$MAKE clean
test ! -d main.html
@@ -115,12 +121,11 @@ test ! -f sub/main2.html
test ! -f rec/main3.html
# Make sure AM_MAKEINFOHTMLFLAGS is supported, and override AM_MAKEINFO.
-cat >>Makefile.am <<\EOF
+cat >> ../Makefile.am <<\EOF
AM_MAKEINFOHTMLFLAGS = --no-headers --no-split
AM_MAKEINFOFLAGS = --unsupported-option
EOF
-$AUTOMAKE
-./configure --prefix "`pwd`"
+../configure --prefix "`pwd`"
$MAKE html
test -f main.html
test -f sub/main2.html
hooks/post-receive
--
GNU Automake
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.12-345-g042e132,
Stefano Lattarini <=