[MLton-commit] r4863

Matthew Fluet fluet at mlton.org
Mon Nov 27 15:08:48 PST 2006


Adam Goode's Makefile patches:

Replace all instances of plain old "=" with ":=", except in
packages/freebsd/Makefile since I have no way of testing it. This
should result in faster build times and less possibility for confusion
in the future. Note that bytecode/Makefile actually relied on the
semantics of lazy assignment, so I had to reorder some lines in the
file. I don't believe any other Makefile in the MLton tree was
sensitive to this issue.

bytecode/Makefile is missing the TARGET_OS variable. This could cause
the build to fail strangely when not building from the toplevel
Makefile (which exports TARGET_OS). runtime/Makefile correctly defines
this variable.


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

U   mlton/trunk/Makefile
U   mlton/trunk/basis-library/libs/basis-2002/top-level/Makefile
U   mlton/trunk/benchmark/Makefile
U   mlton/trunk/bytecode/Makefile
U   mlton/trunk/doc/examples/ffi/Makefile
U   mlton/trunk/doc/examples/finalizable/Makefile
U   mlton/trunk/doc/examples/profiling/Makefile
U   mlton/trunk/doc/examples/save-world/Makefile
U   mlton/trunk/doc/hacker-guide/Makefile
U   mlton/trunk/doc/library-guide/Makefile
U   mlton/trunk/doc/mlb-formal/Makefile
U   mlton/trunk/doc/style-guide/Makefile
U   mlton/trunk/lib/opengl/Makefile
U   mlton/trunk/mllex/Makefile
U   mlton/trunk/mlnlffigen/Makefile
U   mlton/trunk/mlprof/Makefile
U   mlton/trunk/mlton/Makefile
U   mlton/trunk/mlton/front-end/Makefile
U   mlton/trunk/mlyacc/Makefile
U   mlton/trunk/runtime/Makefile

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

Modified: mlton/trunk/Makefile
===================================================================
--- mlton/trunk/Makefile	2006-11-27 12:37:26 UTC (rev 4862)
+++ mlton/trunk/Makefile	2006-11-27 23:08:46 UTC (rev 4863)
@@ -6,47 +6,51 @@
  # See the file MLton-LICENSE for details.
  ##
 
-export TARGET = self
-export TARGET_ARCH = $(shell bin/host-arch)
-export TARGET_OS = $(shell bin/host-os)
-ROOT = $(shell pwd)
-BUILD = $(ROOT)/build
-SRC = $(ROOT)
-BIN = $(BUILD)/bin
-LIB = $(BUILD)/lib
-INC = $(LIB)/include
-COMP = $(SRC)/mlton
-RUN = $(SRC)/runtime
-MLTON = $(BIN)/mlton
-AOUT = mlton-compile
+export TARGET := self
+export TARGET_ARCH := $(shell bin/host-arch)
+export TARGET_OS := $(shell bin/host-os)
+ROOT := $(shell pwd)
+BUILD := $(ROOT)/build
+SRC := $(ROOT)
+BIN := $(BUILD)/bin
+LIB := $(BUILD)/lib
+INC := $(LIB)/include
+COMP := $(SRC)/mlton
+RUN := $(SRC)/runtime
+MLTON := $(BIN)/mlton
+AOUT := mlton-compile
 ifeq (mingw, $(TARGET_OS))
-EXE = .exe
+EXE := .exe
 else
-EXE =
+EXE :=
 endif
-MLBPATHMAP = $(LIB)/mlb-path-map
-TARGETMAP = $(LIB)/target-map
-SPEC = package/rpm/mlton.spec
-LEX = mllex
-PROF = mlprof
-YACC = mlyacc
-NLFFIGEN = mlnlffigen
-PATH = $(BIN):$(SRC)/bin:$(shell echo $$PATH)
-CP = /bin/cp -fpR
-GZIP = gzip --force --best
-RANLIB = ranlib
+MLBPATHMAP := $(LIB)/mlb-path-map
+TARGETMAP := $(LIB)/target-map
+SPEC := package/rpm/mlton.spec
+LEX := mllex
+PROF := mlprof
+YACC := mlyacc
+NLFFIGEN := mlnlffigen
+PATH := $(BIN):$(SRC)/bin:$(shell echo $$PATH)
+CP := /bin/cp -fpR
+GZIP := gzip --force --best
+RANLIB := ranlib
 
 # 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.
 ifeq (other, $(shell if [ ! -x $(BIN)/mlton ]; then echo other; fi))
