From 66cb9dbb90775e44e281cfa29429c335d41a9998 Mon Sep 17 00:00:00 2001 From: Stefano Zacchiroli Date: Tue, 28 Jun 2005 08:13:26 +0000 Subject: [PATCH] moved discovery of METAS dir to configure.ac: script.sh no longer needed when invoking make in subdirectories of ocaml/ --- helm/ocaml/Makefile.common.in | 7 ++++--- helm/ocaml/Makefile.in | 6 ++---- helm/ocaml/configure.ac | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/helm/ocaml/Makefile.common.in b/helm/ocaml/Makefile.common.in index 1ca6a08c6..6b7386466 100644 --- a/helm/ocaml/Makefile.common.in +++ b/helm/ocaml/Makefile.common.in @@ -9,6 +9,7 @@ # and put in a directory where there is a .depend file. OCAMLFIND_DEST_DIR = @OCAMLFIND_DEST_DIR@ +OCAMLPATH = @OCAMLFIND_META_DIR@ PREPROCOPTIONS = -pp camlp4o SYNTAXOPTIONS = -syntax camlp4o @@ -16,7 +17,7 @@ PREREQ = OCAMLOPTIONS = -package "$(REQUIRES)" -predicates "$(PREDICATES)" -thread OCAMLDEBUGOPTIONS = -g OCAMLARCHIVEOPTIONS = -OCAMLFIND = @OCAMLFIND@ +OCAMLFIND = OCAMLPATH=$(OCAMLPATH):$$OCAMLPATH @OCAMLFIND@ OCAMLC = $(OCAMLFIND) ocamlc $(OCAMLDEBUGOPTIONS) $(OCAMLOPTIONS) $(PREPROCOPTIONS) OCAMLOPT = $(OCAMLFIND) opt $(OCAMLOPTIONS) $(PREPROCOPTIONS) OCAMLDEP = $(OCAMLFIND) ocamldep -package "camlp4,$(REQUIRES)" $(SYNTAXOPTIONS) @@ -26,8 +27,8 @@ OCAMLYACC = ocamlyacc OCAMLC_P4 = $(OCAMLFIND) ocamlc $(OCAMLDEBUGOPTIONS) $(OCAMLOPTIONS) $(SYNTAXOPTIONS) OCAMLOPT_P4 = $(OCAMLFIND) opt $(OCAMLOPTIONS) $(SYNTAXOPTIONS) -LIBRARIES = $(shell ocamlfind query -recursive -predicates "byte $(PREDICATES)" -format "%d/%a" $(REQUIRES)) -LIBRARIES_OPT = $(shell ocamlfind query -recursive -predicates "native $(PREDICATES)" -format "%d/%a" $(REQUIRES)) +LIBRARIES = $(shell $(OCAMLFIND) query -recursive -predicates "byte $(PREDICATES)" -format "%d/%a" $(REQUIRES)) +LIBRARIES_OPT = $(shell $(OCAMLFIND) query -recursive -predicates "native $(PREDICATES)" -format "%d/%a" $(REQUIRES)) ARCHIVE = $(PACKAGE).cma diff --git a/helm/ocaml/Makefile.in b/helm/ocaml/Makefile.in index 00b5b0dd2..b6b3bd0d7 100644 --- a/helm/ocaml/Makefile.in +++ b/helm/ocaml/Makefile.in @@ -21,11 +21,9 @@ MODULES = \ $(NULL) OCAMLFIND_DEST_DIR = @OCAMLFIND_DEST_DIR@ -OCAMLFIND_META_DIR = @OCAMLFIND_META_DIR@ +OCAMLPATH = @OCAMLFIND_META_DIR@ METAS = $(MODULES:%=METAS/META.helm-%) -CWD := $(shell pwd) -OCAMLPATH = $(CWD)/METAS/ all: metas $(MODULES:%=%.all) opt: metas $(MODULES:%=%.opt) @@ -60,7 +58,7 @@ $(MODULES:%=%.uninstall): cd $(@:%.uninstall=%) && make uninstall rm -f $(OCAMLFIND_META_DIR)/$(@:%.uninstall=META.helm-%) METAS/META.helm-%: METAS/meta.helm-%.src - cp $< $@ && echo "directory=\"$(CWD)/$*\"" >> $@ + cp $< $@ && echo "directory=\"$(shell pwd)/$*\"" >> $@ .PHONY: .dep.dot .dep.dot: diff --git a/helm/ocaml/configure.ac b/helm/ocaml/configure.ac index 7c7d393a5..36bd36194 100644 --- a/helm/ocaml/configure.ac +++ b/helm/ocaml/configure.ac @@ -38,7 +38,7 @@ OCAMLFIND_DEST_DIR="/public/sacerdot/prova" AC_MSG_RESULT($OCAMLFIND_DEST_DIR) AC_MSG_CHECKING("where to install the META files") -OCAMLFIND_META_DIR="/public/sacerdot/prova/META" +OCAMLFIND_META_DIR=`pwd`/METAS AC_MSG_RESULT($OCAMLFIND_META_DIR) AC_SUBST(OCAMLFIND) -- 2.39.2