- split one META for threadSafe module
+++ /dev/null
-requires="pcre pxp"
-directory="." # hack, just to shut up findlib's warnings
DIRS_OPT = $(patsubst %,%.opt,$(DIRS))
DIRS_CLEAN = $(patsubst %,%.clean,$(DIRS))
all: byte
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)
world: byte opt
clean: $(DIRS_CLEAN)
%.byte:
$(MAKE) -C $*/ all
%.opt:
$(MAKE) -C $*/ opt
%.clean:
$(MAKE) -C $*/ 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
-REQUIRES = http threads hbugs-common
-COMMONDIR = ../common
+METADIR = ../meta
+REQUIRES = http threads hbugs-common hbugs-thread-safe
COMMONOPTS = -package "$(REQUIRES)" -pp camlp4o
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
MODULES = hbugs_broker_registry
-COMMON_MODULES = \
- hbugs_types threadSafe hbugs_misc hbugs_id_generator hbugs_messages
OBJS = $(patsubst %,%.cmo,$(MODULES))
OBJSOPT = $(patsubst %,%.cmx,$(MODULES))
OBJS = $(patsubst %,%.cmo,$(MODULES))
OBJSOPT = $(patsubst %,%.cmx,$(MODULES))
-COMMON_OBJS = $(patsubst %,$(COMMONDIR)/%.cmo,$(COMMON_MODULES))
-COMMON_OBJSOPT = $(patsubst %,$(COMMONDIR)/%.cmx,$(COMMON_MODULES))
$(OCAMLDEP) *.ml *.mli > .depend
%.cmi: %.mli
$(OCAMLDEP) *.ml *.mli > .depend
%.cmi: %.mli
- OCAMLPATH=".." $(OCAMLC) -c $<
- OCAMLPATH=".." $(OCAMLC) -c $<
- OCAMLPATH=".." $(OCAMLOPT) -c $<
include Makefile.overrides
$(NAME): $(OBJS) $(NAME).ml
include Makefile.overrides
$(NAME): $(OBJS) $(NAME).ml
- OCAMLPATH=".." $(OCAMLC) -linkpkg -thread -o $@ $(COMMON_OBJS) $^
+ $(OCAMLC) -linkpkg -thread -o $@ $^
$(NAME).opt: $(OBJSOPT) $(NAME).ml
$(NAME).opt: $(OBJSOPT) $(NAME).ml
- OCAMLPATH=".." $(OCAMLOPT) -linkpkg -thread -o $@ $(COMMON_OBJSOPT) $^
+ $(OCAMLOPT) -linkpkg -thread -o $@ $^
--- /dev/null
+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"
--- /dev/null
+requires="threads"
+directory="@HBUGS_COMMON_DIR@"
+archive(byte) = "threadSafe.cmo"
+archive(native) = "threadSafe.cmx"
--- /dev/null
+META = META.hbugs-common META.hbugs-thread-safe
+all: $(META)
+META.%: META.%.in
+ sed 's%@HBUGS_COMMON_DIR@%$(CURDIR)/../common%' < $< > $@
+clean:
+ rm -f $(META)