-	BOOTSTRAP_OTHER=true
+	BOOTSTRAP_OTHER:=true
 else
-	BOOTSTRAP_OTHER=false
+	BOOTSTRAP_OTHER:=false
 endif
 
-VERSION ?= $(shell date +%Y%m%d)
-RELEASE ?= 1
+ifeq ($(origin VERSION), undefined)
+	VERSION := $(shell date +%Y%m%d)
+endif
+ifeq ($(origin RELEASE), undefined)
+	RELEASE := 1
+endif
 
 .PHONY: all
 all:
@@ -109,7 +113,7 @@
 	./tmp >$(LIB)/$(TARGET)/constants
 	rm -f tmp tmp.c
 
-DEBSRC = mlton-$(VERSION).orig
+DEBSRC := mlton-$(VERSION).orig
 .PHONY: deb
 deb:
 	$(MAKE) clean clean-svn version
@@ -157,7 +161,7 @@
 		bin/make-pdf-guide; \
 	fi
 
-BSDSRC = /tmp/mlton-$(VERSION)
+BSDSRC := /tmp/mlton-$(VERSION)
 .PHONY: freebsd
 freebsd:
 	$(MAKE) clean clean-svn version
@@ -169,7 +173,7 @@
         # do not change "make" to "$(MAKE)" in the following line
 	cd $(BSDSRC)/package/freebsd && MAINTAINER_MODE=yes make build-package  
 
-LIBRARIES = ckit-lib cml mlnlffi-lib mlyacc-lib smlnj-lib
+LIBRARIES := ckit-lib cml mlnlffi-lib mlyacc-lib smlnj-lib
 
 .PHONY: libraries-no-check
 libraries-no-check:
@@ -262,8 +266,8 @@
 	chmod a+x $(MLTON).count
 	chmod a+x $(MLTON).time
 
-TOPDIR = 'TOPDIR-unset'
-SOURCEDIR = $(TOPDIR)/SOURCES/mlton-$(VERSION)
+TOPDIR := 'TOPDIR-unset'
+SOURCEDIR := $(TOPDIR)/SOURCES/mlton-$(VERSION)
 .PHONY: rpms
 rpms:
 	$(MAKE) clean clean-svn version
@@ -352,44 +356,44 @@
 # The TBIN and TLIB are where the files are going to be after installing.
 # The DESTDIR and is added onto them to indicate where the Makefile actually
 # puts them.
-DESTDIR = $(CURDIR)/install
-PREFIX = /usr
+DESTDIR := $(CURDIR)/install
+PREFIX := /usr
 ifeq ($(TARGET_OS), cygwin)
-PREFIX = /
+PREFIX := /
 endif
 ifeq ($(TARGET_OS), darwin)
-PREFIX = /usr/local
+PREFIX := /usr/local
 endif
 ifeq ($(TARGET_OS), mingw)
-PREFIX = /mingw
+PREFIX := /mingw
 endif
 ifeq ($(TARGET_OS), solaris)
-PREFIX = /usr/local
+PREFIX := /usr/local
 endif
-prefix = $(PREFIX)
-MAN_PREFIX_EXTRA =
-TBIN = $(DESTDIR)$(prefix)/bin
-ULIB = lib/mlton
-TLIB = $(DESTDIR)$(prefix)/$(ULIB)
-TMAN = $(DESTDIR)$(prefix)$(MAN_PREFIX_EXTRA)/man/man1
-TDOC = $(DESTDIR)$(prefix)/share/doc/mlton
+prefix := $(PREFIX)
+MAN_PREFIX_EXTRA :=
+TBIN := $(DESTDIR)$(prefix)/bin
+ULIB := lib/mlton
+TLIB := $(DESTDIR)$(prefix)/$(ULIB)
+TMAN := $(DESTDIR)$(prefix)$(MAN_PREFIX_EXTRA)/man/man1
+TDOC := $(DESTDIR)$(prefix)/share/doc/mlton
 ifeq ($(TARGET_OS), cygwin)
-TDOC = $(DESTDIR)$(prefix)/usr/share/doc/mlton
+TDOC := $(DESTDIR)$(prefix)/usr/share/doc/mlton
 endif
 ifeq ($(TARGET_OS), solaris)
-TDOC = $(DESTDIR)$(prefix)/doc/mlton
+TDOC := $(DESTDIR)$(prefix)/doc/mlton
 endif
