]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
[ng] clean: do not ignore errors while removing files
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 2 Jun 2012 13:36:55 +0000 (15:36 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 21 Jun 2012 19:16:38 +0000 (21:16 +0200)
Possible culprits have been identified with the command "git grep '-rm\b'".

* NG-NEWS: Update.
* lib/am/tags.am, lib/am/distdir.am, lib/am/dejagnu.am, lib/am/clean.am: Do
not prefix recipes invoking "rm" with the "-" recipe modifier: we now want
the cleaning recipes to fail if rm encounters an error.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
NG-NEWS
lib/am/clean.am
lib/am/dejagnu.am
lib/am/distdir.am
lib/am/tags.am

diff --git a/NG-NEWS b/NG-NEWS
index 0e42863d1af0c438d6fb0ea42fd180751f39dea2..8e77df7bbad3621279561f18ea0de4f9113ad929 100644 (file)
--- a/NG-NEWS
+++ b/NG-NEWS
@@ -383,6 +383,9 @@ Miscellaneous
   has been renamed to AM_DEFAULT_INCLUDES, to avoid impinging on the user's
   namespace.  Do not override this variable in your Makefiles!
 
+* The Automake-generated clean targets do not exit successfully anymore if
+  an error occurs while removing a file or directory.
+
 -----
 
 Copyright (C) 2012 Free Software Foundation, Inc.
index 67284e80a018eb52ce1e0eb629a058ddce1b59fe..8c739a21c610f5fa145df9a8ba227345cd102f25 100644 (file)
@@ -14,8 +14,8 @@
 ## You should have received a copy of the GNU General Public License
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-.am.clean-cmd.f = $(if $(strip $1),-rm -f $(strip $1))
-.am.clean-cmd.d = $(if $(strip $1),-rm -rf $(strip $1))
+.am.clean-cmd.f = $(if $(strip $1),rm -f $(strip $1))
+.am.clean-cmd.d = $(if $(strip $1),rm -rf $(strip $1))
 
 am__mostlyclean_files += $(MOSTLYCLEANFILES)
 am__clean_files       += $(CLEANFILES)
@@ -66,9 +66,9 @@ maintainer-clean-generic:
 ## used to do this, and it's not unreasonable to expect user-defined
 ## rules might do that as well).
 distclean:
-       -rm -f %MAKEFILE% $(am__config_distclean_files)
+       rm -f %MAKEFILE% $(am__config_distclean_files)
 maintainer-clean:
-       -rm -f %MAKEFILE% $(am__config_distclean_files)
+       rm -f %MAKEFILE% $(am__config_distclean_files)
 
 .PHONY: clean mostlyclean distclean maintainer-clean \
 clean-generic mostlyclean-generic distclean-generic maintainer-clean-generic
index c659f87d941cd09c6b7b2a470354ddc7c3d2db5d..cb8894973ade962f48965a9ca1f59482fc9fa3e1 100644 (file)
@@ -73,7 +73,7 @@ site.exp: Makefile $(EXTRA_DEJAGNU_SITE_CONFIG)
        @if test -f site.exp; then \
           sed -e '1,/^## End of auto-generated content.*##/d' site.exp >> site.tmp; \
         fi
-       @-rm -f site.bak
+       @rm -f site.bak
        @test ! -f site.exp || mv site.exp site.bak
        @mv site.tmp site.exp
 
index 51cd80a0a1bd7874c7b3dca0168a2726d8ba5007..79d24ffb981e44deb670810bf44492f2752c8629 100644 (file)
@@ -363,7 +363,7 @@ dist-shar: distdir
 ?ZIP?DIST_ARCHIVES += $(distdir).zip
 .PHONY: dist-zip
 dist-zip: distdir
-       -rm -f $(distdir).zip
+       rm -f $(distdir).zip
        zip -rq $(distdir).zip $(distdir)
        $(am__post_remove_distdir)
 
index ffbc1351e2c5cb07909a1ae46957088842df7c38..2abd5630383bc69417e0ee95a46c2469f2435292 100644 (file)
@@ -144,7 +144,7 @@ cscope: cscope.files
          || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
 
 clean-cscope:
-       -rm -f cscope.files
+       rm -f cscope.files
 
 cscope.files: clean-cscope %CSCOPEDIRS% cscopelist