# $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
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 > $@
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 =