-TEXM = $(TDOC)/examples
+TEXM := $(TDOC)/examples
 
-GZIP_MAN = true
+GZIP_MAN := true
 ifeq ($(TARGET_OS), solaris)
-GZIP_MAN = false
+GZIP_MAN := false
 endif
 
 .PHONY: install
 install: install-docs install-no-docs
 
-MAN_PAGES =  \
+MAN_PAGES :=  \
 	mllex.1 \
 	mlnlffigen.1 \
 	mlprof.1 \
@@ -447,7 +451,7 @@
 	find $(TEXM)/ -name .svn -type d | xargs rm -rf
 	find $(TEXM)/ -name .ignore -type f | xargs rm -rf
 
-TDOCBASE = $(DESTDIR)$(prefix)/share/doc-base
+TDOCBASE := $(DESTDIR)$(prefix)/share/doc-base
 
 .PHONY: post-install-debian
 post-install-debian:	

Modified: mlton/trunk/basis-library/libs/basis-2002/top-level/Makefile
===================================================================
--- mlton/trunk/basis-library/libs/basis-2002/top-level/Makefile	2006-11-27 12:37:26 UTC (rev 4862)
+++ mlton/trunk/basis-library/libs/basis-2002/top-level/Makefile	2006-11-27 23:08:46 UTC (rev 4863)
@@ -5,7 +5,7 @@
  # See the file MLton-LICENSE for details.
  ##
 
-GEN = generate-overloads
+GEN := generate-overloads
 
 overloads.sml: $(GEN).sml
 	mlton $(GEN).sml

Modified: mlton/trunk/benchmark/Makefile
===================================================================
--- mlton/trunk/benchmark/Makefile	2006-11-27 12:37:26 UTC (rev 4862)
+++ mlton/trunk/benchmark/Makefile	2006-11-27 23:08:46 UTC (rev 4863)
@@ -6,17 +6,17 @@
  # See the file MLton-LICENSE for details.
  ##
 
-SRC = $(shell cd .. && pwd)
-BUILD = $(SRC)/build
-BIN = $(BUILD)/bin
-LIB = $(BUILD)/lib
-MLTON = mlton
-TARGET = self
-FLAGS = -target $(TARGET)	\
+SRC := $(shell cd .. && pwd)
+BUILD := $(SRC)/build
+BIN := $(BUILD)/bin
+LIB := $(BUILD)/lib
+MLTON := mlton
+TARGET := self
+FLAGS := -target $(TARGET)	\
 	-default-ann 'sequenceNonUnit warn' \
 	-default-ann 'warnUnused true'
-NAME = benchmark
-PATH = $(BIN):$(shell echo $$PATH)
+NAME := benchmark
+PATH := $(BIN):$(shell echo $$PATH)
 
 all: 	$(NAME)
 
@@ -40,19 +40,19 @@
 tags:
 	etags *.fun *.sig *.sml
 
-BENCH = barnes-hut boyer checksum count-graphs DLXSimulator fft fib flat-array hamlet imp-for knuth-bendix lexgen life logic mandelbrot matrix-multiply md5 merge mlyacc model-elimination mpuz nucleic output1 peek psdes-random ratio-regions ray raytrace simple smith-normal-form tailfib tak tensor tsp tyan vector-concat vector-rev vliw wc-input1 wc-scanStream zebra zern
-FPBENCH = barnes-hut fft hamlet mandelbrot matrix-multiply nucleic ray raytrace simple tensor tsp tyan vliw zern
+BENCH := barnes-hut boyer checksum count-graphs DLXSimulator fft fib flat-array hamlet imp-for knuth-bendix lexgen life logic mandelbrot matrix-multiply md5 merge mlyacc model-elimination mpuz nucleic output1 peek psdes-random ratio-regions ray raytrace simple smith-normal-form tailfib tak tensor tsp tyan vector-concat vector-rev vliw wc-input1 wc-scanStream zebra zern
+FPBENCH := barnes-hut fft hamlet mandelbrot matrix-multiply nucleic ray raytrace simple tensor tsp tyan vliw zern
 
-BFLAGS = -mlton "/usr/bin/mlton" -mlton "mlton -optimize-ssa {false,true}"
-BFLAGS = -wiki -mlton "/usr/bin/mlton" -mlkit -mosml -poly -smlnj
-BFLAGS = -mlton "$(BIN)/mlton"
+BFLAGS := -mlton "/usr/bin/mlton" -mlton "mlton -optimize-ssa {false,true}"
+BFLAGS := -wiki -mlton "/usr/bin/mlton" -mlkit -mosml -poly -smlnj
+BFLAGS := -mlton "$(BIN)/mlton"
 
 .PHONY: test
 test: $(NAME)
 	cd tests && ../benchmark $(BFLAGS) $(BENCH)
 
