From 859ff94edcafb5e28839144166764ab85462c3da Mon Sep 17 00:00:00 2001 From: Stefano Zacchiroli Date: Thu, 22 Jan 2004 12:22:02 +0000 Subject: [PATCH] - added backup target - use pattern rules instead of anciente prefix rules --- helm/ocaml/Makefile.common.in | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/helm/ocaml/Makefile.common.in b/helm/ocaml/Makefile.common.in index e71b71942..07720651a 100644 --- a/helm/ocaml/Makefile.common.in +++ b/helm/ocaml/Makefile.common.in @@ -39,6 +39,7 @@ $(ARCHIVE_OPT): $(IMPLEMENTATION_FILES:%.ml=%.cmx) $(LIBRARIES_OPT) 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 @@ -49,18 +50,15 @@ $(PACKAGE).ps: .dep.dot .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) @@ -77,7 +75,10 @@ uninstall: 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 -- 2.39.2