[MLton-commit] r5197

Vesa Karvonen vesak at mlton.org
Thu Feb 15 03:24:41 PST 2007


Added Makefile for compiling and running the tests.
----------------------------------------------------------------------

A   mltonlib/trunk/com/ssh/misc-util/unstable/Makefile

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

Added: mltonlib/trunk/com/ssh/misc-util/unstable/Makefile
===================================================================
--- mltonlib/trunk/com/ssh/misc-util/unstable/Makefile	2007-02-15 02:08:03 UTC (rev 5196)
+++ mltonlib/trunk/com/ssh/misc-util/unstable/Makefile	2007-02-15 11:24:41 UTC (rev 5197)
@@ -0,0 +1,44 @@
+# 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.
+
+##########################################################################
+
+.PHONY : check clean help
+
+help :
+	@echo "Targets:"
+	@echo "    check    Compiles (when necessary) and runs (always) the tests"
+	@echo "    clean    Removes generated files"
+	@echo "    help     You are reading it"
+
+clean :
+	rm -rf mlb-path-map test $(wildcard *.dep)
+
+check : test
+	./test
+
+##########################################################################
+
+mlb-path-map : Makefile
+	echo 'MLTON_LIB $(shell cd ../../../.. && pwd)' > $@
+	echo 'SML_COMPILER mlton' >> $@
+
+test : test.mlb mlb-path-map
+	mlton -stop f -mlb-path-map mlb-path-map $<        \
+	  | sed $$'s#\r##g'                                \
+	  | awk 'BEGIN    { line = "$@ :" }                \
+	                  { print line " \\" ; line=$$1 }  \
+	         END      { print line }'                  \
+	  > $@.dep
+	mlton -mlb-path-map mlb-path-map     \
+	      -prefer-abs-paths true         \
+	      -show-def-use $@.def-use       \
+	      -output $@                     \
+	      -link-opt -ldl                 \
+	      $<
+
+##########################################################################
+
+include $(wildcard *.dep)


Property changes on: mltonlib/trunk/com/ssh/misc-util/unstable/Makefile
___________________________________________________________________
Name: svn:eol-style
   + native




More information about the MLton-commit mailing list