From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id IAA22313 for caml-redistribution; Mon, 16 Dec 1996 08:45:40 +0100 (MET) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id QAA26454 for ; Sat, 14 Dec 1996 16:12:48 +0100 (MET) Received: from POWERED.ZOO2.CS.YALE.EDU (ZOO-GW.CS.YALE.EDU [128.36.0.5]) by concorde.inria.fr (8.7.6/8.7.1) with ESMTP id JAA25599 for ; Sat, 14 Dec 1996 09:28:47 +0100 (MET) Received: from cs.yale.edu by POWERED.ZOO2.CS.YALE.EDU (8.7/res.host.cf-3.5) with ESMTP id DAA30408; Sat, 14 Dec 1996 03:28:45 -0500 From: "Stefan Monnier" To: caml-list@pauillac.inria.fr Cc: "Stefan Monnier" Subject: patch recherche d'acquereur Mime-Version: 1.0 Content-Type: multipart/mixed ; boundary="==_Exmh_-20120472960" Date: Sat, 14 Dec 1996 03:28:43 -0500 Message-ID: <22318.850552123@cs.yale.edu> Sender: weis 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--