-QBENCH = $(BENCH)
-QBFLAGS = -mlton "mlton{-stable,.cvs.HEAD -detect-overflow {false,true}}"
+QBENCH := $(BENCH)
+QBFLAGS := -mlton "mlton{-stable,.cvs.HEAD -detect-overflow {false,true}}"
 
 .PHONY: qtest
 qtest: $(NAME)

Modified: mlton/trunk/bytecode/Makefile
===================================================================
--- mlton/trunk/bytecode/Makefile	2006-11-27 12:37:26 UTC (rev 4862)
+++ mlton/trunk/bytecode/Makefile	2006-11-27 23:08:46 UTC (rev 4863)
@@ -5,19 +5,13 @@
  # See the file MLton-LICENSE for details.
  ##
 
-TARGET_ARCH = $(shell ../bin/host-arch)
+TARGET_ARCH := $(shell ../bin/host-arch)
+TARGET_OS := $(shell ../bin/host-os)
 
 all: interpret.o interpret-gdb.o print-opcodes
 
-CC = gcc -std=gnu99
-CFLAGS = -fomit-frame-pointer -I../runtime -I../include -Wall
-DEBUGFLAGS = $(CFLAGS)
-ifneq ($(TARGET_ARCH), ia64)
-ifneq ($(TARGET_ARCH), powerpc)
-DEBUGFLAGS += -gstabs+
-endif
-endif
-DEBUGFLAGS += -g2
+CC := gcc -std=gnu99
+CFLAGS := -fomit-frame-pointer -I../runtime -I../include -Wall
 
 ifeq ($(TARGET_ARCH), amd64)
 CFLAGS += -m32
@@ -32,6 +26,14 @@
 CFLAGS += -I/usr/local/include
 endif
 
+DEBUGFLAGS := $(CFLAGS)
+ifneq ($(TARGET_ARCH), ia64)
+ifneq ($(TARGET_ARCH), powerpc)
+DEBUGFLAGS += -gstabs+
+endif
+endif
+DEBUGFLAGS += -g2
+
 interpret.o: interpret.c interpret.h opcode.h
 	$(CC) $(CFLAGS) -c -O2 $(OPTFLAGS) interpret.c
 

Modified: mlton/trunk/doc/examples/ffi/Makefile
===================================================================
--- mlton/trunk/doc/examples/ffi/Makefile	2006-11-27 12:37:26 UTC (rev 4862)
+++ mlton/trunk/doc/examples/ffi/Makefile	2006-11-27 23:08:46 UTC (rev 4863)
@@ -6,9 +6,9 @@
  # See the file MLton-LICENSE for details.
  ##
 
-PATH = ../../../build/bin:$(shell echo $$PATH)
+PATH := ../../../build/bin:$(shell echo $$PATH)
 
-mlton = mlton -default-ann 'allowFFI true'
+mlton := mlton -default-ann 'allowFFI true'
 
 .PHONY: all
 all: import import2 export iimport test_quot

Modified: mlton/trunk/doc/examples/finalizable/Makefile
===================================================================
--- mlton/trunk/doc/examples/finalizable/Makefile	2006-11-27 12:37:26 UTC (rev 4862)
+++ mlton/trunk/doc/examples/finalizable/Makefile	2006-11-27 23:08:46 UTC (rev 4863)
@@ -5,9 +5,9 @@
  # See the file MLton-LICENSE for details.
  ##
 
-PATH = ../../../build/bin:$(shell echo $$PATH)
+PATH := ../../../build/bin:$(shell echo $$PATH)
 
-mlton = mlton -default-ann 'allowFFI true'
+mlton := mlton -default-ann 'allowFFI true'
 
 all:
 	$(mlton) finalizable.sml cons.c

Modified: mlton/trunk/doc/examples/profiling/Makefile
===================================================================
--- mlton/trunk/doc/examples/profiling/Makefile	2006-11-27 12:37:26 UTC (rev 4862)
+++ mlton/trunk/doc/examples/profiling/Makefile	2006-11-27 23:08:46 UTC (rev 4863)
@@ -6,14 +6,14 @@
  # See the file MLton-LICENSE for details.
  ##
 
