[MLton-commit] r4665

Stephen Weeks MLton@mlton.org
Sun, 25 Jun 2006 16:49:33 -0700


Added directory build/lib/<target>/include for target-specific
includes.  There is now one such include, c-types.h.


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

U   mlton/branches/on-20050822-x86_64-branch/Makefile
U   mlton/branches/on-20050822-x86_64-branch/bin/add-cross
U   mlton/branches/on-20050822-x86_64-branch/mlton/main/main.fun

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

Modified: mlton/branches/on-20050822-x86_64-branch/Makefile
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/Makefile	2006-06-24 20:34:47 UTC (rev 4664)
+++ mlton/branches/on-20050822-x86_64-branch/Makefile	2006-06-25 23:49:32 UTC (rev 4665)
@@ -146,7 +146,7 @@
 
 .PHONY: dirs
 dirs:
-	mkdir -p "$(BIN)" "$(LIB)/$(TARGET)" "$(INC)"
+	mkdir -p "$(BIN)" "$(LIB)/$(TARGET)/include" "$(INC)"
 
 .PHONY: docs
 docs: dirs
@@ -288,6 +288,7 @@
 		basis-library/primitive/basis-ffi.sml
 	$(CP) runtime/bytecode/opcodes "$(LIB)/"
 	$(CP) runtime/*.h "$(INC)/"
+	mv "$(INC)/c-types.h" "$(LIB)/$(TARGET)/include"
 	for d in basis basis/Real basis/Word gc platform util; do	\
 		mkdir -p "$(INC)/$$d";					\
 		$(CP) runtime/$$d/*.h "$(INC)/$$d";			\

Modified: mlton/branches/on-20050822-x86_64-branch/bin/add-cross
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/bin/add-cross	2006-06-24 20:34:47 UTC (rev 4664)
+++ mlton/branches/on-20050822-x86_64-branch/bin/add-cross	2006-06-25 23:49:32 UTC (rev 4665)
@@ -80,10 +80,11 @@
 ssh $machine "rm -rf $tmp && mkdir $tmp"
 
 echo 'Making runtime.' 
-( cd "$src" && tar cf - bin runtime ) | 
+( cd "$src" && tar cf - Makefile basis-library bin include runtime ) | 
         ssh $machine "cd $tmp && tar xf - && cd runtime &&
-                ../bin/mmake OMIT_BYTECODE=yes TARGET_ARCH=$crossArch TARGET_OS=$crossOS clean all"
-ssh $machine "cd $tmp/runtime && tar cf - *.a" | 
+                ../bin/mmake OMIT_BYTECODE=yes TARGET_ARCH=$crossArch TARGET_OS=$crossOS clean all &&
+		cd .. && make dirs runtime"
+ssh $machine "cd $tmp/build/lib/self && tar cf - ." | 
         ( cd "$lib/$crossTarget" && tar xf - )
 ( cd "$src" &&
         mmake TARGET=$crossTarget TARGET_ARCH=$crossArch TARGET_OS=$crossOS \
@@ -109,7 +110,6 @@
 
 exe='print-constants'
 echo "Compiling and running print-constants on $machine."
-cd "$original"
 "$src/build/bin/mlton" -build-constants true | 
         ssh $machine "cd $tmp/runtime &&
                         cat >$exe.c && 

Modified: mlton/branches/on-20050822-x86_64-branch/mlton/main/main.fun
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/mlton/main/main.fun	2006-06-24 20:34:47 UTC (rev 4664)
+++ mlton/branches/on-20050822-x86_64-branch/mlton/main/main.fun	2006-06-25 23:49:32 UTC (rev 4665)
@@ -637,6 +637,7 @@
           else ac)
       val asOpts = addTargetOpts asOpts
       val ccOpts = addTargetOpts ccOpts
+      val ccOpts = concat ["-I", !libTargetDir, "/include"] :: ccOpts
       val linkOpts =
          List.concat [[concat ["-L", !libTargetDir],
                        if !debugRuntime then "-lmlton-gdb" else "-lmlton"],