Rebuilding source

Stephen Weeks MLton@sourcelight.com
Tue, 10 Oct 2000 12:53:38 -0700 (PDT)


 
> Really, I just want to know where to call  make nj-mlton  and where to get
> the mlton shell-script file set up correctly. 

Running 'make nj-mlton' from within src/mlton is supposed to work.

As to the shell script, src/bin/mlton is the working version of the script,
which is copied to bin/mlton for installation.

> I know that
> /src/mlton/Makefile has a nj-mlton rule, but I keep getting a call to
> mlton which I'm not expecting.

My guess is that it's coming from the following Makefile target in
src/mlton/Makefile

mlton.c: $(shell find . -follow -type f | grep '.cm$$')			\
		$(shell $(MLTON) -stop f mlton.cm)
	@echo 'Producing mlton.c (takes a while)'
	time $(MLTON) $(FLAGS) -stop c mlton.cm

In order to determine the dependencies, there is a call "mlton -stop f
mlton.cm", which produces the files that make up the program.  Since this is
part of the dependency calculation, it will run whenever you do a make.  If it
fails (e.g., because there is no MLton), that shouldn't cause a problem.

Note that $(MLTON) in this case is just mlton, which will refer to the first
mlton in your path.  So, if you already have mlton installed, it will get the
installed one.