[tz] [PROPOSED] Fix 'make clean' problem with clean_*.dir

Paul Eggert eggert at cs.ucla.edu
Mon Mar 11 23:04:32 UTC 2019


* Makefile (clean_misc, clean): Use rm -fr on patterns that can
match directories, so that 'make clean' works even if there is a
directory check_zishrink.dir.  Stick with rm -f on patterns that
should match only files, for safety.
---
 Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 4bc72a9..25f1d35 100644
--- a/Makefile
+++ b/Makefile
@@ -847,11 +847,13 @@ check_zishrink_posix check_zishrink_right: \
 		touch $@
 
 clean_misc:
+		rm -fr check_*.dir
 		rm -f *.o *.out $(TIME_T_ALTERNATIVES) \
 		  check_* core typecheck_* \
 		  date tzselect version.h zdump zic yearistype libtz.a
 clean:		clean_misc
-		rm -fr *.dir *.zi tzdb-*/ $(TZS_NEW)
+		rm -fr *.dir tzdb-*/
+		rm -f *.zi $(TZS_NEW)
 
 maintainer-clean: clean
 		@echo 'This command is intended for maintainers to use; it'
-- 
2.20.1



More information about the tz mailing list