From 1041c080be05249d208adfb56e93c27ce38bff1d Mon Sep 17 00:00:00 2001 From: Michel Mauny Date: Wed, 28 Jul 2004 13:27:51 +0000 Subject: [PATCH] Added calls to ranlib (PR#2944) git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6566 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02 --- camlp4/camlp4/Makefile | 11 +++++++++-- camlp4/config/configure_batch | 1 + camlp4/lib/Makefile | 4 +++- camlp4/odyl/Makefile | 11 +++++++++-- 4 files changed, 22 insertions(+), 5 deletions(-) diff --git a/camlp4/camlp4/Makefile b/camlp4/camlp4/Makefile index c16edb71a..425182545 100644 --- a/camlp4/camlp4/Makefile +++ b/camlp4/camlp4/Makefile @@ -75,8 +75,15 @@ install: cp mLast.mli quotation.mli ast2pt.mli pcaml.mli spretty.mli "$(LIBDIR)/camlp4/." cp mLast.cmi quotation.cmi ast2pt.cmi pcaml.cmi spretty.cmi "$(LIBDIR)/camlp4/." cp camlp4.cma $(LIBDIR)/camlp4/. - for f in camlp4.$(A) camlp4.p.$(A) camlp4.cmxa camlp4.p.cmxa; do \ - test -f $$f && cp $$f "$(LIBDIR)/camlp4/." || true; \ + for f in camlp4.$(A) camlp4.p.$(A) ; do \ + if test -f $$f ; then \ + cp $$f "$(LIBDIR)/camlp4/." && ( cd "$(LIBDIR)/camlp4/." && $(RANLIB) $$f ) ; \ + fi ; \ + done + for f in camlp4.cmxa camlp4.p.cmxa ; do \ + if test -f $$f ; then \ + cp $$f "$(LIBDIR)/camlp4/." ; \ + fi ; \ done include .depend diff --git a/camlp4/config/configure_batch b/camlp4/config/configure_batch index 49b3dafca..737db8186 100755 --- a/camlp4/config/configure_batch +++ b/camlp4/config/configure_batch @@ -70,6 +70,7 @@ echo "O=o" >> Makefile.cnf echo "A=a" >> Makefile.cnf echo "OPT=" >> Makefile.cnf echo "OTOP=$ocaml_top" >> Makefile.cnf +grep '^RANLIB' ../../config/Makefile >> Makefile.cnf if test "$ocaml_top" = "../ocaml_stuff"; then if ocamlc -v >/dev/null 2>&1; then diff --git a/camlp4/lib/Makefile b/camlp4/lib/Makefile index b31818539..639a5cbb8 100644 --- a/camlp4/lib/Makefile +++ b/camlp4/lib/Makefile @@ -55,6 +55,8 @@ installopt: done # Special treatment for this one: some versions of make don't like $(A) in $(TARGET:.cma=.$(A)) target="`echo $(TARGET) | sed -e 's/\.cma$$/.$(A)/'`" ; \ - test -f $$target && cp $$target "$(LIBDIR)/camlp4/." || true + if test -f $$target ; then \ + cp $$target "$(LIBDIR)/camlp4/." && ( cd "$(LIBDIR)/camlp4/." && $(RANLIB) $$target ) \ + fi include .depend diff --git a/camlp4/odyl/Makefile b/camlp4/odyl/Makefile index 53b72d458..2595d0f3d 100644 --- a/camlp4/odyl/Makefile +++ b/camlp4/odyl/Makefile @@ -68,8 +68,15 @@ compare: install: -$(MKDIR) "$(LIBDIR)/camlp4" "$(BINDIR)" cp odyl.cmo odyl.cma odyl_main.cmi $(LIBDIR)/camlp4/. - for f in odyl.$(A) odyl.p.$(A) odyl.cmx odyl.o odyl.p.cmx odyl.p.o odyl.cmxa odyl.p.cmxa ; do \ - test -f $$f && cp $$f "$(LIBDIR)/camlp4/." || true; \ + for f in odyl.$(A) odyl.p.$(A) ; do \ + if test -f $$f ; then \ + cp $$f "$(LIBDIR)/camlp4/." && ( cd "$(LIBDIR)/camlp4/." && $(RANLIB) $$f ) ; \ + fi ; \ + done + for f in odyl.cmx odyl.o odyl.p.cmx odyl.p.o odyl.cmxa odyl.p.cmxa ; do \ + if test -f $$f ; then \ + cp $$f "$(LIBDIR)/camlp4/." ; \ + fi ; \ done include .depend