summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>2009-03-28 18:04:48 +0100
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>2009-03-28 18:04:48 +0100
commit9bfd7e89c90b5ad1721e4bcb536bae2f7562dbba (patch)
tree3980d80629f3bd53d24c612f9da8007a2213832b
parent0930139923e8db0b0334e17dc379682a63f73831 (diff)
downloadautomake-9bfd7e89c90b5ad1721e4bcb536bae2f7562dbba.tar.gz
Sane (un)install for empty directory variables.
This patch fixes all install and uninstall rules to behave sanely when $(wheredir) is the empty string, but $(where_HOW) is nonempty, for all kinds of values of `where' and `HOW'. * lib/am/data.am (install-%DIR%%PRIMARY%, uninstall-%DIR%%PRIMARY%): Do not touch the install tree if the corresponding directory variable $(%NDIR%dir) is empty. * lib/am/java.am (install-%DIR%JAVA, uninstall-%DIR%JAVA): Likewise. * lib/am/libs.am (install-%DIR%LIBRARIES, uninstall-%DIR%LIBRARIES): Likewise. * lib/am/lisp.am (install-%DIR%LISP, uninstall-%DIR%LISP): Likewise. * lib/am/ltlib.am (install-%DIR%LTLIBRARIES, uninstall-%DIR%LTLIBRARIES): Likewise. * lib/am/mans.am (install-man%SECTION%, uninstall-man%SECTION%): Likewise. * lib/am/progs.am (install-%DIR%PROGRAMS, uninstall-%DIR%PROGRAMS): Likewise. * lib/am/python.am (install-%DIR%PYTHON, uninstall-%DIR%PYTHON): Likewise. * lib/am/scripts.am (install-%DIR%SCRIPTS, uninstall-%DIR%SCRIPTS): Likewise. * lib/am/texinfos.am (install-dvi-am, install-html-am, install-pdf-am) (install-ps-am, uninstall-dvi-am, uninstall-html-am, uninstall-pdf-am) (uninstall-ps-am): Likewise. * tests/instdir2.test, tests/instdir-java.test, tests/instdir-lisp.test, tests/instdir-ltlib.test, tests/instdir-prog.test, tests/instdir-python.test, tests/instdir-texi.test: New tests. * tests/Makefile.am: Update. * NEWS: Update. Suggestion by Akim Demaille. Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
-rw-r--r--ChangeLog32
-rw-r--r--Makefile.in4
-rw-r--r--NEWS3
-rw-r--r--doc/Makefile.in37
-rw-r--r--lib/Automake/Makefile.in10
-rw-r--r--lib/Makefile.in10
-rw-r--r--lib/am/Makefile.in5
-rw-r--r--lib/am/data.am11
-rw-r--r--lib/am/java.am6
-rw-r--r--lib/am/libs.am14
-rw-r--r--lib/am/lisp.am8
-rw-r--r--lib/am/ltlib.am12
-rw-r--r--lib/am/mans.am8
-rw-r--r--lib/am/progs.am6
-rw-r--r--lib/am/python.am13
-rw-r--r--lib/am/scripts.am6
-rw-r--r--lib/am/texinfos.am30
-rw-r--r--m4/Makefile.in5
-rw-r--r--tests/Makefile.am7
-rw-r--r--tests/Makefile.in7
-rwxr-xr-xtests/instdir-java.test59
-rwxr-xr-xtests/instdir-lisp.test58
-rwxr-xr-xtests/instdir-ltlib.test74
-rwxr-xr-xtests/instdir-prog.test72
-rwxr-xr-xtests/instdir-python.test62
-rwxr-xr-xtests/instdir-texi.test70
-rwxr-xr-xtests/instdir2.test93
27 files changed, 644 insertions, 78 deletions
diff --git a/ChangeLog b/ChangeLog
index 113e16f36..1aea72cc1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,37 @@
2009-03-28 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+ Sane (un)install for empty directory variables.
+ This patch fixes all install and uninstall rules to behave
+ sanely when $(wheredir) is the empty string, but $(where_HOW) is
+ nonempty, for all kinds of values of `where' and `HOW'.
+ * lib/am/data.am (install-%DIR%%PRIMARY%, uninstall-%DIR%%PRIMARY%):
+ Do not touch the install tree if the corresponding directory variable
+ $(%NDIR%dir) is empty.
+ * lib/am/java.am (install-%DIR%JAVA, uninstall-%DIR%JAVA): Likewise.
+ * lib/am/libs.am (install-%DIR%LIBRARIES, uninstall-%DIR%LIBRARIES):
+ Likewise.
+ * lib/am/lisp.am (install-%DIR%LISP, uninstall-%DIR%LISP): Likewise.
+ * lib/am/ltlib.am (install-%DIR%LTLIBRARIES, uninstall-%DIR%LTLIBRARIES):
+ Likewise.
+ * lib/am/mans.am (install-man%SECTION%, uninstall-man%SECTION%):
+ Likewise.
+ * lib/am/progs.am (install-%DIR%PROGRAMS, uninstall-%DIR%PROGRAMS):
+ Likewise.
+ * lib/am/python.am (install-%DIR%PYTHON, uninstall-%DIR%PYTHON):
+ Likewise.
+ * lib/am/scripts.am (install-%DIR%SCRIPTS, uninstall-%DIR%SCRIPTS):
+ Likewise.
+ * lib/am/texinfos.am (install-dvi-am, install-html-am, install-pdf-am)
+ (install-ps-am, uninstall-dvi-am, uninstall-html-am, uninstall-pdf-am)
+ (uninstall-ps-am): Likewise.
+ * tests/instdir2.test, tests/instdir-java.test,
+ tests/instdir-lisp.test, tests/instdir-ltlib.test,
+ tests/instdir-prog.test, tests/instdir-python.test,
+ tests/instdir-texi.test: New tests.
+ * tests/Makefile.am: Update.
+ * NEWS: Update.
+ Suggestion by Akim Demaille.
+
Ensure that empty directory variables work with empty content variables.
This test ensures that, if both $(wheredir) and $(where_HOW) are
the empty string, then the `install' and `uninstall' rules behave
diff --git a/Makefile.in b/Makefile.in
index 7891cdac3..7135f5329 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -297,7 +297,7 @@ $(am__aclocal_m4_deps):
install-binSCRIPTS: $(bin_SCRIPTS)
@$(NORMAL_INSTALL)
test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
- @list='$(bin_SCRIPTS)'; \
+ @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
@@ -322,7 +322,7 @@ install-binSCRIPTS: $(bin_SCRIPTS)
uninstall-binSCRIPTS:
@$(NORMAL_UNINSTALL)
- @list='$(bin_SCRIPTS)'; \
+ @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 's,.*/,,;$(transform)'`; \
test -n "$$list" || exit 0; \
diff --git a/NEWS b/NEWS
index 780b49a7d..6b94a7cad 100644
--- a/NEWS
+++ b/NEWS
@@ -83,6 +83,9 @@ New in 1.10a:
Both install and uninstall may sometimes enter (`cd' into) the target
installation directory now, when no build-local scripts are used.
+ Both install and uninstall do not fail anymore but do nothing if an
+ installation directory variable like `bindir' is set to the empty string.
+
For built-in rules, `make install' now fails reliably if installation
of a file failed. Conversely, `make uninstall' even succeeds when
issued multiple times.
diff --git a/doc/Makefile.in b/doc/Makefile.in
index fe0343a87..37faf518c 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -334,7 +334,8 @@ maintainer-clean-vti:
uninstall-dvi-am:
@$(NORMAL_UNINSTALL)
- @list='$(DVIS)'; for p in $$list; do \
+ @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"; \
@@ -342,7 +343,8 @@ uninstall-dvi-am:
uninstall-html-am:
@$(NORMAL_UNINSTALL)
- @list='$(HTMLS)'; for p in $$list; do \
+ @list='$(HTMLS)'; test -n "$(htmldir)" || list=; \
+ for p in $$list; do \
$(am__strip_dir) \
echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \
rm -rf "$(DESTDIR)$(htmldir)/$$f"; \
@@ -374,7 +376,8 @@ uninstall-info-am:
uninstall-pdf-am:
@$(NORMAL_UNINSTALL)
- @list='$(PDFS)'; for p in $$list; do \
+ @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"; \
@@ -382,7 +385,8 @@ uninstall-pdf-am:
uninstall-ps-am:
@$(NORMAL_UNINSTALL)
- @list='$(PSS)'; for p in $$list; do \
+ @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"; \
@@ -423,7 +427,7 @@ maintainer-clean-aminfo:
install-man1: $(dist_man1_MANS)
@$(NORMAL_INSTALL)
test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
- @list='$(dist_man1_MANS)'; \
+ @list='$(dist_man1_MANS)'; test -n "$(man1dir)" || exit 0; \
{ for i in $$list; do echo "$$i"; done; \
} | while read p; do \
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
@@ -447,7 +451,7 @@ install-man1: $(dist_man1_MANS)
uninstall-man1:
@$(NORMAL_UNINSTALL)
- @list='$(dist_man1_MANS)'; \
+ @list='$(dist_man1_MANS)'; test -n "$(man1dir)" || exit 0; \
files=`{ for i in $$list; do echo "$$i"; done; \
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
@@ -457,7 +461,8 @@ uninstall-man1:
install-dist_docDATA: $(dist_doc_DATA)
@$(NORMAL_INSTALL)
test -z "$(docdir)" || $(MKDIR_P) "$(DESTDIR)$(docdir)"
- @list='$(dist_doc_DATA)'; for p in $$list; do \
+ @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
+ for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
@@ -468,7 +473,7 @@ install-dist_docDATA: $(dist_doc_DATA)
uninstall-dist_docDATA:
@$(NORMAL_UNINSTALL)
- @list='$(dist_doc_DATA)'; \
+ @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \
echo " ( cd '$(DESTDIR)$(docdir)' && rm -f" $$files ")"; \
@@ -632,7 +637,8 @@ install-dvi: install-dvi-am
install-dvi-am: $(DVIS)
@$(NORMAL_INSTALL)
test -z "$(dvidir)" || $(MKDIR_P) "$(DESTDIR)$(dvidir)"
- @list='$(DVIS)'; for p in $$list; do \
+ @list='$(DVIS)'; test -n "$(dvidir)" || list=; \
+ for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
@@ -647,7 +653,8 @@ install-html: install-html-am
install-html-am: $(HTMLS)
@$(NORMAL_INSTALL)
test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)"
- @list='$(HTMLS)'; list2=; for p in $$list; do \
+ @list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \
+ for p in $$list; do \
if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \
$(am__strip_dir) \
if test -d "$$d$$p"; then \
@@ -670,7 +677,7 @@ install-info-am: $(INFO_DEPS)
@$(NORMAL_INSTALL)
test -z "$(infodir)" || $(MKDIR_P) "$(DESTDIR)$(infodir)"
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- list='$(INFO_DEPS)'; \
+ list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
@@ -690,7 +697,7 @@ install-info-am: $(INFO_DEPS)
@$(POST_INSTALL)
@if (install-info --version && \
install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
- list='$(INFO_DEPS)'; \
+ list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
for file in $$list; do \
relfile=`echo "$$file" | sed 's|^.*/||'`; \
echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\
@@ -704,7 +711,8 @@ install-pdf: install-pdf-am
install-pdf-am: $(PDFS)
@$(NORMAL_INSTALL)
test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)"
- @list='$(PDFS)'; for p in $$list; do \
+ @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
+ for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
@@ -716,7 +724,8 @@ install-ps: install-ps-am
install-ps-am: $(PSS)
@$(NORMAL_INSTALL)
test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)"
- @list='$(PSS)'; for p in $$list; do \
+ @list='$(PSS)'; test -n "$(psdir)" || list=; \
+ for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
diff --git a/lib/Automake/Makefile.in b/lib/Automake/Makefile.in
index d03f25dad..1ca863e97 100644
--- a/lib/Automake/Makefile.in
+++ b/lib/Automake/Makefile.in
@@ -278,7 +278,8 @@ $(am__aclocal_m4_deps):
install-dist_perllibDATA: $(dist_perllib_DATA)
@$(NORMAL_INSTALL)
test -z "$(perllibdir)" || $(MKDIR_P) "$(DESTDIR)$(perllibdir)"
- @list='$(dist_perllib_DATA)'; for p in $$list; do \
+ @list='$(dist_perllib_DATA)'; test -n "$(perllibdir)" || list=; \
+ for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
@@ -289,7 +290,7 @@ install-dist_perllibDATA: $(dist_perllib_DATA)
uninstall-dist_perllibDATA:
@$(NORMAL_UNINSTALL)
- @list='$(dist_perllib_DATA)'; \
+ @list='$(dist_perllib_DATA)'; test -n "$(perllibdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \
echo " ( cd '$(DESTDIR)$(perllibdir)' && rm -f" $$files ")"; \
@@ -297,7 +298,8 @@ uninstall-dist_perllibDATA:
install-nodist_perllibDATA: $(nodist_perllib_DATA)
@$(NORMAL_INSTALL)
test -z "$(perllibdir)" || $(MKDIR_P) "$(DESTDIR)$(perllibdir)"
- @list='$(nodist_perllib_DATA)'; for p in $$list; do \
+ @list='$(nodist_perllib_DATA)'; test -n "$(perllibdir)" || list=; \
+ for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
@@ -308,7 +310,7 @@ install-nodist_perllibDATA: $(nodist_perllib_DATA)
uninstall-nodist_perllibDATA:
@$(NORMAL_UNINSTALL)
- @list='$(nodist_perllib_DATA)'; \
+ @list='$(nodist_perllib_DATA)'; test -n "$(perllibdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \
echo " ( cd '$(DESTDIR)$(perllibdir)' && rm -f" $$files ")"; \
diff --git a/lib/Makefile.in b/lib/Makefile.in
index 3aaab7e90..a799aa8fb 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -253,7 +253,8 @@ $(am__aclocal_m4_deps):
install-dist_pkgvdataDATA: $(dist_pkgvdata_DATA)
@$(NORMAL_INSTALL)
test -z "$(pkgvdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgvdatadir)"
- @list='$(dist_pkgvdata_DATA)'; for p in $$list; do \
+ @list='$(dist_pkgvdata_DATA)'; test -n "$(pkgvdatadir)" || list=; \
+ for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
@@ -264,7 +265,7 @@ install-dist_pkgvdataDATA: $(dist_pkgvdata_DATA)
uninstall-dist_pkgvdataDATA:
@$(NORMAL_UNINSTALL)
- @list='$(dist_pkgvdata_DATA)'; \
+ @list='$(dist_pkgvdata_DATA)'; test -n "$(pkgvdatadir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \
echo " ( cd '$(DESTDIR)$(pkgvdatadir)' && rm -f" $$files ")"; \
@@ -272,7 +273,8 @@ uninstall-dist_pkgvdataDATA:
install-dist_scriptDATA: $(dist_script_DATA)
@$(NORMAL_INSTALL)
test -z "$(scriptdir)" || $(MKDIR_P) "$(DESTDIR)$(scriptdir)"
- @list='$(dist_script_DATA)'; for p in $$list; do \
+ @list='$(dist_script_DATA)'; test -n "$(scriptdir)" || list=; \
+ for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
@@ -283,7 +285,7 @@ install-dist_scriptDATA: $(dist_script_DATA)
uninstall-dist_scriptDATA:
@$(NORMAL_UNINSTALL)
- @list='$(dist_script_DATA)'; \
+ @list='$(dist_script_DATA)'; test -n "$(scriptdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \
echo " ( cd '$(DESTDIR)$(scriptdir)' && rm -f" $$files ")"; \
diff --git a/lib/am/Makefile.in b/lib/am/Makefile.in
index c61b2bc66..75e58e152 100644
--- a/lib/am/Makefile.in
+++ b/lib/am/Makefile.in
@@ -242,7 +242,8 @@ $(am__aclocal_m4_deps):
install-dist_amDATA: $(dist_am_DATA)
@$(NORMAL_INSTALL)
test -z "$(amdir)" || $(MKDIR_P) "$(DESTDIR)$(amdir)"
- @list='$(dist_am_DATA)'; for p in $$list; do \
+ @list='$(dist_am_DATA)'; test -n "$(amdir)" || list=; \
+ for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
@@ -253,7 +254,7 @@ install-dist_amDATA: $(dist_am_DATA)
uninstall-dist_amDATA:
@$(NORMAL_UNINSTALL)
- @list='$(dist_am_DATA)'; \
+ @list='$(dist_am_DATA)'; test -n "$(amdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \
echo " ( cd '$(DESTDIR)$(amdir)' && rm -f" $$files ")"; \
diff --git a/lib/am/data.am b/lib/am/data.am
index 62383fa9f..3e0eec334 100644
--- a/lib/am/data.am
+++ b/lib/am/data.am
@@ -1,6 +1,6 @@
## automake - create Makefile.in from Makefile.am
## Copyright (C) 1994, 1995, 1996, 1998, 1999, 2001, 2003, 2004, 2006,
-## 2007, 2008 Free Software Foundation, Inc.
+## 2007, 2008, 2009 Free Software Foundation, Inc.
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
@@ -32,7 +32,8 @@ install-%DIR%%PRIMARY%: $(%DIR%_%PRIMARY%)
if %?BASE%
## Funny invocation because Makefile variable can be empty, leading to
## a syntax error in sh.
- @list='$(%DIR%_%PRIMARY%)'; for p in $$list; do \
+ @list='$(%DIR%_%PRIMARY%)'; test -n "$(%NDIR%dir)" || list=; \
+ for p in $$list; do \
## A file can be in the source directory or the build directory.
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
## If the _%PRIMARY% variable has an entry like foo/bar, install it as
@@ -45,8 +46,8 @@ if %?BASE%
$(INSTALL_%ONE_PRIMARY%) $$files "$(DESTDIR)$(%NDIR%dir)" || exit $$?; \
done
else !%?BASE%
- @list='$(%DIR%_%PRIMARY%)'; $(am__nobase_list) | \
- while read dir files; do \
+ @list='$(%DIR%_%PRIMARY%)'; test -n "$(%NDIR%dir)" || list=; \
+ $(am__nobase_list) | while read dir files; do \
xfiles=; for file in $$files; do \
if test -f "$$file"; then xfiles="$$xfiles $$file"; \
else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \
@@ -69,7 +70,7 @@ if %?INSTALL%
.PHONY uninstall-am: uninstall-%DIR%%PRIMARY%
uninstall-%DIR%%PRIMARY%:
@$(NORMAL_UNINSTALL)
- @list='$(%DIR%_%PRIMARY%)'; \
+ @list='$(%DIR%_%PRIMARY%)'; test -n "$(%NDIR%dir)" || list=; \
?BASE? files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
?!BASE? $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \
test -n "$$files" || exit 0; \
diff --git a/lib/am/java.am b/lib/am/java.am
index f183bee20..7ec62ae5d 100644
--- a/lib/am/java.am
+++ b/lib/am/java.am
@@ -1,5 +1,5 @@
## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1998, 1999, 2001, 2003, 2004, 2006, 2008 Free Software
+## Copyright (C) 1998, 1999, 2001, 2003, 2004, 2006, 2008, 2009 Free Software
## Foundation, Inc.
## This program is free software; you can redistribute it and/or modify
@@ -50,7 +50,7 @@ install-%DIR%JAVA: class%DIR%.stamp
## A single .java file can be compiled into multiple .class files. So
## we just install all the .class files that got built into this
## directory. This is not optimal, but will have to do for now.
- @test -n "$(%DIR%_JAVA)" || exit 0; \
+ @test -n "$(%DIR%_JAVA)" && test -n "$(%NDIR%dir)" || exit 0; \
set x *.class; shift; test "$$1" != "*.class" || exit 0; \
echo " $(INSTALL_DATA)" "$$@" "'$(DESTDIR)$(%NDIR%dir)/$$p'"; \
$(INSTALL_DATA) "$$@" "$(DESTDIR)$(%NDIR%dir)"
@@ -65,7 +65,7 @@ if %?INSTALL%
.PHONY uninstall-am: uninstall-%DIR%JAVA
uninstall-%DIR%JAVA:
@$(NORMAL_UNINSTALL)
- @test -n "$(%DIR%_JAVA)" || exit 0; \
+ @test -n "$(%DIR%_JAVA)" && test -n "$(%NDIR%dir)" || exit 0; \
set x *.class; shift; test "$$1" != "*.class" || exit 0; \
echo " ( cd '$(DESTDIR)$(%NDIR%dir)' && rm -f" "$$@" ")"; \
cd "$(DESTDIR)$(%NDIR%dir)" && rm -f "$$@"
diff --git a/lib/am/libs.am b/lib/am/libs.am
index ee0061eb0..c92eff755 100644
--- a/lib/am/libs.am
+++ b/lib/am/libs.am
@@ -1,6 +1,6 @@
## automake - create Makefile.in from Makefile.am
## Copyright (C) 1994, 1995, 1996, 1998, 1999, 2001, 2002, 2003, 2004, 2006,
-## 2007, 2008 Free Software Foundation, Inc.
+## 2007, 2008, 2009 Free Software Foundation, Inc.
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
@@ -32,7 +32,8 @@ install-%DIR%LIBRARIES: $(%DIR%_LIBRARIES)
if %?BASE%
## Funny invocation because Makefile variable can be empty, leading to
## a syntax error in sh.
- @list='$(%DIR%_LIBRARIES)'; list2=; for p in $$list; do \
+ @list='$(%DIR%_LIBRARIES)'; test -n "$(%NDIR%dir)" || list=; \
+ list2=; for p in $$list; do \
if test -f $$p; then \
list2="$$list2 $$p"; \
else :; fi; \
@@ -43,8 +44,8 @@ if %?BASE%
else !%?BASE%
## Funny invocation because Makefile variable can be empty, leading to
## a syntax error in sh.
- @list='$(%DIR%_LIBRARIES)'; $(am__nobase_list) | \
- while read dir files; do \
+ @list='$(%DIR%_LIBRARIES)'; test -n "$(%NDIR%dir)" || list=; \
+ $(am__nobase_list) | while read dir files; do \
xfiles=; for p in $$files; do \
if test -f "$$p"; then xfiles="$$xfiles $$p"; else :; fi; done; \
test -z "$$xfiles" || { \
@@ -61,7 +62,8 @@ endif !%?BASE%
## useless; sh never actually executes this command. Read the GNU
## Standards for a little enlightenment on this.
@$(POST_INSTALL)
- @list='$(%DIR%_LIBRARIES)'; for p in $$list; do \
+ @list='$(%DIR%_LIBRARIES)'; test -n "$(%NDIR%dir)" || list=; \
+ for p in $$list; do \
if test -f $$p; then \
%BASE?$(am__strip_dir):f=$$p;% \
## Must ranlib after installing because mod time changes.
@@ -82,7 +84,7 @@ if %?INSTALL%
.PHONY uninstall-am: uninstall-%DIR%LIBRARIES
uninstall-%DIR%LIBRARIES:
@$(NORMAL_UNINSTALL)
- @list='$(%DIR%_LIBRARIES)'; \
+ @list='$(%DIR%_LIBRARIES)'; test -n "$(%NDIR%dir)" || list=; \
?BASE? files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
?!BASE? $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \
test -n "$$files" || exit 0; \
diff --git a/lib/am/lisp.am b/lib/am/lisp.am
index bda2bccf9..4cbf6306c 100644
--- a/lib/am/lisp.am
+++ b/lib/am/lisp.am
@@ -1,6 +1,6 @@
## automake - create Makefile.in from Makefile.am
## Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-## 2007, 2008 Free Software Foundation, Inc.
+## 2007, 2008, 2009 Free Software Foundation, Inc.
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
@@ -85,8 +85,8 @@ am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
install-%DIR%LISP: $(%DIR%_LISP) $(ELCFILES)
@$(NORMAL_INSTALL)
## Do not install anything if EMACS was not found.
- @if test "$(EMACS)" != no; then \
- test -z "$(%NDIR%dir)" || $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)"; \
+ @if test "$(EMACS)" != no && test -n "$(%NDIR%dir)"; then \
+ $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)"; \
?!BASE? $(am__vpath_adj_setup) \
## Funny invocation because Makefile variable can be empty, leading to
## a syntax error in sh.
@@ -115,7 +115,7 @@ if %?INSTALL%
uninstall-%DIR%LISP:
@$(NORMAL_UNINSTALL)
## Do not uninstall anything if EMACS was not found.
- @test "$(EMACS)" != no || exit 0; \
+ @test "$(EMACS)" != no && test -n "$(%NDIR%dir)" || exit 0; \
list='$(%DIR%_LISP)'; \
?BASE? files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
?!BASE? $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \
diff --git a/lib/am/ltlib.am b/lib/am/ltlib.am
index 08e055dc8..5788f7870 100644
--- a/lib/am/ltlib.am
+++ b/lib/am/ltlib.am
@@ -1,6 +1,6 @@
## automake - create Makefile.in from Makefile.am
## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2003, 2004,
-## 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+## 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
@@ -32,7 +32,8 @@ install-%DIR%LTLIBRARIES: $(%DIR%_LTLIBRARIES)
if %?BASE%
## Funny invocation because Makefile variable can be empty, leading to
## a syntax error in sh.
- @list='$(%DIR%_LTLIBRARIES)'; list2=; for p in $$list; do \
+ @list='$(%DIR%_LTLIBRARIES)'; test -n "$(%NDIR%dir)" || list=; \
+ list2=; for p in $$list; do \
if test -f $$p; then \
list2="$$list2 $$p"; \
else :; fi; \
@@ -48,8 +49,8 @@ if %?BASE%
?!LIBTOOL? $(INSTALL) $(INSTALL_STRIP_FLAG) $$list "$(DESTDIR)$(%NDIR%dir)"; \
}
else !%?BASE%
- @list='$(%DIR%_LTLIBRARIES)'; for p in $$list; do \
- if test -f "$$p"; then echo "$$p $$p"; else :; fi; done | \
+ @list='$(%DIR%_LTLIBRARIES)'; test -n "$(%NDIR%dir)" || list=; \
+ for p in $$list; do if test -f "$$p"; then echo "$$p $$p"; else :; fi; done | \
sed '/ .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { cur = "." } \
{ if ($$2 == cur) { files = files " " $$1 } \
@@ -82,7 +83,8 @@ if %?INSTALL%
.PHONY uninstall-am: uninstall-%DIR%LTLIBRARIES
uninstall-%DIR%LTLIBRARIES:
@$(NORMAL_UNINSTALL)
- @list='$(%DIR%_LTLIBRARIES)'; for p in $$list; do \
+ @list='$(%DIR%_LTLIBRARIES)'; test -n "$(%NDIR%dir)" || list=; \
+ for p in $$list; do \
%BASE?$(am__strip_dir):f=$$p;% \
?LIBTOOL? echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(%NDIR%dir)/$$f'"; \
?LIBTOOL? $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(%NDIR%dir)/$$f"; \
diff --git a/lib/am/mans.am b/lib/am/mans.am
index d3891451f..1828c5da9 100644
--- a/lib/am/mans.am
+++ b/lib/am/mans.am
@@ -34,7 +34,7 @@ install-man%SECTION%: %DEPS%
test -z "$(man%SECTION%dir)" || $(MKDIR_P) "$(DESTDIR)$(man%SECTION%dir)"
if %?NOTRANS_MANS%
## Handle MANS with notrans_ prefix
- @list='%NOTRANS_SECT_LIST%'; \
+ @list='%NOTRANS_SECT_LIST%'; test -n "$(man%SECTION%dir)" || exit 0; \
{ for i in $$list; do echo "$$i"; done; \
## Extract all items from notrans_man_MANS that should go in this section.
## This must be done dynamically to support conditionals.
@@ -66,7 +66,7 @@ if %?NOTRANS_MANS%
endif %?NOTRANS_MANS%
if %?TRANS_MANS%
## Handle MANS without notrans_ prefix
- @list='%TRANS_SECT_LIST%'; \
+ @list='%TRANS_SECT_LIST%'; test -n "$(man%SECTION%dir)" || exit 0; \
{ for i in $$list; do echo "$$i"; done; \
## Extract all items from notrans_man_MANS that should go in this section.
## This must be done dynamically to support conditionals.
@@ -110,7 +110,7 @@ uninstall-man%SECTION%:
@$(NORMAL_UNINSTALL)
if %?NOTRANS_MANS%
## Handle MANS with notrans_ prefix
- @list='%NOTRANS_SECT_LIST%'; \
+ @list='%NOTRANS_SECT_LIST%'; test -n "$(man%SECTION%dir)" || exit 0; \
files=`{ for i in $$list; do echo "$$i"; done; \
## Extract all items from notrans_man_MANS that should go in this section.
## This must be done dynamically to support conditionals.
@@ -125,7 +125,7 @@ if %?NOTRANS_MANS%
endif %?NOTRANS_MANS%
if %?TRANS_MANS%
## Handle MANS without notrans_ prefix
- @list='%TRANS_SECT_LIST%'; \
+ @list='%TRANS_SECT_LIST%'; test -n "$(man%SECTION%dir)" || exit 0; \
files=`{ for i in $$list; do echo "$$i"; done; \
## Extract all items from man_MANS that should go in this section.
## This must be done dynamically to support conditionals.
diff --git a/lib/am/progs.am b/lib/am/progs.am
index 114407f48..64f754309 100644
--- a/lib/am/progs.am
+++ b/lib/am/progs.am
@@ -1,6 +1,6 @@
## automake - create Makefile.in from Makefile.am
## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2003, 2004,
-## 2006, 2007, 2008 Free Software Foundation, Inc.
+## 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
@@ -27,7 +27,7 @@ install-%DIR%PROGRAMS: $(%DIR%_PROGRAMS)
test -z "$(%NDIR%dir)" || $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)"
## Funny invocation because Makefile variable can be empty, leading to
## a syntax error in sh.
- @list='$(%DIR%_PROGRAMS)'; \
+ @list='$(%DIR%_PROGRAMS)'; test -n "$(%NDIR%dir)" || list=; \
for p in $$list; do echo "$$p $$p"; done | \
## On Cygwin with libtool test won't see `foo.exe' but instead `foo'.
## So we check for both.
@@ -78,7 +78,7 @@ if %?INSTALL%
.PHONY uninstall-am: uninstall-%DIR%PROGRAMS
uninstall-%DIR%PROGRAMS:
@$(NORMAL_UNINSTALL)
- @list='$(%DIR%_PROGRAMS)'; \
+ @list='$(%DIR%_PROGRAMS)'; test -n "$(%NDIR%dir)" || list=; \
files=`for p in $$list; do echo "$$p"; done | \
## Remove any leading directory before applying $(transform),
## but keep the directory part in the hold buffer, in order to
diff --git a/lib/am/python.am b/lib/am/python.am
index 704745230..70beba45f 100644
--- a/lib/am/python.am
+++ b/lib/am/python.am
@@ -1,6 +1,6 @@
## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1999, 2001, 2003, 2004, 2006, 2007, 2008 Free Software
-## Foundation, Inc.
+## Copyright (C) 1999, 2001, 2003, 2004, 2006, 2007, 2008, 2009 Free
+## Software Foundation, Inc.
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
@@ -30,7 +30,8 @@ install-%DIR%PYTHON: $(%DIR%_PYTHON)
@$(NORMAL_INSTALL)
test -z "$(%NDIR%dir)" || $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)"
if %?BASE%
- @list='$(%DIR%_PYTHON)'; dlist=''; list2=''; for p in $$list; do\
+ @list='$(%DIR%_PYTHON)'; dlist=; list2=; test -n "$(%NDIR%dir)" || list=; \
+ for p in $$list; do \
## A file can be in the source directory or the build directory.
if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
if test -f $$b$$p; then \
@@ -58,8 +59,8 @@ if %?BASE%
fi; \
else :; fi
else !%?BASE%
- @list='$(%DIR%_PYTHON)'; $(am__nobase_list) | \
- while read dir files; do \
+ @list='$(%DIR%_PYTHON)'; test -n "$(%NDIR%dir)" || list=; \
+ $(am__nobase_list) | while read dir files; do \
xfiles=; for p in $$files; do \
## A file can be in the source directory or the build directory.
if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
@@ -94,7 +95,7 @@ if %?INSTALL%
.PHONY uninstall-am: uninstall-%DIR%PYTHON
uninstall-%DIR%PYTHON:
@$(NORMAL_UNINSTALL)
- @list='$(%DIR%_PYTHON)'; \
+ @list='$(%DIR%_PYTHON)'; test -n "$(%NDIR%dir)" || list=; \
?BASE? files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
?!BASE? $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \
test -n "$$files" || exit 0; \
diff --git a/lib/am/scripts.am b/lib/am/scripts.am
index b8e61c961..cba6b633b 100644
--- a/lib/am/scripts.am
+++ b/lib/am/scripts.am
@@ -1,6 +1,6 @@
## automake - create Makefile.in from Makefile.am
## Copyright (C) 1994, 1995, 1996, 1998, 1999, 2001, 2003, 2004, 2006, 2007,
-## 2008 Free Software Foundation, Inc.
+## 2008, 2009 Free Software Foundation, Inc.
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
@@ -32,7 +32,7 @@ install-%DIR%SCRIPTS: $(%DIR%_SCRIPTS)
test -z "$(%NDIR%dir)" || $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)"
## Funny invocation because Makefile variable can be empty, leading to
## a syntax error in sh.
- @list='$(%DIR%_SCRIPTS)'; \
+ @list='$(%DIR%_SCRIPTS)'; test -n "$(%NDIR%dir)" || list=; \
?!BASE? $(am__nobase_strip_setup); \
for p in $$list; do \
## A file can be in the source directory or the build directory.
@@ -77,7 +77,7 @@ if %?INSTALL%
.PHONY uninstall-am: uninstall-%DIR%SCRIPTS
uninstall-%DIR%SCRIPTS:
@$(NORMAL_UNINSTALL)
- @list='$(%DIR%_SCRIPTS)'; \
+ @list='$(%DIR%_SCRIPTS)'; test -n "$(%NDIR%dir)" || exit 0; \
?BASE? files=`for p in $$list; do echo "$$p"; done | \
?BASE? sed -e 's,.*/,,;$(transform)'`; \
?!BASE? $(am__nobase_strip_setup); \
diff --git a/lib/am/texinfos.am b/lib/am/texinfos.am
index 382a7c874..e9a848347 100644
--- a/lib/am/texinfos.am
+++ b/lib/am/texinfos.am
@@ -1,7 +1,7 @@
## automake - create Makefile.in from Makefile.am
## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-## 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+## 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
@@ -144,7 +144,8 @@ include inst-vars.am
install-dvi-am: $(DVIS)
@$(NORMAL_INSTALL)
test -z "$(dvidir)" || $(MKDIR_P) "$(DESTDIR)$(dvidir)"
- @list='$(DVIS)'; for p in $$list; do \
+ @list='$(DVIS)'; test -n "$(dvidir)" || list=; \
+ for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
@@ -156,7 +157,8 @@ install-dvi-am: $(DVIS)
install-html-am: $(HTMLS)
@$(NORMAL_INSTALL)
test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)"
- @list='$(HTMLS)'; list2=; for p in $$list; do \
+ @list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \
+ for p in $$list; do \
if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \
$(am__strip_dir) \
if test -d "$$d$$p"; then \
@@ -178,7 +180,7 @@ install-info-am: $(INFO_DEPS)
@$(NORMAL_INSTALL)
test -z "$(infodir)" || $(MKDIR_P) "$(DESTDIR)$(infodir)"
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- list='$(INFO_DEPS)'; \
+ list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
for file in $$list; do \
## Strip possible $(srcdir) prefix.
case $$file in \
@@ -218,7 +220,7 @@ install-info-am: $(INFO_DEPS)
## therefore the code will be triggered although install-info is missing.
@if (install-info --version && \
install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
- list='$(INFO_DEPS)'; \
+ list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
for file in $$list; do \
## Strip directory
relfile=`echo "$$file" | sed 's|^.*/||'`; \
@@ -237,7 +239,8 @@ install-info-am: $(INFO_DEPS)
install-pdf-am: $(PDFS)
@$(NORMAL_INSTALL)
test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)"
- @list='$(PDFS)'; for p in $$list; do \
+ @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
+ for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
@@ -248,7 +251,8 @@ install-pdf-am: $(PDFS)
install-ps-am: $(PSS)
@$(NORMAL_INSTALL)
test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)"
- @list='$(PSS)'; for p in $$list; do \
+ @list='$(PSS)'; test -n "$(psdir)" || list=; \
+ for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
@@ -279,7 +283,8 @@ if %?LOCAL-TEXIS%
uninstall-dvi-am:
@$(NORMAL_UNINSTALL)
- @list='$(DVIS)'; for p in $$list; do \
+ @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"; \
@@ -287,7 +292,8 @@ uninstall-dvi-am:
uninstall-html-am:
@$(NORMAL_UNINSTALL)
- @list='$(HTMLS)'; for p in $$list; do \
+ @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'"; \
@@ -327,7 +333,8 @@ uninstall-info-am:
uninstall-pdf-am:
@$(NORMAL_UNINSTALL)
- @list='$(PDFS)'; for p in $$list; do \
+ @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"; \
@@ -335,7 +342,8 @@ uninstall-pdf-am:
uninstall-ps-am:
@$(NORMAL_UNINSTALL)
- @list='$(PSS)'; for p in $$list; do \
+ @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"; \
diff --git a/m4/Makefile.in b/m4/Makefile.in
index 5b4eb2333..972b980bd 100644
--- a/m4/Makefile.in
+++ b/m4/Makefile.in
@@ -239,7 +239,8 @@ $(am__aclocal_m4_deps):
install-dist_m4dataDATA: $(dist_m4data_DATA)
@$(NORMAL_INSTALL)
test -z "$(m4datadir)" || $(MKDIR_P) "$(DESTDIR)$(m4datadir)"
- @list='$(dist_m4data_DATA)'; for p in $$list; do \
+ @list='$(dist_m4data_DATA)'; test -n "$(m4datadir)" || list=; \
+ for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
@@ -250,7 +251,7 @@ install-dist_m4dataDATA: $(dist_m4data_DATA)
uninstall-dist_m4dataDATA:
@$(NORMAL_UNINSTALL)
- @list='$(dist_m4data_DATA)'; \
+ @list='$(dist_m4data_DATA)'; test -n "$(m4datadir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \
echo " ( cd '$(DESTDIR)$(m4datadir)' && rm -f" $$files ")"; \
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 4b32ad039..027e3f5c5 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -310,6 +310,13 @@ instsh3.test \
instdat.test \
instdat2.test \
instdir.test \
+instdir2.test \
+instdir-java.test \
+instdir-lisp.test \
+instdir-ltlib.test \
+instdir-prog.test \
+instdir-python.test \
+instdir-texi.test \
instexec.test \
instfail.test \
instfail-info.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index e1df612d7..138e043fd 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -465,6 +465,13 @@ instsh3.test \
instdat.test \
instdat2.test \
instdir.test \
+instdir2.test \
+instdir-java.test \
+instdir-lisp.test \
+instdir-ltlib.test \
+instdir-prog.test \
+instdir-python.test \
+instdir-texi.test \
instexec.test \
instfail.test \
instfail-info.test \
diff --git a/tests/instdir-java.test b/tests/instdir-java.test
new file mode 100755
index 000000000..54826c8f9
--- /dev/null
+++ b/tests/instdir-java.test
@@ -0,0 +1,59 @@
+#! /bin/sh
+# Copyright (C) 2009 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# If $(javadir) is the empty string, then nothing should be installed there.
+
+required=gcj
+. ./defs || Exit 1
+
+set -e
+
+cat >>configure.in <<'END'
+AC_OUTPUT
+END
+
+cat >Makefile.am <<'END'
+java_JAVA = foo.java
+END
+
+cat >foo.java <<'END'
+class foo {
+}
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+instdir=`pwd`/inst
+destdir=`pwd`/dest
+mkdir build
+cd build
+../configure --prefix="$instdir"
+$MAKE
+
+javadir=
+export javadir
+$MAKE -e install
+test ! -d "$instdir"
+$MAKE -e install DESTDIR="$destdir"
+test ! -d "$instdir"
+test ! -d "$destdir"
+$MAKE -e uninstall > stdout || { cat stdout; Exit 1; }
+cat stdout
+grep 'rm -f' stdout && Exit 1
+$MAKE -e uninstall DESTDIR="$destdir"
+:
diff --git a/tests/instdir-lisp.test b/tests/instdir-lisp.test
new file mode 100755
index 000000000..849b86ae6
--- /dev/null
+++ b/tests/instdir-lisp.test
@@ -0,0 +1,58 @@
+#! /bin/sh
+# Copyright (C) 2009 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# If $(lispdir) is the empty string, then nothing should be installed there.
+
+required=emacs
+. ./defs || Exit 1
+
+set -e
+
+cat >>configure.in <<'END'
+AM_PATH_LISPDIR
+AC_OUTPUT
+END
+
+cat >Makefile.am <<'END'
+lisp_LISP = l.el
+END
+
+: >l.el
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+instdir=`pwd`/inst
+destdir=`pwd`/dest
+mkdir build
+cd build
+../configure --prefix="$instdir"
+$MAKE
+
+lispdir=
+export lispdir
+
+$MAKE -e install
+test ! -d "$instdir"
+$MAKE -e install DESTDIR="$destdir"
+test ! -d "$instdir"
+test ! -d "$destdir"
+$MAKE -e uninstall > stdout || { cat stdout; Exit 1; }
+cat stdout
+grep 'rm -f' stdout && Exit 1
+$MAKE -e uninstall DESTDIR="$destdir"
+:
diff --git a/tests/instdir-ltlib.test b/tests/instdir-ltlib.test
new file mode 100755
index 000000000..315d2a0da
--- /dev/null
+++ b/tests/instdir-ltlib.test
@@ -0,0 +1,74 @@
+#! /bin/sh
+# Copyright (C) 2009 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# If $(libdir) is the empty string, then nothing should be installed there.
+# This test exercises the libtool code paths.
+
+required=libtoolize
+. ./defs || Exit 1
+
+set -e
+
+cat >>configure.in <<'END'
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_PROG_LIBTOOL
+AC_OUTPUT
+END
+
+mkdir sub
+
+cat >Makefile.am <<'END'
+AUTOMAKE_OPTIONS = subdir-objects
+bin_PROGRAMS = p
+nobase_bin_PROGRAMS = np sub/np
+lib_LTIBRARIES = libfoo.la
+nobase_lib_LTLIBRARIES = libnfoo.la sub/libnfoo.la
+END
+
+cat >p.c <<'END'
+int main () { return 0; }
+END
+cp p.c np.c
+cp p.c sub/np.c
+cp p.c libfoo.c
+cp p.c libnfoo.c
+cp p.c sub/libnfoo.c
+
+libtoolize
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+instdir=`pwd`/inst
+destdir=`pwd`/dest
+mkdir build
+cd build
+../configure --prefix="$instdir"
+$MAKE
+
+bindir= libdir=
+export bindir libdir
+$MAKE -e install
+test ! -d "$instdir"
+$MAKE -e install DESTDIR="$destdir"
+test ! -d "$instdir"
+test ! -d "$destdir"
+$MAKE -e uninstall > stdout || { cat stdout; Exit 1; }
+cat stdout
+grep 'rm -f' stdout && Exit 1
+$MAKE -e uninstall DESTDIR="$destdir"
+:
diff --git a/tests/instdir-prog.test b/tests/instdir-prog.test
new file mode 100755
index 000000000..14a910b9d
--- /dev/null
+++ b/tests/instdir-prog.test
@@ -0,0 +1,72 @@
+#! /bin/sh
+# Copyright (C) 2009 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# If $(bindir) is the empty string, then nothing should be installed there.
+# This test exercises the prog and libs code paths.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >>configure.in <<'END'
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_PROG_RANLIB
+AC_OUTPUT
+END
+
+mkdir sub
+
+cat >Makefile.am <<'END'
+AUTOMAKE_OPTIONS = subdir-objects
+bin_PROGRAMS = p
+nobase_bin_PROGRAMS = np sub/np
+lib_LIBRARIES = libfoo.a
+nobase_lib_LIBRARIES = libnfoo.a sub/libnfoo.a
+END
+
+cat >p.c <<'END'
+int main () { return 0; }
+END
+cp p.c np.c
+cp p.c sub/np.c
+cp p.c libfoo.c
+cp p.c libnfoo.c
+cp p.c sub/libnfoo.c
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+instdir=`pwd`/inst
+destdir=`pwd`/dest
+mkdir build
+cd build
+../configure --prefix="$instdir"
+$MAKE
+
+bindir= libdir=
+export bindir libdir
+$MAKE -e install
+test ! -d "$instdir"
+$MAKE -e install DESTDIR="$destdir"
+test ! -d "$instdir"
+test ! -d "$destdir"
+$MAKE -e uninstall > stdout || { cat stdout; Exit 1; }
+cat stdout
+grep 'rm -f' stdout && Exit 1
+$MAKE -e uninstall DESTDIR="$destdir"
+:
diff --git a/tests/instdir-python.test b/tests/instdir-python.test
new file mode 100755
index 000000000..d2cc5862c
--- /dev/null
+++ b/tests/instdir-python.test
@@ -0,0 +1,62 @@
+#! /bin/sh
+# Copyright (C) 2009 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# If $(pythondir) is the empty string, then nothing should be installed there.
+
+required=python
+. ./defs || Exit 1
+
+set -e
+
+cat >>configure.in <<'END'
+AM_PATH_PYTHON
+AC_OUTPUT
+END
+
+mkdir sub
+
+cat >Makefile.am <<'END'
+python_PYTHON = one.py
+END
+
+cat >one.py <<'END'
+def one(): return 1
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+instdir=`pwd`/inst
+destdir=`pwd`/dest
+mkdir build
+cd build
+../configure --prefix="$instdir"
+$MAKE
+
+pythondir=
+export pythondir
+
+$MAKE -e install
+test ! -d "$instdir"
+$MAKE -e install DESTDIR="$destdir"
+test ! -d "$instdir"
+test ! -d "$destdir"
+$MAKE -e uninstall > stdout || { cat stdout; Exit 1; }
+cat stdout
+grep 'rm -f' stdout && Exit 1
+$MAKE -e uninstall DESTDIR="$destdir"
+:
diff --git a/tests/instdir-texi.test b/tests/instdir-texi.test
new file mode 100755
index 000000000..747dd3139
--- /dev/null
+++ b/tests/instdir-texi.test
@@ -0,0 +1,70 @@
+#! /bin/sh
+# Copyright (C) 2009 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# If $(infodir) is the empty string, then nothing should be installed there.
+# Likewise for the other install-* targets used for texinfo files.
+
+required='makeinfo-html tex texi2dvi'
+. ./defs || Exit 1
+
+(dvips --help 2>/dev/null >/dev/null) || Exit 77
+(pdfetex --help 2>/dev/null >/dev/null) ||
+ (pdftex --help 2>/dev/null >/dev/null) || Exit 77
+
+set -e
+
+cat >>configure.in <<'END'
+AC_OUTPUT
+END
+
+cat >Makefile.am <<'END'
+info_TEXINFOS = foo.texi
+END
+
+cat >foo.texi << 'END'
+\input texinfo
+@setfilename foo.info
+@settitle foo
+@node Top
+Hello walls.
+@include version.texi
+@bye
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+instdir=`pwd`/inst
+destdir=`pwd`/dest
+mkdir build
+cd build
+../configure --prefix="$instdir"
+$MAKE all dvi ps pdf html
+
+infodir= htmldir= dvidir= psdir= pdfdir=
+export infodir htmldir dvidir psdir pdfdir
+
+$MAKE -e install install-html install-dvi install-ps install-pdf
+test ! -d "$instdir"
+$MAKE -e install install-html install-dvi install-ps install-pdf DESTDIR="$destdir"
+test ! -d "$instdir"
+test ! -d "$destdir"
+$MAKE -e uninstall > stdout || { cat stdout; Exit 1; }
+cat stdout
+grep 'rm -f' stdout && Exit 1
+$MAKE -e uninstall DESTDIR="$destdir"
+:
diff --git a/tests/instdir2.test b/tests/instdir2.test
new file mode 100755
index 000000000..df2257487
--- /dev/null
+++ b/tests/instdir2.test
@@ -0,0 +1,93 @@
+#! /bin/sh
+# Copyright (C) 2009 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# If $(foodir) is the empty string, then nothing should be installed there.
+# This test ensures this also if $(foo_PRIMARY) is nonempty, see
+# instdir.test.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >>configure.in <<'END'
+AC_SUBST([foodir], ['${datadir}'/foo])
+AC_OUTPUT
+END
+
+mkdir sub
+
+cat >Makefile.am <<'END'
+bin_SCRIPTS = s
+nobase_bin_SCRIPTS = ns sub/ns
+data_DATA = d
+nobase_data_DATA = nd sub/nd
+include_HEADERS = h
+nobase_include_HEADERS = nh sub/nh
+foo_DATA = f
+nobase_foo_DATA = nf sub/nf
+bardir = $(datadir)/bar
+bar_DATA = b
+nobase_bar_DATA = nb sub/nb
+man1_MANS = m1.1
+man_MANS = m.2
+notrans_man1_MANS = nm1.1
+notrans_man_MANS = nm.2
+END
+
+: >s
+: >ns
+: >sub/ns
+: >d
+: >nd
+: >sub/nd
+: >h
+: >nh
+: >sub/nh
+: >f
+: >nf
+: >sub/nf
+: >b
+: >nb
+: >sub/nb
+: >m1.1
+: >m.2
+: >nm1.1
+: >nm.2
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+instdir=`pwd`/inst
+destdir=`pwd`/dest
+mkdir build
+cd build
+../configure --prefix="$instdir"
+$MAKE
+
+bindir= datadir= includedir= foodir= bardir= man1dir= man2dir=
+export bindir datadir includedir foodir bardir man1dir man2dir
+
+$MAKE -e install
+test ! -d "$instdir"
+$MAKE -e install DESTDIR="$destdir"
+test ! -d "$instdir"
+test ! -d "$destdir"
+$MAKE -e uninstall > stdout || { cat stdout; Exit 1; }
+cat stdout
+grep 'rm -f' stdout && Exit 1
+$MAKE -e uninstall DESTDIR="$destdir"
+: