[m-rev.] diff: fix duplicate target warnings with mmake --use-mmc-make

Peter Wang novalazy at gmail.com
Wed Sep 5 11:34:36 AEST 2007


Estimated hours taken: 0.2
Branches: main

scripts/Mmake.vars.in:
	Add $(MERCURY_MAIN_MODULES) to ALL_MC_BUILD_FILES only once if
	EXT_FOR_EXE is undefined, to get rid of warnings from `make' about
	duplicate rules when running `mmake --use-mmc-make' in the test
	directories.

tests/hard_coded/Mmakefile:
	Remove a couple of duplicate targets.

Index: scripts/Mmake.vars.in
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/scripts/Mmake.vars.in,v
retrieving revision 1.107
diff -u -r1.107 Mmake.vars.in
--- scripts/Mmake.vars.in	14 Jul 2007 02:33:23 -0000	1.107
+++ scripts/Mmake.vars.in	5 Sep 2007 01:23:10 -0000
@@ -82,8 +82,7 @@
 # Files which should be built using `mmc --make' rather than `make'
 # when `--use-mmc-make' is passed on the mmake command line.
 #
-ALL_MC_BUILD_FILES =	$(MERCURY_MAIN_MODULES) \
-			$(MERCURY_MAIN_MODULES:%=%$(EXT_FOR_EXE)) \
+ALL_MC_BUILD_FILES0 =	$(MERCURY_MAIN_MODULES) \
 			$(MERCURY_MAIN_MODULES:%=lib%.$A) \
 			$(MERCURY_MAIN_MODULES:%=lib%.so) \
 			$(MERCURY_MAIN_MODULES:%=%.clean) \
@@ -93,6 +92,13 @@
 			$(MC_BUILD_FILES)
 MC_BUILD_FILES =
 
+ifdef EXT_FOR_EXE
+ALL_MC_BUILD_FILES =	$(ALL_MC_BUILD_FILES0) \
+			$(MERCURY_MAIN_MODULES:%=%$(EXT_FOR_EXE))
+else
+ALL_MC_BUILD_FILES =	$(ALL_MC_BUILD_FILES0)
+endif
+
 #-----------------------------------------------------------------------------#
 #-----------------------------------------------------------------------------#
 #
Index: tests/hard_coded/Mmakefile
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/hard_coded/Mmakefile,v
retrieving revision 1.333
diff -u -r1.333 Mmakefile
--- tests/hard_coded/Mmakefile	4 Sep 2007 03:12:21 -0000	1.333
+++ tests/hard_coded/Mmakefile	5 Sep 2007 01:23:10 -0000
@@ -239,7 +239,6 @@
 	transitive_inst_type \
 	trigraphs \
 	tuple_test \
-	tuple_test \
 	type_ctor_desc \
 	type_ctor_desc_manip \
 	type_info_order \
@@ -329,7 +328,6 @@
 	TRACE_GOAL_ENV_PROGS= \
 		trace_goal_env_1 \
 		trace_goal_env_2 \
-		trace_goal_env_2 \
 		trace_goal_env_3
 else
 	TRACE_GOAL_ENV_PROGS=

--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list