]> matita.cs.unibo.it Git - helm.git/blobdiff - components/Makefile.common
tagging rc-1
[helm.git] / components / Makefile.common
index b6ad6eb963c4b7a1f6775a0d1d9204f580977d5c..5090dcc78309151231efaa2eee9f923fec0c2c3e 100644 (file)
@@ -7,20 +7,22 @@ H=@
 #  $IMPLEMENTATION_FILES
 #  $EXTRA_OBJECTS_TO_INSTALL
 #  $EXTRA_OBJECTS_TO_CLEAN
-# and put in a directory where there is a .depend file.
+# and put in a directory where there is a .depend or .depend.opt file.
 
 # $OCAMLFIND must be set to a meaningful vaule, including OCAMLPATH=
 
-PREPROCOPTIONS = -pp camlp4o
-SYNTAXOPTIONS = -syntax camlp4o
+PREPROCOPTIONS = -pp camlp5o
+SYNTAXOPTIONS = -syntax camlp5o
 PREREQ =
-OCAMLOPTIONS = -package "$(REQUIRES)" -predicates "$(PREDICATES)" -thread
+OCAMLOPTIONS = -package "$(REQUIRES)" -predicates "$(PREDICATES)" -thread -rectypes
 OCAMLDEBUGOPTIONS = -g
+#OCAML_PROF=p -p a
 OCAMLARCHIVEOPTIONS =
 REQUIRES := $(shell $(OCAMLFIND) -query -format '%(requires)' helm-$(PACKAGE))
-OCAMLC = $(OCAMLFIND) ocamlc $(OCAMLDEBUGOPTIONS) $(OCAMLOPTIONS) $(PREPROCOPTIONS)
-OCAMLOPT = $(OCAMLFIND) opt $(OCAMLOPTIONS) $(PREPROCOPTIONS)
-OCAMLDEP = $(OCAMLFIND) ocamldep -package "camlp4 $(CAMLP4REQUIRES)" $(SYNTAXOPTIONS) $(OCAMLDEPOPTIONS) 
+OCAMLC = $(OCAMLFIND) ocamlc$(OCAML_PROF) $(OCAMLDEBUGOPTIONS) $(OCAMLOPTIONS) $(PREPROCOPTIONS)
+#OCAMLOPT_DEBUG_FLAGS = -p
+OCAMLOPT = $(OCAMLFIND) opt $(OCAMLOPTIONS) $(PREPROCOPTIONS) $(OCAMLOPT_DEBUG_FLAGS)
+OCAMLDEP = $(OCAMLFIND) ocamldep -package "camlp5 $(CAMLP5REQUIRES)" $(SYNTAXOPTIONS) $(OCAMLDEPOPTIONS) 
 OCAMLLEX = ocamllex
 OCAMLYACC = ocamlyacc
 
@@ -75,11 +77,12 @@ depend:: $(DEPEND_FILES)
 depend.opt:: $(DEPEND_FILES)
        $(H)echo "  OCAMLDEP -native"
        $(H)$(OCAMLDEP) -native \
-               $(INTERFACE_FILES) $(IMPLEMENTATION_FILES) > .depend
+               $(INTERFACE_FILES) $(IMPLEMENTATION_FILES) > .depend.opt
 
 $(PACKAGE).ps: .dep.dot
        dot -Tps -o $@ $<
 
+# FG: .depend or .depend.opt? 
 .dep.dot: .depend
        ocamldot < .depend > $@
 
@@ -129,13 +132,18 @@ STATS_FILES = \
        echo -n "LOC:" >> .stats
        wc -l $(STATS_FILES) | tail -1 | awk '{ print $$1 }' >> .stats
 
-.PHONY: all opt world backup depend install uninstall clean ocamlinit
+.PHONY: all opt backup depend depend.opt install uninstall clean ocamlinit
 
-ifneq ($(MAKECMDGOALS), depend)
- ifneq ($(MAKECMDGOALS), depend.opt)
-   include .depend   
- endif
+ifeq ($(MAKECMDGOALS),)
+  include .depend   
 endif
 
-NULL =
+ifeq ($(MAKECMDGOALS), all)
+  include .depend   
+endif
 
+ifeq ($(MAKECMDGOALS), opt)
+  include .depend.opt   
+endif
+
+NULL =