[m-dev.] diff: handle missing directories in w3

Peter Ross petdr at cs.mu.OZ.AU
Mon Dec 6 13:58:50 AEDT 1999


Hi,


===================================================================


Estimated hours taken: 0.1

w3/Makefile.common:
    Handle missing directories gracefully when doing a make clean.


Index: Makefile.common
===================================================================
RCS file: /home/staff/zs/imp/w3/Makefile.common,v
retrieving revision 1.9
diff -u -r1.9 Makefile.common
--- Makefile.common	1999/06/17 08:48:09	1.9
+++ Makefile.common	1999/12/06 02:36:13
@@ -56,9 +56,11 @@
 clean:
 	-rm -f $(HTML)
 ifdef DIRS
-	for dir in $(DIRS);			\
-	do				        \
-		(cd $$dir && $(MAKE) clean);	\
+	for dir in $(DIRS);				\
+	do				        	\
+		if [ -d $$dir ]; then			\
+			(cd $$dir && $(MAKE) clean);	\
+		fi					\
 	done
 endif
 

----
 +----------------------------------------------------------------------+
 | Peter Ross      M Sci/Eng Melbourne Uni                              |
 | petdr at cs.mu.oz.au  WWW: www.cs.mu.oz.au/~petdr/ ph: +61 3 9344 9158  |
 +----------------------------------------------------------------------+
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list