]> matita.cs.unibo.it Git - helm.git/commitdiff
added test and test.opt targets
authorStefano Zacchiroli <zack@upsilon.cc>
Thu, 5 May 2005 15:54:34 +0000 (15:54 +0000)
committerStefano Zacchiroli <zack@upsilon.cc>
Thu, 5 May 2005 15:54:34 +0000 (15:54 +0000)
helm/ocaml/Makefile.common.in

index 5e30807819f7a4d2c528f78c4439cbb61d20c857..b191767d2538708bfb885e76df455b062b7fd352 100644 (file)
@@ -49,6 +49,10 @@ prereq: $(PREREQ)
 all: prereq $(IMPLEMENTATION_FILES:%.ml=%.cmo) $(ARCHIVE)
 opt: prereq $(IMPLEMENTATION_FILES:%.ml=%.cmx) $(ARCHIVE_OPT)
 world: all opt
+test: test.ml $(ARCHIVE)
+       $(OCAMLC) $(ARCHIVE) -linkpkg -o $@ $<
+test.opt: test.ml $(ARCHIVE_OPT)
+       $(OCAMLOPT) $(ARCHIVE_OPT) -linkpkg -o $@ $<
 
 depend: $(DEPEND_FILES)
        $(OCAMLDEP) $(INTERFACE_FILES) $(IMPLEMENTATION_FILES) > .depend
@@ -75,6 +79,8 @@ $(IMPLEMENTATION_FILES:%.ml=%.cmx): $(LIBRARIES_OPT)
 
 clean:
        rm -f *.cm[ioax] *.cmxa *.o *.a $(EXTRA_OBJECTS_TO_CLEAN)
+       if [ -f test ]; then rm -f test; else true; fi
+       if [ -f test.opt ]; then rm -f test.opt; else true; fi
 
 install:
        mkdir $(OCAMLFIND_DEST_DIR)/$(PACKAGE)