Browse Source

make clean-local a bit smarter (check if the directories exist, remove all symlinks in there even the ones we didn't create ourselves, so if we ever remove one old make cleans won't fail, and use -f for rm so it also won't fail if we add a new one)
the 'forward' targets might also need smartness like this (if we add one we'll have to make clean to have make create them right now)


git-svn-id: svn://bind10.isc.org/svn/bind10/branches/parkinglot@641 e5f2f494-b856-4b98-b285-d166d9295462

Jelte Jansen 15 years ago
parent
commit
5808c100a8
1 changed files with 11 additions and 8 deletions
  1. 11 8
      Makefile.am

+ 11 - 8
Makefile.am

@@ -47,11 +47,14 @@ stree_symlinks:	pyshared include
 
 all: stree_symlinks
 clean-local:
-	rm pyshared/isc/config
-	rm pyshared/isc/cc
-	rmdir pyshared/isc
-	rmdir pyshared
-	rm include/cc
-	rm include/config
-	rm include/dns
-	rmdir include
+	@if [ -d pyshared/isc ] ; then \
+		rm -f pyshared/isc/*; \
+		rmdir pyshared/isc; \
+	fi
+	@if [ -d pyshared ]; then \
+		rmdir pyshared; \
+	fi
+	@if [ -d include ]; then \
+		rm -f include/*; \
+		rmdir include; \
+	fi