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 /lib/am/scripts.am | |
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 'lib/am/scripts.am')
-rw-r--r-- | lib/am/scripts.am | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/am/scripts.am b/lib/am/scripts.am index 790cb649f..346f0d3b9 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% |