]> matita.cs.unibo.it Git - helm.git/commitdiff
- added/moved METAs in meta/ dir
authorStefano Zacchiroli <zack@upsilon.cc>
Sun, 5 Jan 2003 16:17:51 +0000 (16:17 +0000)
committerStefano Zacchiroli <zack@upsilon.cc>
Sun, 5 Jan 2003 16:17:51 +0000 (16:17 +0000)
- split one META for threadSafe module

helm/hbugs/META.hbugs-common [deleted file]
helm/hbugs/Makefile
helm/hbugs/broker/Makefile
helm/hbugs/meta/META.hbugs-common.in [new file with mode: 0644]
helm/hbugs/meta/META.hbugs-thread-safe.in [new file with mode: 0644]
helm/hbugs/meta/Makefile [new file with mode: 0644]

diff --git a/helm/hbugs/META.hbugs-common b/helm/hbugs/META.hbugs-common
deleted file mode 100644 (file)
index b39f540..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-requires="pcre pxp"
-directory="." # hack, just to shut up findlib's warnings
index da34da0ac65a632e2c1f2c77beec8b690711b415..a7898ea68bd88a9c2e967aa5b69592c0fb26dc8f 100644 (file)
@@ -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
index 07d255780281823d48f848389aa5ff69240ae10c..32fce5032a91c653d4d10ace849be44e25ad697a 100644 (file)
@@ -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 (file)
index 0000000..9a3ad73
--- /dev/null
@@ -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 (file)
index 0000000..157c035
--- /dev/null
@@ -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 (file)
index 0000000..51b974c
--- /dev/null
@@ -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)