[m-dev.] diff: make clean/realclean and tests

Zoltan Somogyi zs at cs.mu.OZ.AU
Tue Nov 28 11:47:47 AEDT 2000


Estimated hours taken: 0.3

Mmakefile:
	When executing mmake clean/realclean, execute the action in the tests
	subdirectory as well, if it exists.

Zoltan.

cvs diff: Diffing .
Index: Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/Mmakefile,v
retrieving revision 1.60
diff -u -b -r1.60 Mmakefile
--- Mmakefile	2000/11/01 11:01:11	1.60
+++ Mmakefile	2000/11/27 02:15:01
@@ -471,7 +471,7 @@
 
 #-----------------------------------------------------------------------------#
 
-clean: clean_subdirs
+clean: clean_subdirs clean_tests
 
 .PHONY: clean_subdirs
 clean_subdirs:
@@ -481,8 +481,14 @@
 		(cd $$dir; $(SUBDIR_MMAKE) clean) \
 	done
 
-realclean: realclean_subdirs realclean_local
+.PHONY: clean_tests
+clean_tests:
+	if test -d tests; then \
+		(cd tests; $(MMAKE) clean) \
+	fi
 
+realclean: realclean_subdirs realclean_local realclean_tests
+
 .PHONY: realclean_local
 realclean_local: realclean_config
 
@@ -498,5 +504,11 @@
 .PHONY: realclean_config
 realclean_config:
 	rm -f config.cache config.status config.log configure.log
+
+.PHONY: realclean_tests
+realclean_tests:
+	if test -d tests; then \
+		(cd tests; $(MMAKE) realclean) \
+	fi
 
 #-----------------------------------------------------------------------------#
--------------------------------------------------------------------------
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