[MLton-commit] r5258
Vesa Karvonen
vesak at mlton.org
Sun Feb 18 23:39:52 PST 2007
Going to use union PtrIntObj in the PtrIntObj of PtrCache.
----------------------------------------------------------------------
_U mltonlib/trunk/com/ssh/misc-util/unstable/
U mltonlib/trunk/com/ssh/misc-util/unstable/Makefile
U mltonlib/trunk/com/ssh/misc-util/unstable/lib.mlb
A mltonlib/trunk/com/ssh/misc-util/unstable/ptr-int-obj.h
----------------------------------------------------------------------
Property changes on: mltonlib/trunk/com/ssh/misc-util/unstable
___________________________________________________________________
Name: svn:ignore
- *.dep
mlb-path-map
test
+ *.dep
generated
mlb-path-map
test
Modified: mltonlib/trunk/com/ssh/misc-util/unstable/Makefile
===================================================================
--- mltonlib/trunk/com/ssh/misc-util/unstable/Makefile 2007-02-19 01:01:22 UTC (rev 5257)
+++ mltonlib/trunk/com/ssh/misc-util/unstable/Makefile 2007-02-19 07:39:49 UTC (rev 5258)
@@ -5,27 +5,49 @@
##########################################################################
-.PHONY : check clean help
+target-arch := $(shell mlton -show path-map | awk '/^TARGET_ARCH/ {print $$2}')
+target-os := $(shell mlton -show path-map | awk '/^TARGET_OS/ {print $$2}')
+target-id := $(target-arch)-$(target-os)
+gen-dir := generated/$(target-id)
+
+ffi-h-files := $(wildcard *.h)
+
+nlffi-mlb := $(gen-dir)/nlffi/lib.mlb
+
+##########################################################################
+
+.PHONY : all check clean help
+
help :
@echo "Targets:"
+ @echo " all Builds the NLFFI files"
@echo " check Compiles (when necessary) and runs (always) the tests"
@echo " clean Removes generated files"
@echo " help You are reading it"
+all : $(nlffi-mlb)
+
clean :
- rm -rf mlb-path-map test $(wildcard *.dep)
+ rm -rf mlb-path-map test $(wildcard *.dep) $(gen-dir)
check : test
./test
##########################################################################
+$(nlffi-mlb) : $(ffi-h-files)
+ mkdir -p $(@D)
+ mlnlffigen -dir $(@D) \
+ -mlbfile $(@F) \
+ -linkage static \
+ $^
+
mlb-path-map : Makefile
echo 'MLTON_LIB $(shell cd ../../../.. && pwd)' > $@
echo 'SML_COMPILER mlton' >> $@
-test : test.mlb mlb-path-map
+test : test.mlb mlb-path-map $(nlffi-mlb)
mlton -stop f -mlb-path-map mlb-path-map $< \
| sed $$'s#\r##g' \
| awk 'BEGIN { printf "$@ :" } { printf " " $$1 }' \
Modified: mltonlib/trunk/com/ssh/misc-util/unstable/lib.mlb
===================================================================
--- mltonlib/trunk/com/ssh/misc-util/unstable/lib.mlb 2007-02-19 01:01:22 UTC (rev 5257)
+++ mltonlib/trunk/com/ssh/misc-util/unstable/lib.mlb 2007-02-19 07:39:49 UTC (rev 5258)
@@ -47,6 +47,7 @@
cache.sig
local
$(SML_LIB)/mlnlffi-lib/mlnlffi-lib.mlb
+ generated/$(TARGET_ARCH)-$(TARGET_OS)/nlffi/lib.mlb
in
cache.sml
mk-int-obj-cache.fun
Added: mltonlib/trunk/com/ssh/misc-util/unstable/ptr-int-obj.h
===================================================================
--- mltonlib/trunk/com/ssh/misc-util/unstable/ptr-int-obj.h 2007-02-19 01:01:22 UTC (rev 5257)
+++ mltonlib/trunk/com/ssh/misc-util/unstable/ptr-int-obj.h 2007-02-19 07:39:49 UTC (rev 5258)
@@ -0,0 +1,15 @@
+#ifndef PTR_INT_OBJ_H_20070218
+#define PTR_INT_OBJ_H_20070218
+
+/* Copyright (C) 2007 SSH Communications Security, Helsinki, Finland
+ *
+ * This code is released under the MLton license, a BSD-style license.
+ * See the LICENSE file or http://mlton.org/License for details.
+ */
+
+union PtrIntObj {
+ union PtrIntObj *next;
+ int value;
+};
+
+#endif
Property changes on: mltonlib/trunk/com/ssh/misc-util/unstable/ptr-int-obj.h
___________________________________________________________________
Name: svn:eol-style
+ native
More information about the MLton-commit
mailing list