[MLton-commit] r4266

Stephen Weeks MLton@mlton.org
Wed, 30 Nov 2005 14:48:16 -0800


Caused mllex and mlyacc to be built and run between the first and
second round of bootstrapping.  This ensures that the second round
self compile will use the latest tools, which may be improved relative
to an earlier version.


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

U   mlton/trunk/Makefile
U   mlton/trunk/mlton/front-end/Makefile

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

Modified: mlton/trunk/Makefile
===================================================================
--- mlton/trunk/Makefile	2005-11-30 22:36:56 UTC (rev 4265)
+++ mlton/trunk/Makefile	2005-11-30 22:48:15 UTC (rev 4266)
@@ -45,13 +45,17 @@
 
 .PHONY: all-no-docs
 all-no-docs:
-	$(MAKE) dirs runtime compiler world-no-check
+	$(MAKE) dirs runtime compiler world-no-check libraries tools
 # If we're compiling with another version of MLton, then we want to do
 # another round of compilation so that we get a MLton built without
 # stubs.  Remove $(AOUT) so that the $(MAKE) compiler below will
 # remake MLton.
+# We also want to re-run the just-built tools (mllex and mlyacc)
+# because they may be better than those that were used for the first
+# round of compilation.  So, we clean out the front end.
 ifeq (other, $(shell if [ ! -x $(BIN)/mlton ]; then echo other; fi))
 	rm -f $(COMP)/$(AOUT)$(EXE)
+	$(MAKE) -C $(COMP)/front-end clean
 endif
 	$(MAKE) script mlbpathmap targetmap constants compiler world libraries tools
 	@echo 'Build of MLton succeeded.'

Modified: mlton/trunk/mlton/front-end/Makefile
===================================================================
--- mlton/trunk/mlton/front-end/Makefile	2005-11-30 22:36:56 UTC (rev 4265)
+++ mlton/trunk/mlton/front-end/Makefile	2005-11-30 22:48:15 UTC (rev 4266)
@@ -6,6 +6,11 @@
  # See the file MLton-LICENSE for details.
  ##
 
+SRC = $(shell cd ../.. && pwd)
+BUILD = $(SRC)/build
+BIN = $(BUILD)/bin
+PATH = $(BIN):$(shell echo $$PATH)
+
 .PHONY: all
 all: ml.lex.sml ml.grm.sig ml.grm.sml mlb.lex.sml mlb.grm.sig mlb.grm.sml