Don't execute "*clean" rule in subdirectory if there's no makefile.
authorChris Hanson <org/chris-hanson/cph>
Wed, 6 Dec 2000 04:57:03 +0000 (04:57 +0000)
committerChris Hanson <org/chris-hanson/cph>
Wed, 6 Dec 2000 04:57:03 +0000 (04:57 +0000)
v7/src/Makefile

index 5cb1a8c630c9a71b9d4cb8e5fd716c54e670b079..fb73f2136c353c8c32ce8b0a5f94c9ee4b9a3579 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.4 2000/12/06 03:00:15 cph Exp $
+# $Id: Makefile,v 1.5 2000/12/06 04:57:03 cph Exp $
 #
 # Copyright (c) 2000 Massachusetts Institute of Technology
 #
@@ -41,8 +41,10 @@ tags TAGS:
 
 mostlyclean clean distclean maintainer-clean:
        @for SUBDIR in $(SUBDIRS); do \
-           echo "making $@ in $${SUBDIR}"; \
-           (cd $${SUBDIR} && $(MAKE) $@); \
+           if test -f $${SUBDIR}/Makefile; then \
+               echo "making $@ in $${SUBDIR}"; \
+               (cd $${SUBDIR} && $(MAKE) $@); \
+           fi
        done
 
 .PHONY: all setup tags TAGS mostlyclean clean distclean maintainer-clean