From 5e62804a378fe63acf68edc6651a59ee273ce70c Mon Sep 17 00:00:00 2001 From: Stefano Zacchiroli Date: Fri, 10 Jan 2003 11:36:26 +0000 Subject: [PATCH] - added "dist" target - uwobo.ml compiled and linked with a single ocaml compiler invocation --- helm/uwobo/src/ocaml/Makefile | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/helm/uwobo/src/ocaml/Makefile b/helm/uwobo/src/ocaml/Makefile index 0004d15d5..4c5f463f9 100644 --- a/helm/uwobo/src/ocaml/Makefile +++ b/helm/uwobo/src/ocaml/Makefile @@ -1,13 +1,15 @@ +VERSION = 0.0.1 +DISTDIR = uwobo-$(VERSION) REQUIRES = http gdome2 gdome2-xslt pcre unix threads COMMONOPTS = -package "$(REQUIRES)" -pp camlp4o OCAMLC = ocamlfind ocamlc $(COMMONOPTS) OCAMLOPT = ocamlfind ocamlopt $(COMMONOPTS) OCAMLDEP = ocamlfind ocamldep $(COMMONOPTS) -MODULES = uwobo_common uwobo_styles uwobo_logger uwobo_engine uwobo +MODULES = uwobo_common uwobo_styles uwobo_logger uwobo_engine OBJS = $(patsubst %,%.cmo,$(MODULES)) OBJSOPT = $(patsubst %,%.cmx,$(MODULES)) -all: opt +all: world byte: uwobo opt: uwobo.opt world: byte opt @@ -26,13 +28,24 @@ uwobo.cmo: uwobo.ml $(OCAMLC) -c $< uwobo.cmx: uwobo.ml $(OCAMLOPT) -c $< -uwobo: $(OBJS) +uwobo: $(OBJS) uwobo.ml $(OCAMLC) -linkpkg -thread -o $@ $^ -uwobo.opt: $(OBJSOPT) +uwobo.opt: $(OBJSOPT) uwobo.ml $(OCAMLOPT) -linkpkg -thread -o $@ $^ +distclean: clean clean: rm -f *.cm[aiox] *.o uwobo{,.opt} +dist: distclean depend + mkdir $(DISTDIR)/ + cp \ + $(patsubst %, %.ml, $(MODULES)) \ + $(patsubst %, %.mli, $(MODULES)) \ + uwobo.ml \ + Makefile .depend \ + $(DISTDIR)/ + tar cvzf $(DISTDIR).tar.gz $(DISTDIR)/ + rm -rf $(DISTDIR)/ .PHONY: all byte opt world depend clean -- 2.39.2