98 lines
4.4 KiB
Plaintext
98 lines
4.4 KiB
Plaintext
$NetBSD: patch-Makefile,v 1.3 2013/11/01 10:47:50 jaapb Exp $
|
|
|
|
Use BSD_INSTALL_* instead of mkdir and cp; remove ocamlrun before cold start
|
|
--- Makefile.orig 2013-06-17 13:15:18.000000000 +0000
|
|
+++ Makefile
|
|
@@ -174,8 +174,10 @@ LIBFILES=stdlib.cma std_exit.cmo *.cmi c
|
|
# Start up the system from the distribution compiler
|
|
coldstart:
|
|
cd byterun; $(MAKE) all
|
|
+ rm -f boot/ocamlrun$(EXE)
|
|
cp byterun/ocamlrun$(EXE) boot/ocamlrun$(EXE)
|
|
cd yacc; $(MAKE) all
|
|
+ rm -f boot/ocamlyacc$(EXE)
|
|
cp yacc/ocamlyacc$(EXE) boot/ocamlyacc$(EXE)
|
|
cd stdlib; $(MAKE) COMPILER=../boot/ocamlc all
|
|
cd stdlib; cp $(LIBFILES) ../boot
|
|
@@ -265,29 +267,29 @@ base.opt: checkstack runtime core ocaml
|
|
COMPLIBDIR=$(LIBDIR)/compiler-libs
|
|
|
|
install:
|
|
- if test -d $(BINDIR); then : ; else $(MKDIR) $(BINDIR); fi
|
|
- if test -d $(LIBDIR); then : ; else $(MKDIR) $(LIBDIR); fi
|
|
- if test -d $(STUBLIBDIR); then : ; else $(MKDIR) $(STUBLIBDIR); fi
|
|
- if test -d $(COMPLIBDIR); then : ; else $(MKDIR) $(COMPLIBDIR); fi
|
|
+ if test -d $(BINDIR); then : ; else $(BSD_INSTALL_PROGRAM_DIR) $(BINDIR); fi
|
|
+ if test -d $(LIBDIR); then : ; else $(BSD_INSTALL_DATA_DIR) $(LIBDIR); fi
|
|
+ if test -d $(STUBLIBDIR); then : ; else $(BSD_INSTALL_DATA_DIR) $(STUBLIBDIR); fi
|
|
+ if test -d $(COMPLIBDIR); then : ; else $(BSD_INSTALL_DATA_DIR) $(COMPLIBDIR); fi
|
|
if test -d $(MANDIR)/man$(MANEXT); then : ; \
|
|
- else $(MKDIR) $(MANDIR)/man$(MANEXT); fi
|
|
- cp VERSION $(LIBDIR)/
|
|
+ else $(BSD_INSTALL_MAN_DIR) $(MANDIR)/man$(MANEXT); fi
|
|
+ $(BSD_INSTALL_DATA) VERSION $(LIBDIR)/
|
|
cd $(LIBDIR); rm -f dllbigarray.so dlllabltk.so dllnums.so \
|
|
dllthreads.so dllunix.so dllgraphics.so dllstr.so \
|
|
dlltkanim.so
|
|
cd byterun; $(MAKE) install
|
|
- cp ocamlc $(BINDIR)/ocamlc$(EXE)
|
|
- cp ocaml $(BINDIR)/ocaml$(EXE)
|
|
+ $(BSD_INSTALL_SCRIPT) ocamlc $(BINDIR)/ocamlc$(EXE)
|
|
+ $(BSD_INSTALL_SCRIPT) ocaml $(BINDIR)/ocaml$(EXE)
|
|
cd stdlib; $(MAKE) install
|
|
- cp lex/ocamllex $(BINDIR)/ocamllex$(EXE)
|
|
- cp yacc/ocamlyacc$(EXE) $(BINDIR)/ocamlyacc$(EXE)
|
|
- cp utils/*.cmi parsing/*.cmi typing/*.cmi bytecomp/*.cmi driver/*.cmi \
|
|
+ $(BSD_INSTALL_SCRIPT) lex/ocamllex $(BINDIR)/ocamllex$(EXE)
|
|
+ $(BSD_INSTALL_PROGRAM) yacc/ocamlyacc$(EXE) $(BINDIR)/ocamlyacc$(EXE)
|
|
+ $(BSD_INSTALL_DATA) utils/*.cmi parsing/*.cmi typing/*.cmi bytecomp/*.cmi driver/*.cmi \
|
|
toplevel/*.cmi $(COMPLIBDIR)
|
|
- cp compilerlibs/ocamlcommon.cma compilerlibs/ocamlbytecomp.cma \
|
|
+ $(BSD_INSTALL_DATA) compilerlibs/ocamlcommon.cma compilerlibs/ocamlbytecomp.cma \
|
|
compilerlibs/ocamltoplevel.cma $(BYTESTART) $(TOPLEVELSTART) \
|
|
$(COMPLIBDIR)
|
|
- cp expunge $(LIBDIR)/expunge$(EXE)
|
|
- cp toplevel/topdirs.cmi $(LIBDIR)
|
|
+ $(BSD_INSTALL_SCRIPT) expunge $(LIBDIR)/expunge$(EXE)
|
|
+ $(BSD_INSTALL_DATA) toplevel/topdirs.cmi $(LIBDIR)
|
|
cd tools; $(MAKE) install
|
|
-cd man; $(MAKE) install
|
|
for i in $(OTHERLIBRARIES); do \
|
|
@@ -297,17 +299,17 @@ install:
|
|
if test -f ocamlopt; then $(MAKE) installopt; else :; fi
|
|
if test -f debugger/ocamldebug; then (cd debugger; $(MAKE) install); \
|
|
else :; fi
|
|
- cp config/Makefile $(LIBDIR)/Makefile.config
|
|
+ $(BSD_INSTALL_DATA) config/Makefile $(LIBDIR)/Makefile.config
|
|
BINDIR=$(BINDIR) LIBDIR=$(LIBDIR) PREFIX=$(PREFIX) \
|
|
./build/partial-install.sh
|
|
|
|
# Installation of the native-code compiler
|
|
installopt:
|
|
cd asmrun; $(MAKE) install
|
|
- cp ocamlopt $(BINDIR)/ocamlopt$(EXE)
|
|
+ $(BSD_INSTALL_SCRIPT) ocamlopt $(BINDIR)/ocamlopt$(EXE)
|
|
cd stdlib; $(MAKE) installopt
|
|
- cp asmcomp/*.cmi $(COMPLIBDIR)
|
|
- cp compilerlibs/ocamloptcomp.cma $(OPTSTART) $(COMPLIBDIR)
|
|
+ $(BSD_INSTALL_DATA) asmcomp/*.cmi $(COMPLIBDIR)
|
|
+ $(BSD_INSTALL_DATA) compilerlibs/ocamloptcomp.cma $(OPTSTART) $(COMPLIBDIR)
|
|
cd ocamldoc; $(MAKE) installopt
|
|
for i in $(OTHERLIBRARIES); \
|
|
do (cd otherlibs/$$i; $(MAKE) installopt) || exit $$?; done
|
|
@@ -315,10 +317,10 @@ installopt:
|
|
cd tools; $(MAKE) installopt
|
|
|
|
installoptopt:
|
|
- cp ocamlc.opt $(BINDIR)/ocamlc.opt$(EXE)
|
|
- cp ocamlopt.opt $(BINDIR)/ocamlopt.opt$(EXE)
|
|
- cp lex/ocamllex.opt $(BINDIR)/ocamllex.opt$(EXE)
|
|
- cp compilerlibs/ocamlcommon.cmxa compilerlibs/ocamlcommon.a \
|
|
+ $(BSD_INSTALL_PROGRAM) ocamlc.opt $(BINDIR)/ocamlc.opt$(EXE)
|
|
+ $(BSD_INSTALL_PROGRAM) ocamlopt.opt $(BINDIR)/ocamlopt.opt$(EXE)
|
|
+ $(BSD_INSTALL_PROGRAM) lex/ocamllex.opt $(BINDIR)/ocamllex.opt$(EXE)
|
|
+ $(BSD_INSTALL_DATA) compilerlibs/ocamlcommon.cmxa compilerlibs/ocamlcommon.a \
|
|
compilerlibs/ocamlbytecomp.cmxa compilerlibs/ocamlbytecomp.a \
|
|
compilerlibs/ocamloptcomp.cmxa compilerlibs/ocamloptcomp.a \
|
|
$(BYTESTART:.cmo=.cmx) $(BYTESTART:.cmo=.o) \
|