-mlton = mlton
-mlprof = mlprof
-ALLOC_EX = list-rev
-COUNT_EX = tak
-MULT_EX = fib-tak
-TIME_EX = tak
+mlton := mlton
+mlprof := mlprof
+ALLOC_EX := list-rev
+COUNT_EX := tak
+MULT_EX := fib-tak
+TIME_EX := tak
 
-PATH = ../../../build/bin:$(shell echo $$PATH)
+PATH := ../../../build/bin:$(shell echo $$PATH)
 
 .PHONY: all
 all: profile-time profile-alloc profile-count profile-stack profile-multiple

Modified: mlton/trunk/doc/examples/save-world/Makefile
===================================================================
--- mlton/trunk/doc/examples/save-world/Makefile	2006-11-27 12:37:26 UTC (rev 4862)
+++ mlton/trunk/doc/examples/save-world/Makefile	2006-11-27 23:08:46 UTC (rev 4863)
@@ -6,9 +6,9 @@
  # See the file MLton-LICENSE for details.
  ##
 
-PATH = ../../../build/bin:$(shell echo $$PATH)
+PATH := ../../../build/bin:$(shell echo $$PATH)
 
-mlton = mlton
+mlton := mlton
 
 all: test
 

Modified: mlton/trunk/doc/hacker-guide/Makefile
===================================================================
--- mlton/trunk/doc/hacker-guide/Makefile	2006-11-27 12:37:26 UTC (rev 4862)
+++ mlton/trunk/doc/hacker-guide/Makefile	2006-11-27 23:08:46 UTC (rev 4863)
@@ -6,7 +6,7 @@
  # See the file MLton-LICENSE for details.
  ##
 
-TEX_FILES = \
+TEX_FILES := \
 	abstract.tex		\
 	basis-library.tex	\
 	main.tex		\
@@ -16,7 +16,7 @@
 	runtime.tex		\
 	sources.tex		\
 
-FIG_FILES = \
+FIG_FILES := \
 	structure.ps		\
 
 all:	main.ps

Modified: mlton/trunk/doc/library-guide/Makefile
===================================================================
--- mlton/trunk/doc/library-guide/Makefile	2006-11-27 12:37:26 UTC (rev 4862)
+++ mlton/trunk/doc/library-guide/Makefile	2006-11-27 23:08:46 UTC (rev 4863)
@@ -6,12 +6,12 @@
  # See the file MLton-LICENSE for details.
  ##
 
-TEX_FILES = \
+TEX_FILES := \
 	abstract.tex		\
 	main.tex		\
 	macros.tex		\
 
-FIG_FILES = \
+FIG_FILES := \
 
 all:	main.ps
 

Modified: mlton/trunk/doc/mlb-formal/Makefile
===================================================================
--- mlton/trunk/doc/mlb-formal/Makefile	2006-11-27 12:37:26 UTC (rev 4862)
+++ mlton/trunk/doc/mlb-formal/Makefile	2006-11-27 23:08:46 UTC (rev 4863)
@@ -5,7 +5,7 @@
  # See the file MLton-LICENSE for details.
  ##
 
-TEX_FILES = \
+TEX_FILES := \
 	bib.bib			\
 	mlb-formal.tex
 

Modified: mlton/trunk/doc/style-guide/Makefile
===================================================================
--- mlton/trunk/doc/style-guide/Makefile	2006-11-27 12:37:26 UTC (rev 4862)
+++ mlton/trunk/doc/style-guide/Makefile	2006-11-27 23:08:46 UTC (rev 4863)
@@ -6,12 +6,12 @@
  # See the file MLton-LICENSE for details.
  ##
 
-TEX_FILES = \
+TEX_FILES := \
 	abstract.tex		\
 	main.tex		\
 	macros.tex		\
 
-FIG_FILES = \
+FIG_FILES := \
 
 all:	main.ps
 

Modified: mlton/trunk/lib/opengl/Makefile
===================================================================
--- mlton/trunk/lib/opengl/Makefile	2006-11-27 12:37:26 UTC (rev 4862)
+++ mlton/trunk/lib/opengl/Makefile	2006-11-27 23:08:46 UTC (rev 4863)
@@ -1,11 +1,11 @@
-mlton = mlton
-MLTON_FLAGS = \
+mlton := mlton
+MLTON_FLAGS := \
 	-default-ann 'allowFFI true' \
 	-target-link-opt cygwin '-L/lib/w32api -lglut32 -lglu32 -lopengl32' \
         -target-link-opt darwin '-framework GLUT -framework OpenGL -framework Foundation' \
 	-target-link-opt linux '-lglut -lGLU -lGL'
 
