[MLton-commit] r7447

Matthew Fluet fluet at mlton.org
Thu Mar 25 13:16:49 PST 2010


Don't build basis-ffi.sml and basis-ffi.h when building from clean sources.

It is convenient (for cross-compiling and porting) for the runtime to
build without requiring a working mlton.  Since basis-ffi.def changes
rarely, both basis-ffi.sml and basis-ffi.h are kept in the source
repository.  Also keep the gen-basis-ffi.stamp file (used to support
the multiple target Makefile rule) in the source repository.


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

U   mlton/trunk/runtime/Makefile
_U  mlton/trunk/runtime/gen/
U   mlton/trunk/runtime/gen/.ignore
A   mlton/trunk/runtime/gen/gen-basis-ffi.stamp

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

Modified: mlton/trunk/runtime/Makefile
===================================================================
--- mlton/trunk/runtime/Makefile	2010-03-20 01:37:24 UTC (rev 7446)
+++ mlton/trunk/runtime/Makefile	2010-03-25 21:16:48 UTC (rev 7447)
@@ -317,28 +317,34 @@
 	cp $< $@
 ml-types.h: gen/ml-types.h
 	cp $< $@
-gen/c-types.h gen/c-types.sml gen/ml-types.h: gen/gen-types
+gen/c-types.h gen/c-types.sml gen/ml-types.h: gen/gen-types.stamp
 	@touch $@
-gen/gen-types: gen/gen-types.c util.h util.o
+gen/gen-types.stamp: gen/gen-types.c util.h util.o
 	$(CC) $(OPTCFLAGS) $(WARNCFLAGS) -o gen/gen-types gen/gen-types.c util.o
-	rm -f gen/c-types.h gen/c-types.sml gen/ml-types.h
+	rm -f gen/c-types.h gen/c-types.sml gen/ml-types.h gen/gen-types.stamp
 	cd gen && ./gen-types
+	rm -f gen/gen-types$(EXE) gen/gen-types
+	touch $@
 
 basis-ffi.h: gen/basis-ffi.h
 	cp $< $@
-gen/basis-ffi.h gen/basis-ffi.sml: gen/gen-basis-ffi
+gen/basis-ffi.h gen/basis-ffi.sml: gen/gen-basis-ffi.stamp
 	@touch $@
-gen/gen-basis-ffi: gen/gen-basis-ffi.sml gen/basis-ffi.def
+gen/gen-basis-ffi.stamp: gen/gen-basis-ffi.sml gen/basis-ffi.def
 	mlton -output gen/gen-basis-ffi gen/gen-basis-ffi.sml
-	rm -f gen/basis-ffi.h gen/basis-ffi.sml
+	rm -f gen/basis-ffi.h gen/basis-ffi.sml gen/gen-basis-ffi.stamp
 	cd gen && ./gen-basis-ffi
+	rm -f gen/gen-basis-ffi
+	touch $@
 
-gen/sizes: gen/gen-sizes
+gen/sizes: gen/gen-sizes.stamp
 	@touch $@
-gen/gen-sizes: gen/gen-sizes.c libmlton.a $(HFILES)
+gen/gen-sizes.stamp: gen/gen-sizes.c libmlton.a $(HFILES)
 	$(CC) $(OPTCFLAGS) $(WARNCFLAGS) -I. -o gen/gen-sizes gen/gen-sizes.c -L. -lmlton
 	rm -f gen/sizes
 	cd gen && ./gen-sizes
+	rm -f gen/gen-sizes$(EXE) gen/gen-sizes
+	touch $@
 
 platform/$(TARGET_OS)-pic.o: $(PLATFORMCFILES)
 platform/$(TARGET_OS)-gdb.o: $(PLATFORMCFILES)


Property changes on: mlton/trunk/runtime/gen
___________________________________________________________________
Name: svn:ignore
   - c-types.h
c-types.sml
gen-basis-ffi
gen-basis-ffi.exe
gen-sizes
gen-sizes.exe
gen-types
gen-types.exe
ml-types.h
sizes

   + c-types.h
c-types.sml
gen-basis-ffi
gen-basis-ffi.exe
gen-sizes
gen-sizes.exe
gen-sizes.stamp
gen-types
gen-types.exe
gen-types.stamp
ml-types.h
sizes


Modified: mlton/trunk/runtime/gen/.ignore
===================================================================
--- mlton/trunk/runtime/gen/.ignore	2010-03-20 01:37:24 UTC (rev 7446)
+++ mlton/trunk/runtime/gen/.ignore	2010-03-25 21:16:48 UTC (rev 7447)
@@ -4,7 +4,9 @@
 gen-basis-ffi.exe
 gen-sizes
 gen-sizes.exe
+gen-sizes.stamp
 gen-types
 gen-types.exe
+gen-types.stamp
 ml-types.h
 sizes

Added: mlton/trunk/runtime/gen/gen-basis-ffi.stamp
===================================================================




More information about the MLton-commit mailing list