prereq: $(PREREQ)
all: prereq $(IMPLEMENTATION_FILES:%.ml=%.cmo) $(ARCHIVE)
opt: prereq $(IMPLEMENTATION_FILES:%.ml=%.cmx) $(ARCHIVE_OPT)
+world: all opt
depend: $(DEPEND_FILES)
$(OCAMLDEP) $(INTERFACE_FILES) $(IMPLEMENTATION_FILES) > .depend
.dep.dot: .depend
ocamldot < .depend > $@
-.SUFFIXES: .ml .mli .cmo .cmi .cmx .mll .mly
-.ml.cmo:
+%.cmi: %.mli
$(OCAMLC) -c $<
-.mli.cmi:
+%.cmo %.cmi: %.ml
$(OCAMLC) -c $<
-.ml.cmx:
+%.cmx: %.ml
$(OCAMLOPT) -c $<
-.mly.ml:
+%.ml %.mli: %.mly
$(OCAMLYACC) $<
-.mly.mli:
- $(OCAMLYACC) $<
-.mll.ml:
+%.ml: %.mll
$(OCAMLLEX) $<
$(IMPLEMENTATION_FILES:%.ml=%.cmo): $(LIBRARIES)
cd $(OCAMLFIND_DEST_DIR)/$(PACKAGE) && rm -f $(OBJECTS_TO_INSTALL)
rmdir $(OCAMLFIND_DEST_DIR)/$(PACKAGE)
-.PHONY: all opt depend install uninstall clean
+backup:
+ cd ..; tar cvzf $(PACKAGE)_$(shell date +%s).tar.gz $(PACKAGE)
+
+.PHONY: all opt world backup depend install uninstall clean
ifneq ($(MAKECMDGOALS), depend)
include .depend