diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2011-09-23 22:50:14 +0200 |
---|---|---|
committer | Stefano Lattarini <stefano.lattarini@gmail.com> | 2011-09-26 21:46:59 +0200 |
commit | eae5cfa9b373ee19b2768957b53dbe53a586b69e (patch) | |
tree | 5e91f6e72b5f6785f631fa2996c156f4761abc65 /m4 | |
parent | b9fa1fc1eb50d7907764ec0972a674548a7bd8b3 (diff) | |
download | automake-eae5cfa9b373ee19b2768957b53dbe53a586b69e.tar.gz |
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.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/Makefile.in | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/m4/Makefile.in b/m4/Makefile.in index 2e7e5470d..9fb6989f0 100644 --- a/m4/Makefile.in +++ b/m4/Makefile.in @@ -89,6 +89,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) @@ -281,9 +287,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)" @@ -301,9 +305,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: |