-GL_OBJS  = GL_c.o GLUT_c.o
+GL_OBJS  := GL_c.o GLUT_c.o
 
 %_h.h: %.cm %.sig %.sml
 	$(mlton) $(MLTON_FLAGS) -export-header $@ -stop tc $<

Modified: mlton/trunk/mllex/Makefile
===================================================================
--- mlton/trunk/mllex/Makefile	2006-11-27 12:37:26 UTC (rev 4862)
+++ mlton/trunk/mllex/Makefile	2006-11-27 23:08:46 UTC (rev 4863)
@@ -6,15 +6,15 @@
  # See the file MLton-LICENSE for details.
  ##
 
-SRC = $(shell cd .. && pwd)
-BUILD = $(SRC)/build
-BIN = $(BUILD)/bin
-LIB = $(BUILD)/lib
-MLTON = mlton
-TARGET = self
-FLAGS = -target $(TARGET)
-NAME = mllex
-PATH = $(BIN):$(shell echo $$PATH)
+SRC := $(shell cd .. && pwd)
+BUILD := $(SRC)/build
+BIN := $(BUILD)/bin
+LIB := $(BUILD)/lib
+MLTON := mlton
+TARGET := self
+FLAGS := -target $(TARGET)
+NAME := mllex
+PATH := $(BIN):$(shell echo $$PATH)
 
 all:	$(NAME)
 

Modified: mlton/trunk/mlnlffigen/Makefile
===================================================================
--- mlton/trunk/mlnlffigen/Makefile	2006-11-27 12:37:26 UTC (rev 4862)
+++ mlton/trunk/mlnlffigen/Makefile	2006-11-27 23:08:46 UTC (rev 4863)
@@ -5,15 +5,15 @@
  # See the file MLton-LICENSE for details.
  ##
 
-SRC = $(shell cd .. && pwd)
-BUILD = $(SRC)/build
-BIN = $(BUILD)/bin
-LIB = $(BUILD)/lib
-MLTON = mlton
-TARGET = self
-FLAGS = -target $(TARGET) -default-ann 'sequenceNonUnit warn'
-NAME = mlnlffigen
-PATH = $(BIN):$(shell echo $$PATH)
+SRC := $(shell cd .. && pwd)
+BUILD := $(SRC)/build
+BIN := $(BUILD)/bin
+LIB := $(BUILD)/lib
+MLTON := mlton
+TARGET := self
+FLAGS := -target $(TARGET) -default-ann 'sequenceNonUnit warn'
+NAME := mlnlffigen
+PATH := $(BIN):$(shell echo $$PATH)
 
 all:	$(NAME)
 

Modified: mlton/trunk/mlprof/Makefile
===================================================================
--- mlton/trunk/mlprof/Makefile	2006-11-27 12:37:26 UTC (rev 4862)
+++ mlton/trunk/mlprof/Makefile	2006-11-27 23:08:46 UTC (rev 4863)
@@ -6,15 +6,15 @@
  # See the file MLton-LICENSE for details.
  ##
 
-SRC = $(shell cd .. && pwd)
-BUILD = $(SRC)/build
-BIN = $(BUILD)/bin
-LIB = $(BUILD)/lib
-MLTON = mlton
-TARGET = self
-FLAGS = -target $(TARGET) -default-ann 'sequenceNonUnit warn' -default-ann 'warnUnused true'
-NAME = mlprof
-PATH = $(BIN):$(shell echo $$PATH)
+SRC := $(shell cd .. && pwd)
+BUILD := $(SRC)/build
+BIN := $(BUILD)/bin
+LIB := $(BUILD)/lib
+MLTON := mlton
+TARGET := self
+FLAGS := -target $(TARGET) -default-ann 'sequenceNonUnit warn' -default-ann 'warnUnused true'
+NAME := mlprof
+PATH := $(BIN):$(shell echo $$PATH)
 
 all:	$(NAME)
 

Modified: mlton/trunk/mlton/Makefile
===================================================================
--- mlton/trunk/mlton/Makefile	2006-11-27 12:37:26 UTC (rev 4862)
+++ mlton/trunk/mlton/Makefile	2006-11-27 23:08:46 UTC (rev 4863)
@@ -6,38 +6,38 @@
  # See the file MLton-LICENSE for details.
  ##
 
