patch recherche d'acquereur

Stefan Monnier (monnier-stefan@cs.yale.edu)
Sat, 14 Dec 1996 03:28:43 -0500

From: "Stefan Monnier" <monnier-stefan@cs.yale.edu>
To: caml-list@pauillac.inria.fr
Subject: patch recherche d'acquereur
Date: Sat, 14 Dec 1996 03:28:43 -0500

This is a multipart MIME message.

--==_Exmh_-20120472960
Content-Type: text/plain; charset=us-ascii

Here are two patches for ocaml-1.03's Makefiles.
As you can see, nothing tremendous, it basically just makes sure that
the install step doesn't actually perform any useful computations: the
libcmlrun.a is build before that (and used for camlrun's build, as it
should probably have always been but strangely hasn't been until now)
and similarily, toplevellib.cma is built (and used for building ocaml).

This way I can do the "make install" on a different system than the one
I built ocaml. And it also makes me feel better because it is closer to
"the right thing". I still haven't been able to use anykind of shared-library,
tho. Anybody has been better luck ? Anybody tried to improve ocaml so as to
make it easier to use shared-linking (of .so is OK on most systems, but what
about shared-linking of toplevel.cma and stdlib.cma) ?

Stefan

--==_Exmh_-20120472960
Content-Type: application/x-patch ; name="Makefile.patch"
Content-Description: Makefile.patch
Content-Disposition: attachment; filename="Makefile.patch"

*** Makefile.orig Sat Dec 14 00:27:47 1996
--- Makefile Sat Dec 14 00:25:22 1996
***************
*** 177,183 ****
cd stdlib; $(MAKE) install
cp lex/ocamllex $(BINDIR)/ocamllex
cp yacc/ocamlyacc $(BINDIR)/ocamlyacc
! $(CAMLC) -a -o $(LIBDIR)/toplevellib.cma $(TOPLIB)
cp expunge $(LIBDIR)
cp toplevel/topmain.cmo $(LIBDIR)
cp toplevel/toploop.cmi toplevel/topdirs.cmi $(LIBDIR)
--- 177,183 ----
cd stdlib; $(MAKE) install
cp lex/ocamllex $(BINDIR)/ocamllex
cp yacc/ocamlyacc $(BINDIR)/ocamlyacc
! cp toplevellib.cma $(LIBDIR)/toplevellib.cma
cp expunge $(LIBDIR)
cp toplevel/topmain.cmo $(LIBDIR)
cp toplevel/toploop.cmi toplevel/topdirs.cmi $(LIBDIR)
***************
*** 213,220 ****

# The toplevel

! ocaml: $(TOPOBJS) expunge
! $(CAMLC) $(LINKFLAGS) -linkall -o ocaml.tmp $(TOPOBJS)
- $(CAMLRUN) ./expunge ocaml.tmp ocaml $(PERVASIVES)
rm -f ocaml.tmp

--- 213,223 ----

# The toplevel

! toplevellib.cma: $(TOPLIB)
! $(CAMLC) -a -o toplevellib.cma $(TOPLIB)
!
! ocaml: $(TOPLEVELMAIN) toplevellib.cma expunge
! $(CAMLC) $(LINKFLAGS) -linkall -o ocaml.tmp toplevellib.cma $(TOPLEVELMAIN)
- $(CAMLRUN) ./expunge ocaml.tmp ocaml $(PERVASIVES)
rm -f ocaml.tmp

--==_Exmh_-20120472960
Content-Type: application/x-patch ; name="Makefile.patch"
Content-Description: Makefile.patch
Content-Disposition: attachment; filename="Makefile.patch"

*** Makefile.orig Tue Oct 29 04:41:07 1996
--- Makefile Fri Dec 13 23:46:13 1996
***************
*** 19,35 ****

all: ocamlrun

! ocamlrun: $(OBJS) prims.o
! $(BYTECC) $(BYTECCCOMPOPTS) $(BYTECCLINKOPTS) -o ocamlrun prims.o $(OBJS) $(CCLIBS)

! ocamlrund: $(DOBJS) prims.o
! $(BYTECC) -g $(BYTECCCOMPOPTS) $(BYTECCLINKOPTS) -o ocamlrund prims.o $(DOBJS) $(CCLIBS)

install:
cp ocamlrun $(BINDIR)/ocamlrun
rm -f $(LIBDIR)/libcamlrun.a
! ar rc $(LIBDIR)/libcamlrun.a $(OBJS)
! cd $(LIBDIR); $(RANLIB) libcamlrun.a
if test -d $(LIBDIR)/caml; then : ; else mkdir $(LIBDIR)/caml; fi
cp mlvalues.h alloc.h misc.h $(LIBDIR)/caml
sed -e '/#include ".*\/m.h/r ../config/m.h' \
--- 19,34 ----

all: ocamlrun

! ocamlrun: prims.o libcamlrun.a
! $(BYTECC) $(BYTECCCOMPOPTS) $(BYTECCLINKOPTS) -o ocamlrun prims.o -L. -lcamlrun $(CCLIBS)

! ocamlrund: prims.o libcamlrund.a
! $(BYTECC) -g $(BYTECCCOMPOPTS) $(BYTECCLINKOPTS) -o ocamlrund prims.o -L. -lcamlrund $(CCLIBS)

install:
cp ocamlrun $(BINDIR)/ocamlrun
rm -f $(LIBDIR)/libcamlrun.a
! cp libcamlrun.a $(LIBDIR)/libcamlrun.a
if test -d $(LIBDIR)/caml; then : ; else mkdir $(LIBDIR)/caml; fi
cp mlvalues.h alloc.h misc.h $(LIBDIR)/caml
sed -e '/#include ".*\/m.h/r ../config/m.h' \
***************
*** 40,46 ****
-e '/Modify/,/^}/d' memory.h > $(LIBDIR)/caml/memory.h

libcamlrund.a: $(DOBJS)
! ar rc libcamlrund.a $(DOBJS)

clean:
rm -f ocamlrun ocamlrund *.o *.a
--- 39,50 ----
-e '/Modify/,/^}/d' memory.h > $(LIBDIR)/caml/memory.h

libcamlrund.a: $(DOBJS)
! ar rc $@ $(DOBJS)
! $(RANLIB) $@
!
! libcamlrun.a: $(OBJS)
! ar rc $@ $(OBJS)
! $(RANLIB) $@

clean:
rm -f ocamlrun ocamlrund *.o *.a

--==_Exmh_-20120472960--