[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-commit] [SCM] GNU Automake branch, testsuite-work, updated. v1
From: |
Stefano Lattarini |
Subject: |
[Automake-commit] [SCM] GNU Automake branch, testsuite-work, updated. v1.11-1432-g8ccc53c |
Date: |
Wed, 28 Sep 2011 10:51:41 +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=8ccc53c4c49a7443c4d0a32cb742ec7793cd1cd6
The branch, testsuite-work has been updated
via 8ccc53c4c49a7443c4d0a32cb742ec7793cd1cd6 (commit)
via f67e562db4a8a4b94af30e30e7f3f709f89bd0e1 (commit)
via 58d91b7f376198d4a6553ba36f888fe47c2b6003 (commit)
via c4f363ff3d699eaa6b1e1cc079d33749957934c9 (commit)
via eae5cfa9b373ee19b2768957b53dbe53a586b69e (commit)
via 22e59ff1918b4165665d206a311f07dea264c83a (commit)
via b9fa1fc1eb50d7907764ec0972a674548a7bd8b3 (commit)
via 33805241126d1b087eb8af401a5f84cb33e88a3d (commit)
from 27a399a94c622996b6d2d72ef76e442f532c0be7 (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 8ccc53c4c49a7443c4d0a32cb742ec7793cd1cd6
Merge: 27a399a f67e562
Author: Stefano Lattarini <address@hidden>
Date: Wed Sep 28 11:28:27 2011 +0200
Merge branch 'test-protocols' into testsuite-work
* test-protocols:
uninstall: "make uninstall" before "make install" works
tests: fix tests on aclocal search path precedences
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 26 ++++++++
Makefile.in | 10 ++-
NEWS | 4 +
THANKS | 1 +
doc/Makefile.in | 14 +++--
lib/Automake/Makefile.in | 14 +++--
lib/Automake/tests/Makefile.in | 6 ++
lib/Makefile.in | 14 +++--
lib/am/Makefile.in | 10 ++-
lib/am/data.am | 4 +-
lib/am/inst-vars.am | 18 +++++
lib/am/libs.am | 4 +-
lib/am/lisp.am | 8 +--
lib/am/mans.am | 8 +--
lib/am/python.am | 15 ++---
lib/am/scripts.am | 4 +-
m4/Makefile.in | 14 +++--
tests/Makefile.in | 8 +++
tests/aclocal-path-precedence.test | 2 +-
tests/list-of-tests.mk | 2 +
tests/{java-check.test => uninstall-fail.test} | 56 ++++++++--------
tests/{java-sources.test => uninstall-pr9578.test} | 66 ++++++++++---------
22 files changed, 189 insertions(+), 119 deletions(-)
copy tests/{java-check.test => uninstall-fail.test} (51%)
copy tests/{java-sources.test => uninstall-pr9578.test} (50%)
diff --git a/ChangeLog b/ChangeLog
index 607c5c5..4f6a3cd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,29 @@
+2011-09-24 Stefano Lattarini <address@hidden>
+
+ uninstall: "make uninstall" before "make install" works
+ This change fixes automake bug#9578.
+ * lib/am/inst-vars.am (am__uninstall_files_from_dir): New internal
+ macro, that defines a shell code fragment to uninstall files from
+ a given directory.
+ * lib/am/data.am (uninstall-%DIR%%PRIMARY%): Use it, to reduce code
+ duplication and improve consistency and correctness.
+ * lib/am/libs.am (uninstall-%DIR%LIBRARIES): Likewise.
+ * lib/am/lisp.am (uninstall-%DIR%LISP): Likewise.
+ * lib/am/mans.am (uninstall-man%SECTION%): Likewise.
+ * lib/am/python.am (uninstall-%DIR%LIBRARIES): Likewise.
+ * lib/am/scripts.am (uninstall-%DIR%SCRIPTS): Likewise.
+ * tests/uninstall-pr9578.test: New test.
+ * tests/uninstall-fail.test: New test.
+ * tests/Makefile.am (TESTS): Add them.
+ * NEWS, THANKS: Update.
+ Report by Nick Bowler.
+
+2011-09-22 Stefano Lattarini <address@hidden>
+
+ tests: fix tests on aclocal search path precedences
+ * tests/aclocal-path-precedence.test: Call `$ACLOCAL' with the
+ proper overridden system acdir.
+
2011-09-28 Stefano Lattarini <address@hidden>
tests: fix spurious failures in tests on TAP + signals
diff --git a/Makefile.in b/Makefile.in
index a1a321a..813a402 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -92,6 +92,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ cd "$$dir" && rm -f $$files; }; \
+ }
am__installdirs = "$(DESTDIR)$(bindir)"
SCRIPTS = $(bin_SCRIPTS)
AM_V_GEN = $(am__v_GEN_$(V))
@@ -476,9 +482,7 @@ uninstall-binSCRIPTS:
@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; \
- echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(bindir)" && rm -f $$files
+ dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir)
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
diff --git a/NEWS b/NEWS
index da6baf3..e7118d7 100644
--- a/NEWS
+++ b/NEWS
@@ -170,6 +170,10 @@ Bugs fixed in 1.11a:
- Automake's own build system finally have a real "installcheck" target.
+ - A "make uninstall" issued before a "make install", or after a mere
+ "make install-data" or a mere "make install-exec" does not spuriously
+ fail anymore.
+
- Automake now warns about more primary/directory invalid combinations,
such as "doc_LIBRARIES" or "pkglib_PROGRAMS".
diff --git a/THANKS b/THANKS
index dd04090..2e2c6d9 100644
--- a/THANKS
+++ b/THANKS
@@ -246,6 +246,7 @@ Motoyuki Kasahara address@hidden
Nathanael Nerode address@hidden
Nelson H. F. Beebe address@hidden
Nicholas Wourms address@hidden
+Nick Bowler address@hidden
Nicolas Joly address@hidden
Nicolas Thiery address@hidden
NightStrike address@hidden
diff --git a/doc/Makefile.in b/doc/Makefile.in
index 7cd5e30..288904e 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -133,6 +133,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ cd "$$dir" && rm -f $$files; }; \
+ }
man1dir = $(mandir)/man1
NROFF = nroff
MANS = $(dist_man1_MANS)
@@ -515,9 +521,7 @@ uninstall-man1:
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,.,'`; \
- test -z "$$files" || { \
- echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
+ dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir)
install-dist_docDATA: $(dist_doc_DATA)
@$(NORMAL_INSTALL)
test -z "$(docdir)" || $(MKDIR_P) "$(DESTDIR)$(docdir)"
@@ -535,9 +539,7 @@ uninstall-dist_docDATA:
@$(NORMAL_UNINSTALL)
@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 ")"; \
- cd "$(DESTDIR)$(docdir)" && rm -f $$files
+ dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir)
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
diff --git a/lib/Automake/Makefile.in b/lib/Automake/Makefile.in
index 80c9248..81f9f7d 100644
--- a/lib/Automake/Makefile.in
+++ b/lib/Automake/Makefile.in
@@ -103,6 +103,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ cd "$$dir" && rm -f $$files; }; \
+ }
am__installdirs = "$(DESTDIR)$(perllibdir)" "$(DESTDIR)$(perllibdir)"
DATA = $(dist_perllib_DATA) $(nodist_perllib_DATA)
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
@@ -332,9 +338,7 @@ uninstall-dist_perllibDATA:
@$(NORMAL_UNINSTALL)
@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 ")"; \
- cd "$(DESTDIR)$(perllibdir)" && rm -f $$files
+ dir='$(DESTDIR)$(perllibdir)'; $(am__uninstall_files_from_dir)
install-nodist_perllibDATA: $(nodist_perllib_DATA)
@$(NORMAL_INSTALL)
test -z "$(perllibdir)" || $(MKDIR_P) "$(DESTDIR)$(perllibdir)"
@@ -352,9 +356,7 @@ uninstall-nodist_perllibDATA:
@$(NORMAL_UNINSTALL)
@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 ")"; \
- cd "$(DESTDIR)$(perllibdir)" && rm -f $$files
+ dir='$(DESTDIR)$(perllibdir)'; $(am__uninstall_files_from_dir)
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
diff --git a/lib/Automake/tests/Makefile.in b/lib/Automake/tests/Makefile.in
index c596a1c..2b336f4 100644
--- a/lib/Automake/tests/Makefile.in
+++ b/lib/Automake/tests/Makefile.in
@@ -116,6 +116,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ cd "$$dir" && rm -f $$files; }; \
+ }
# Restructured Text title and section.
am__rst_title = sed 's/.*/ & /;h;s/./=/g;p;x;p;g;p;s/.*//'
am__rst_section = sed 'p;s/./=/g;p;g'
diff --git a/lib/Makefile.in b/lib/Makefile.in
index e7a6877..ad04676 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -106,6 +106,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ cd "$$dir" && rm -f $$files; }; \
+ }
am__installdirs = "$(DESTDIR)$(pkgvdatadir)" "$(DESTDIR)$(scriptdir)"
DATA = $(dist_pkgvdata_DATA) $(dist_script_DATA)
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
@@ -316,9 +322,7 @@ uninstall-dist_pkgvdataDATA:
@$(NORMAL_UNINSTALL)
@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 ")"; \
- cd "$(DESTDIR)$(pkgvdatadir)" && rm -f $$files
+ dir='$(DESTDIR)$(pkgvdatadir)'; $(am__uninstall_files_from_dir)
install-dist_scriptDATA: $(dist_script_DATA)
@$(NORMAL_INSTALL)
test -z "$(scriptdir)" || $(MKDIR_P) "$(DESTDIR)$(scriptdir)"
@@ -336,9 +340,7 @@ uninstall-dist_scriptDATA:
@$(NORMAL_UNINSTALL)
@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 ")"; \
- cd "$(DESTDIR)$(scriptdir)" && rm -f $$files
+ dir='$(DESTDIR)$(scriptdir)'; $(am__uninstall_files_from_dir)
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
diff --git a/lib/am/Makefile.in b/lib/am/Makefile.in
index 94a8ce0..1a9b01a 100644
--- a/lib/am/Makefile.in
+++ b/lib/am/Makefile.in
@@ -96,6 +96,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ cd "$$dir" && rm -f $$files; }; \
+ }
am__installdirs = "$(DESTDIR)$(amdir)"
DATA = $(dist_am_DATA)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -293,9 +299,7 @@ uninstall-dist_amDATA:
@$(NORMAL_UNINSTALL)
@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 ")"; \
- cd "$(DESTDIR)$(amdir)" && rm -f $$files
+ dir='$(DESTDIR)$(amdir)'; $(am__uninstall_files_from_dir)
tags: TAGS
TAGS:
diff --git a/lib/am/data.am b/lib/am/data.am
index 36af717..1817447 100644
--- a/lib/am/data.am
+++ b/lib/am/data.am
@@ -73,9 +73,7 @@ uninstall-%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; \
- echo " ( cd '$(DESTDIR)$(%NDIR%dir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(%NDIR%dir)" && rm -f $$files
+ dir='$(DESTDIR)$(%NDIR%dir)'; $(am__uninstall_files_from_dir)
endif %?INSTALL%
diff --git a/lib/am/inst-vars.am b/lib/am/inst-vars.am
index a49cfe9..477513f 100644
--- a/lib/am/inst-vars.am
+++ b/lib/am/inst-vars.am
@@ -15,6 +15,7 @@
## along with this program. If not, see <http://www.gnu.org/licenses/>.
if %?FIRST%
+
## These variables help stripping any $(VPATH) that some
## Make implementations prepend before VPATH-found files.
## The issue is discussed at length in distdir.am.
@@ -52,4 +53,21 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+
+## A shell code fragment to uninstall files from a given directory.
+## It expects the $dir and $files shell variables to be defined respectively
+## to the directory where the files to be removed are, and to the list of
+## such files.
+am__uninstall_files_from_dir = { \
+## Some rm implementations complain if `rm -f' is used without arguments.
+ test -z "$$files" \
+## At least Solaris /bin/sh still lacks `test -e', so we use the multiple
+## tests below instead. We expect $dir to be either non-existent or a
+## directory, so the failure we'll experience if it is a regular file
+## is indeed desired and welcome (better to fail loudly thasn silently).
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ cd "$$dir" && rm -f $$files; }; \
+ }
+
endif %?FIRST%
diff --git a/lib/am/libs.am b/lib/am/libs.am
index eec62a1..29f630b 100644
--- a/lib/am/libs.am
+++ b/lib/am/libs.am
@@ -87,9 +87,7 @@ uninstall-%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; \
- echo " ( cd '$(DESTDIR)$(%NDIR%dir)' && rm -f "$$files" )"; \
- cd "$(DESTDIR)$(%NDIR%dir)" && rm -f $$files
+ dir='$(DESTDIR)$(%NDIR%dir)'; $(am__uninstall_files_from_dir)
endif %?INSTALL%
diff --git a/lib/am/lisp.am b/lib/am/lisp.am
index ab45b30..6ffcdbf 100644
--- a/lib/am/lisp.am
+++ b/lib/am/lisp.am
@@ -128,12 +128,8 @@ uninstall-%DIR%LISP:
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)`; \
- test -n "$$files" || exit 0; \
- filesc=`echo "$$files" | sed 's|$$|c|'`; \
- echo " ( cd '$(DESTDIR)$(%NDIR%dir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(%NDIR%dir)" && rm -f $$files || exit $$?; \
- echo " ( cd '$(DESTDIR)$(%NDIR%dir)' && rm -f" $$filesc ")"; \
- cd "$(DESTDIR)$(%NDIR%dir)" && rm -f $$filesc
+ files="$$files "`echo "$$files" | sed 's|$$|c|'`; \
+ dir='$(DESTDIR)$(%NDIR%dir)'; $(am__uninstall_files_from_dir)
endif %?INSTALL%
diff --git a/lib/am/mans.am b/lib/am/mans.am
index 66a6c7e..b41a94d 100644
--- a/lib/am/mans.am
+++ b/lib/am/mans.am
@@ -119,9 +119,7 @@ if %?NOTRANS_MANS%
?HAVE_NOTRANS? sed -n '/\.%SECTION%[a-z]*$$/p'; \
## Extract basename of manpage, change the extension if needed.
} | sed 's,.*/,,;s,\.[^%SECTION%][0-9a-z]*$$,.%SECTION%,'`; \
- test -z "$$files" || { \
- echo " ( cd '$(DESTDIR)$(man%SECTION%dir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(man%SECTION%dir)" && rm -f $$files; }
+ dir='$(DESTDIR)$(man%SECTION%dir)'; $(am__uninstall_files_from_dir)
endif %?NOTRANS_MANS%
if %?TRANS_MANS%
## Handle MANS without notrans_ prefix
@@ -136,7 +134,5 @@ if %?TRANS_MANS%
## transform, and change the extension if needed.
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^%SECTION%][0-9a-z]*$$,%SECTION%,;x'
\
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
- test -z "$$files" || { \
- echo " ( cd '$(DESTDIR)$(man%SECTION%dir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(man%SECTION%dir)" && rm -f $$files; }
+ dir='$(DESTDIR)$(man%SECTION%dir)'; $(am__uninstall_files_from_dir)
endif %?TRANS_MANS%
diff --git a/lib/am/python.am b/lib/am/python.am
index 40aaa62..427c95d 100644
--- a/lib/am/python.am
+++ b/lib/am/python.am
@@ -94,16 +94,15 @@ uninstall-%DIR%PYTHON:
?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; \
+ dir='$(DESTDIR)$(%NDIR%dir)'; \
+## Also remove the .pyc and .pyo byte compiled versions.
filesc=`echo "$$files" | sed 's|$$|c|'`; \
fileso=`echo "$$files" | sed 's|$$|o|'`; \
- echo " ( cd '$(DESTDIR)$(%NDIR%dir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(%NDIR%dir)" && rm -f $$files || exit $$?; \
-## This is to remove the .pyc and .pyo byte compiled versions (a bit
-## of a hack).
- echo " ( cd '$(DESTDIR)$(%NDIR%dir)' && rm -f" $$filesc ")"; \
- cd "$(DESTDIR)$(%NDIR%dir)" && rm -f $$filesc || exit $$?; \
- echo " ( cd '$(DESTDIR)$(%NDIR%dir)' && rm -f" $$fileso ")"; \
- cd "$(DESTDIR)$(%NDIR%dir)" && rm -f $$fileso
+ st=0; \
+ for files in "$$files" "$$filesc" "$$fileso"; do \
+ $(am__uninstall_files_from_dir) || st=$$?; \
+ done; \
+ exit $$st
endif %?INSTALL%
diff --git a/lib/am/scripts.am b/lib/am/scripts.am
index 790cb64..346f0d3 100644
--- a/lib/am/scripts.am
+++ b/lib/am/scripts.am
@@ -83,9 +83,7 @@ uninstall-%DIR%SCRIPTS:
?!BASE? $(am__nobase_strip_setup); \
?!BASE? files=`$(am__nobase_strip) \
?!BASE? -e 'h;s,.*/,,;$(transform);x;s|[^/]*$$||;G;s,\n,,'`; \
- test -n "$$list" || exit 0; \
- echo " ( cd '$(DESTDIR)$(%NDIR%dir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(%NDIR%dir)" && rm -f $$files
+ dir='$(DESTDIR)$(%NDIR%dir)'; $(am__uninstall_files_from_dir)
endif %?INSTALL%
diff --git a/m4/Makefile.in b/m4/Makefile.in
index a7fc0eb..149e968 100644
--- a/m4/Makefile.in
+++ b/m4/Makefile.in
@@ -96,6 +96,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ cd "$$dir" && rm -f $$files; }; \
+ }
am__installdirs = "$(DESTDIR)$(automake_acdir)" \
"$(DESTDIR)$(system_acdir)"
DATA = $(dist_automake_ac_DATA) $(dist_system_ac_DATA)
@@ -295,9 +301,7 @@ uninstall-dist_automake_acDATA:
@$(NORMAL_UNINSTALL)
@list='$(dist_automake_ac_DATA)'; test -n "$(automake_acdir)" || list=;
\
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
- echo " ( cd '$(DESTDIR)$(automake_acdir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(automake_acdir)" && rm -f $$files
+ dir='$(DESTDIR)$(automake_acdir)'; $(am__uninstall_files_from_dir)
install-dist_system_acDATA: $(dist_system_ac_DATA)
@$(NORMAL_INSTALL)
test -z "$(system_acdir)" || $(MKDIR_P) "$(DESTDIR)$(system_acdir)"
@@ -315,9 +319,7 @@ uninstall-dist_system_acDATA:
@$(NORMAL_UNINSTALL)
@list='$(dist_system_ac_DATA)'; test -n "$(system_acdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
- echo " ( cd '$(DESTDIR)$(system_acdir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(system_acdir)" && rm -f $$files
+ dir='$(DESTDIR)$(system_acdir)'; $(am__uninstall_files_from_dir)
tags: TAGS
TAGS:
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 09baaf8..6e3fd49 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -118,6 +118,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ cd "$$dir" && rm -f $$files; }; \
+ }
# Restructured Text title and section.
am__rst_title = sed 's/.*/ & /;h;s/./=/g;p;x;p;g;p;s/.*//'
am__rst_section = sed 'p;s/./=/g;p;g'
@@ -1394,6 +1400,8 @@ txinfo33.test \
txinfo-unrecognized-extension.test \
transform.test \
transform2.test \
+uninstall-fail.test \
+uninstall-pr9578.test \
unused.test \
upc.test \
upc2.test \
diff --git a/tests/aclocal-path-precedence.test
b/tests/aclocal-path-precedence.test
index 76ca211..6012f87 100755
--- a/tests/aclocal-path-precedence.test
+++ b/tests/aclocal-path-precedence.test
@@ -64,7 +64,7 @@ END
echo ./extradir > sysdir/dirlist
-ACLOCAL_PATH=mdir1:mdir2 $ACLOCAL -I mdir3
+ACLOCAL_PATH=mdir1:mdir2 $ACLOCAL -I mdir3 --system-acdir sysdir
$AUTOCONF
$FGREP '::' configure # For debugging.
diff --git a/tests/list-of-tests.mk b/tests/list-of-tests.mk
index 791f56f..820094c 100644
--- a/tests/list-of-tests.mk
+++ b/tests/list-of-tests.mk
@@ -1076,6 +1076,8 @@ txinfo33.test \
txinfo-unrecognized-extension.test \
transform.test \
transform2.test \
+uninstall-fail.test \
+uninstall-pr9578.test \
unused.test \
upc.test \
upc2.test \
diff --git a/tests/java-check.test b/tests/uninstall-fail.test
similarity index 51%
copy from tests/java-check.test
copy to tests/uninstall-fail.test
index 86b5f05..a3e7a7a 100755
--- a/tests/java-check.test
+++ b/tests/uninstall-fail.test
@@ -14,51 +14,51 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Make sure that check_JAVA causes *.class files to be built only with
-# "make check", and not also with "make all".
-# See automake bug#8234.
+# "make uninstall" complains and errors out on failures.
+
+# FIXME: this test only deal with DATA primary; maybe we need sister
+# tests for other primaries too? E.g., SCRIPTS, PROGRAMS, LISP, PYTHON,
+# etc...
-required=javac
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
AC_OUTPUT
END
cat > Makefile.am << 'END'
-check_JAVA = One.java Two.java
+data_DATA = foobar.txt
END
-cat > One.java <<'END'
-class One { }
-END
-
-cat > Two.java <<'END'
-class Two { // Deliberately missing closing bracket.
-END
+: > foobar.txt
$ACLOCAL
-$AUTOCONF
$AUTOMAKE
+$AUTOCONF
+
+inst=__inst-dir__
+
+./configure --prefix="`pwd`/$inst"
+
+mkdir $inst $inst/share
+: > $inst/share/foobar.txt
-inst=`pwd`/_inst
+chmod a-w $inst/share
+touch $inst/share/t && skip_ "cannot make directories unwritable"
+rm -f $inst/share/t
-./configure --prefix="$inst"
+$MAKE uninstall >output 2>&1 && { cat output; Exit 1; }
+cat output
+grep "rm: .*foobar\.txt" output
-$MAKE
-ls | $EGREP '\.(class|stamp)$' && Exit 1
+chmod a-rwx $inst/share
+(cd $inst/share) && skip_ "cannot make directories fully unreadable"
-# Make Two.java compilable.
-echo '}' >> Two.java
+$MAKE uninstall >output 2>&1 && { cat output; Exit 1; }
+cat output
+grep "cd: .*$inst/share" output
-# "make check" should compile files in $(check_JAVA) ...
-$MAKE check
-ls -l # For debugging.
-test -f One.class
-test -f Two.class
-# ... but should *not* install them.
-$FGREP checkdir Makefile && Exit 1
-$MAKE install
-test -d _inst && Exit 1
:
diff --git a/tests/java-sources.test b/tests/uninstall-pr9578.test
similarity index 50%
copy from tests/java-sources.test
copy to tests/uninstall-pr9578.test
index 9bf8855..9aea52d 100755
--- a/tests/java-sources.test
+++ b/tests/uninstall-pr9578.test
@@ -14,52 +14,56 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Test definition of automake-generated private Makefile variable
-# `$(am__java_sources)'.
+# Check against automake bug#9578: "make uninstall" issued before
+# "make install" or after a mere "make install-data" or a mere
+# "make install-exec" failed spuriously.
+#
+# FIXME: this test only deal with DATA and script primaries; maybe we
+# need sister tests for other primaries too? E.g., PROGRAMS, LISP,
+# PYTHON, etc...
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
AC_OUTPUT
END
-cat > Makefile.am << 'END'
-foodir = $(prefix)
+: > foo
+: > bar
-foo_JAVA = a.java
-dist_foo_JAVA = b.java
-nodist_foo_JAVA = c.java
-nobase_foo_JAVA = d.java
-nobase_dist_foo_JAVA = e.java
-nobase_nodist_foo_JAVA = f.java
-
-.PHONY: debug
-debug:
- @echo 'am__java_sources: "$(am__java_sources)"'
-got:
- @lst='$(am__java_sources)'; \
- for f in $$lst; do echo $$f; done | sort > $@
+cat > Makefile.am << 'END'
+bin_SCRIPTS = foo
+data_DATA = bar
END
$ACLOCAL
$AUTOMAKE
$AUTOCONF
-cat > exp << 'END'
-a.java
-b.java
-c.java
-d.java
-e.java
-f.java
-END
+./configure --prefix="`pwd`/inst"
+
+$MAKE uninstall
+test ! -d inst
+
+rm -rf inst
+
+$MAKE install-exec
+test -f inst/bin/foo || Exit 99 # Sanity check.
+$MAKE uninstall
+test ! -f inst/bin/foo
+
+$MAKE install-data
+test -f inst/share/bar || Exit 99 # Sanity check.
+$MAKE uninstall
+test ! -f inst/share/bar
-./configure
-$MAKE debug
-$MAKE got
+rm -rf inst
-cat got
-cat exp
-diff exp got
+$MAKE install-exec
+test -f inst/bin/foo || Exit 99 # Sanity check.
+$MAKE uninstall
+test ! -f inst/bin/foo
:
hooks/post-receive
--
GNU Automake
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Automake-commit] [SCM] GNU Automake branch, testsuite-work, updated. v1.11-1432-g8ccc53c,
Stefano Lattarini <=