[MLton-commit] r7419

Wesley Terpstra wesley at mlton.org
Mon Feb 15 08:55:35 PST 2010


Another multiple target bug.

This says to build the two output files by executing the rule twice.
front-end/mlb.grm.sig front-end/mlb.grm.sml: front-end/mlb.grm
	$(MAKE) -C front-end mlb.grm.sig mlb.grm.sml

This describes a target-group rule that generates two files at once.
front-end/%.grm.sig front-end/%.grm.sml: front-end/%.grm
	$(MAKE) -C front-end $(<F).sig $(<F).sml

... though you'd think they behave the same since they look alike, they don't.


----------------------------------------------------------------------

U   mlton/trunk/mlton/Makefile

----------------------------------------------------------------------

Modified: mlton/trunk/mlton/Makefile
===================================================================
--- mlton/trunk/mlton/Makefile	2010-02-15 16:50:51 UTC (rev 7418)
+++ mlton/trunk/mlton/Makefile	2010-02-15 16:55:35 UTC (rev 7419)
@@ -72,14 +72,10 @@
 		sed "s/\(.*\)MLTONBUILDNODE\(.*\)/\1`uname -n`\2/" >		\
 		control/version.sml
 
-front-end/ml.lex.sml: front-end/ml.lex
-	$(MAKE) -C front-end ml.lex.sml
-front-end/ml.grm.sig front-end/ml.grm.sml: front-end/ml.grm
-	$(MAKE) -C front-end ml.grm.sig ml.grm.sml
-front-end/mlb.lex.sml: front-end/mlb.lex
-	$(MAKE) -C front-end mlb.lex.sml
-front-end/mlb.grm.sig front-end/mlb.grm.sml: front-end/mlb.grm
-	$(MAKE) -C front-end mlb.grm.sig mlb.grm.sml
+front-end/%.lex.sml: front-end/%.lex
+	$(MAKE) -C front-end $(@F)
+front-end/%.grm.sig front-end/%.grm.sml: front-end/%.grm
+	$(MAKE) -C front-end $(<F).sig $(<F).sml
 
 # Pass $(PATH) to upgrade-basis because it is run via
 # #!/usr/bin/env bash, which resets the path.




More information about the MLton-commit mailing list