-SRC = $(shell cd .. && pwd)
-BUILD = $(SRC)/build
-BIN = $(BUILD)/bin
-HOST_ARCH = $(shell $(SRC)/bin/host-arch)
-HOST_OS = $(shell $(SRC)/bin/host-os)
-LIB = $(BUILD)/lib
-MLTON = mlton
-TARGET = self
-AOUT = mlton-compile
-UP = upgrade-basis.sml
-PATH = $(BIN):$(shell echo $$PATH)
+SRC := $(shell cd .. && pwd)
+BUILD := $(SRC)/build
+BIN := $(BUILD)/bin
+HOST_ARCH := $(shell $(SRC)/bin/host-arch)
+HOST_OS := $(shell $(SRC)/bin/host-os)
+LIB := $(BUILD)/lib
+MLTON := mlton
+TARGET := self
+AOUT := mlton-compile
+UP := upgrade-basis.sml
+PATH := $(BIN):$(shell echo $$PATH)
 
-FLAGS = @MLton max-heap 640m ram-slop 0.7 gc-summary $(RUNTIME_ARGS) --
+FLAGS := @MLton max-heap 640m ram-slop 0.7 gc-summary $(RUNTIME_ARGS) --
 
 ifeq (self, $(shell if [ -x $(BIN)/mlton ]; then echo self; fi))
   # We're compiling MLton with itself, so don't use any stubs.
-  FILE = mlton.mlb
+  FILE := mlton.mlb
   FLAGS += -default-ann 'sequenceNonUnit warn'
   FLAGS += -default-ann 'warnUnused true'
 else
 ifeq (cygwin, $(HOST_OS))
   # The stubs don't work on Cygwin, since they define spawn in terms of
   # fork, and fork doesn't work on Cygwin.  So, make without the stubs.
-  FILE = mlton.cm
+  FILE := mlton.cm
 else
 ifeq (mingw, $(HOST_OS))
   # Ditto for MinGW.
-  FILE = mlton.cm
+  FILE := mlton.cm
 else
   # We're compiling MLton with an older version of itself, so use the stubs for
   # the MLton structure.
-  FILE = mlton-stubs.cm
+  FILE := mlton-stubs.cm
 endif
 endif
 endif
@@ -54,7 +54,7 @@
 endif
 FLAGS += $(COMPILE_ARGS)
 
-SOURCES =			\
+SOURCES :=			\
 	$(FILE)			\
 	$(UP)			\
 	front-end/ml.lex.sml 	\
@@ -102,7 +102,7 @@
 # Manager (CM) installed.  You may need to replace the following with
 # 'sml-cm'.
 #
-SML	= sml
+SML	:= sml
 
 .PHONY: def-use
 def-use:

Modified: mlton/trunk/mlton/front-end/Makefile
===================================================================
--- mlton/trunk/mlton/front-end/Makefile	2006-11-27 12:37:26 UTC (rev 4862)
+++ mlton/trunk/mlton/front-end/Makefile	2006-11-27 23:08:46 UTC (rev 4863)
@@ -6,10 +6,10 @@
  # See the file MLton-LICENSE for details.
  ##
 
-SRC = $(shell cd ../.. && pwd)
-BUILD = $(SRC)/build
-BIN = $(BUILD)/bin
-PATH = $(BIN):$(shell echo $$PATH)
+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

Modified: mlton/trunk/mlyacc/Makefile
===================================================================
--- mlton/trunk/mlyacc/Makefile	2006-11-27 12:37:26 UTC (rev 4862)
+++ mlton/trunk/mlyacc/Makefile	2006-11-27 23:08:46 UTC (rev 4863)
@@ -6,15 +6,15 @@
  # See the file MLton-LICENSE for details.
  ##
 
-SRC = $(shell cd .. && pwd)
-BUILD = $(SRC)/build
-BIN = $(BUILD)/bin
-LIB = $(BUILD)/lib
-MLTON = mlton
-TARGET = self
-FLAGS = -target $(TARGET)
-NAME = mlyacc
-PATH = $(BIN):$(shell echo $$PATH)
+SRC := $(shell cd .. && pwd)
+BUILD := $(SRC)/build
+BIN := $(BUILD)/bin
+LIB := $(BUILD)/lib
+MLTON := mlton
+TARGET := self
+FLAGS := -target $(TARGET)
+NAME := mlyacc
+PATH := $(BIN):$(shell echo $$PATH)
 
 all:	$(NAME)
 

