From fec47c17784b6c916f1398bb047ff0b02a887609 Mon Sep 17 00:00:00 2001 From: Stefano Zacchiroli Date: Sun, 5 Jan 2003 16:17:51 +0000 Subject: [PATCH] - added/moved METAs in meta/ dir - split one META for threadSafe module --- helm/hbugs/META.hbugs-common | 2 -- helm/hbugs/Makefile | 9 ++++++--- helm/hbugs/broker/Makefile | 24 ++++++++++------------- helm/hbugs/meta/META.hbugs-common.in | 4 ++++ helm/hbugs/meta/META.hbugs-thread-safe.in | 4 ++++ helm/hbugs/meta/Makefile | 6 ++++++ 6 files changed, 30 insertions(+), 19 deletions(-) delete mode 100644 helm/hbugs/META.hbugs-common create mode 100644 helm/hbugs/meta/META.hbugs-common.in create mode 100644 helm/hbugs/meta/META.hbugs-thread-safe.in create mode 100644 helm/hbugs/meta/Makefile diff --git a/helm/hbugs/META.hbugs-common b/helm/hbugs/META.hbugs-common deleted file mode 100644 index b39f54045..000000000 --- a/helm/hbugs/META.hbugs-common +++ /dev/null @@ -1,2 +0,0 @@ -requires="pcre pxp" -directory="." # hack, just to shut up findlib's warnings diff --git a/helm/hbugs/Makefile b/helm/hbugs/Makefile index da34da0ac..a7898ea68 100644 --- a/helm/hbugs/Makefile +++ b/helm/hbugs/Makefile @@ -4,14 +4,17 @@ DIRS_BYTE = $(patsubst %,%.byte,$(DIRS)) DIRS_OPT = $(patsubst %,%.opt,$(DIRS)) DIRS_CLEAN = $(patsubst %,%.clean,$(DIRS)) all: byte -byte: $(DIRS_BYTE) -opt: $(DIRS_OPT) +meta: + $(MAKE) -C meta/ +byte: meta $(DIRS_BYTE) +opt: meta $(DIRS_OPT) world: byte opt clean: $(DIRS_CLEAN) + $(MAKE) -C meta/ clean %.byte: $(MAKE) -C $*/ all %.opt: $(MAKE) -C $*/ opt %.clean: $(MAKE) -C $*/ clean -.PHONY: all byte opt world clean +.PHONY: all byte opt world clean meta diff --git a/helm/hbugs/broker/Makefile b/helm/hbugs/broker/Makefile index 07d255780..32fce5032 100644 --- a/helm/hbugs/broker/Makefile +++ b/helm/hbugs/broker/Makefile @@ -1,18 +1,14 @@ NAME = hbugs_broker -REQUIRES = http threads hbugs-common -COMMONDIR = ../common +METADIR = ../meta +REQUIRES = http threads hbugs-common hbugs-thread-safe COMMONOPTS = -package "$(REQUIRES)" -pp camlp4o -OCAMLC = ocamlfind ocamlc -I $(COMMONDIR) $(COMMONOPTS) -OCAMLOPT = ocamlfind ocamlopt -I $(COMMONDIR) $(COMMONOPTS) -OCAMLDEP = ocamlfind ocamldep $(COMMONOPTS) +OCAMLC = OCAMLPATH="$(METADIR)" ocamlfind ocamlc $(COMMONOPTS) +OCAMLOPT = OCAMLPATH="$(METADIR)" ocamlfind ocamlopt $(COMMONOPTS) +OCAMLDEP = OCAMLPATH="$(METADIR)" ocamlfind ocamldep $(COMMONOPTS) MODULES = hbugs_broker_registry -COMMON_MODULES = \ - hbugs_types threadSafe hbugs_misc hbugs_id_generator hbugs_messages OBJS = $(patsubst %,%.cmo,$(MODULES)) OBJSOPT = $(patsubst %,%.cmx,$(MODULES)) -COMMON_OBJS = $(patsubst %,$(COMMONDIR)/%.cmo,$(COMMON_MODULES)) -COMMON_OBJSOPT = $(patsubst %,$(COMMONDIR)/%.cmx,$(COMMON_MODULES)) all: byte byte: $(NAME) @@ -24,16 +20,16 @@ depend: $(OCAMLDEP) *.ml *.mli > .depend %.cmi: %.mli - OCAMLPATH=".." $(OCAMLC) -c $< + $(OCAMLC) -c $< %.cmo: %.ml %.cmi - OCAMLPATH=".." $(OCAMLC) -c $< + $(OCAMLC) -c $< %.cmx: %.ml %.cmi - OCAMLPATH=".." $(OCAMLOPT) -c $< + $(OCAMLOPT) -c $< include Makefile.overrides $(NAME): $(OBJS) $(NAME).ml - OCAMLPATH=".." $(OCAMLC) -linkpkg -thread -o $@ $(COMMON_OBJS) $^ + $(OCAMLC) -linkpkg -thread -o $@ $^ $(NAME).opt: $(OBJSOPT) $(NAME).ml - OCAMLPATH=".." $(OCAMLOPT) -linkpkg -thread -o $@ $(COMMON_OBJSOPT) $^ + $(OCAMLOPT) -linkpkg -thread -o $@ $^ distclean: clean clean: diff --git a/helm/hbugs/meta/META.hbugs-common.in b/helm/hbugs/meta/META.hbugs-common.in new file mode 100644 index 000000000..9a3ad7354 --- /dev/null +++ b/helm/hbugs/meta/META.hbugs-common.in @@ -0,0 +1,4 @@ +requires="pcre pxp" +directory="@HBUGS_COMMON_DIR@" +archive(byte) = "hbugs_types.cmo hbugs_misc.cmo hbugs_id_generator.cmo hbugs_messages.cmo" +archive(native) = "hbugs_types.cmx hbugs_misc.cmx hbugs_id_generator.cmx hbugs_messages.cmx" diff --git a/helm/hbugs/meta/META.hbugs-thread-safe.in b/helm/hbugs/meta/META.hbugs-thread-safe.in new file mode 100644 index 000000000..157c03570 --- /dev/null +++ b/helm/hbugs/meta/META.hbugs-thread-safe.in @@ -0,0 +1,4 @@ +requires="threads" +directory="@HBUGS_COMMON_DIR@" +archive(byte) = "threadSafe.cmo" +archive(native) = "threadSafe.cmx" diff --git a/helm/hbugs/meta/Makefile b/helm/hbugs/meta/Makefile new file mode 100644 index 000000000..51b974ced --- /dev/null +++ b/helm/hbugs/meta/Makefile @@ -0,0 +1,6 @@ +META = META.hbugs-common META.hbugs-thread-safe +all: $(META) +META.%: META.%.in + sed 's%@HBUGS_COMMON_DIR@%$(CURDIR)/../common%' < $< > $@ +clean: + rm -f $(META) -- 2.39.2