Modified: mlton/trunk/runtime/Makefile
===================================================================
--- mlton/trunk/runtime/Makefile	2006-11-27 12:37:26 UTC (rev 4862)
+++ mlton/trunk/runtime/Makefile	2006-11-27 23:08:46 UTC (rev 4863)
@@ -6,15 +6,15 @@
  # See the file MLton-LICENSE for details.
  ##
 
-PATH = ../bin:$(shell echo $$PATH)
+PATH := ../bin:$(shell echo $$PATH)
 
-TARGET = self
-TARGET_ARCH = $(shell ../bin/host-arch)
-TARGET_OS = $(shell ../bin/host-os)
-GCC_VERSION = $(shell gcc -v 2>&1 | grep 'gcc version' | sed 's/.*gcc version \(.\).*/\1/')
+TARGET := self
+TARGET_ARCH := $(shell ../bin/host-arch)
+TARGET_OS := $(shell ../bin/host-os)
+GCC_VERSION := $(shell gcc -v 2>&1 | grep 'gcc version' | sed 's/.*gcc version \(.\).*/\1/')
 
-FLAGS =
-OPTFLAGS = -fomit-frame-pointer
+FLAGS :=
+OPTFLAGS := -fomit-frame-pointer
 
 ifeq ($(TARGET_ARCH), x86)
 ifneq ($(findstring $(GCC_VERSION), 3 4),)
@@ -46,17 +46,17 @@
 endif
 
 ifeq ($(TARGET), self)
-AR = ar rc
-RANLIB = ranlib
+AR := ar rc
+RANLIB := ranlib
 else
-AR = $(TARGET)-ar rc
-RANLIB = $(TARGET)-ranlib
+AR := $(TARGET)-ar rc
+RANLIB := $(TARGET)-ranlib
 FLAGS += -b $(TARGET)
 endif
 
-CC = gcc -std=gnu99
-CFLAGS = -O2 -Wall -I. -Iplatform -D_FILE_OFFSET_BITS=64 $(FLAGS) $(OPTFLAGS)
-DEBUGFLAGS = $(CFLAGS)
+CC := gcc -std=gnu99
+CFLAGS := -O2 -Wall -I. -Iplatform -D_FILE_OFFSET_BITS=64 $(FLAGS) $(OPTFLAGS)
+DEBUGFLAGS := $(CFLAGS)
 ifneq ($(TARGET_ARCH), ia64)
 ifneq ($(TARGET_ARCH), powerpc)
 DEBUGFLAGS += -gstabs+
@@ -64,35 +64,35 @@
 endif
 DEBUGFLAGS += -g2
 
-CFILES = 							\
+CFILES := 							\
 	$(shell find basis -type f | grep '\.c$$' | grep -v Real/)	\
 	$(shell find Posix -type f | grep '\.c$$')		\
 	gc.c							\
 	platform.c
 
-HFILES = 				\
+HFILES := 				\
 	gc.h				\
 	types.h				\
 	platform.h			\
 	platform/$(TARGET_OS).h
 
-FILES = $(basename $(CFILES))
+FILES := $(basename $(CFILES))
 
 # EXTRA_CFILES is for files that we don't want compiled in the big
 # lump when compiling COMPILE_FAST.
 # Real/*.c can't be there because gcc -O2 messes some of them up.
-EXTRA_CFILES =			\
+EXTRA_CFILES :=			\
 	$(shell find basis/Real -type f | grep '\.c$$')	\
 	platform/$(TARGET_OS).c
 
-EXTRA_FILES = $(basename $(EXTRA_CFILES))
+EXTRA_FILES := $(basename $(EXTRA_CFILES))
 
 ifeq ($(COMPILE_FAST), yes)
-  OBJS = runtime.o
-  DEBUG_OBJS = runtime-gdb.o
+  OBJS := runtime.o
+  DEBUG_OBJS := runtime-gdb.o
 else
-  OBJS = $(foreach f, $(FILES), $(f).o)
-  DEBUG_OBJS = $(foreach f, $(FILES), $(f)-gdb.o)
+  OBJS := $(foreach f, $(FILES), $(f).o)
+  DEBUG_OBJS := $(foreach f, $(FILES), $(f)-gdb.o)
 endif
 
 OBJS += $(foreach f, $(EXTRA_FILES), $(f).o)




More information about the MLton-commit mailing list