mirror of
https://github.com/Stichting-MINIX-Research-Foundation/pkgsrc-ng.git
synced 2025-09-08 11:52:55 -04:00
125 lines
6.0 KiB
Plaintext
125 lines
6.0 KiB
Plaintext
$NetBSD: patch-Makefile,v 1.8 2016/05/05 08:12:01 jaapb Exp $
|
|
|
|
Use BSD_INSTALL_* instead of mkdir and cp; remove ocamlrun before cold start
|
|
--- Makefile.orig 2016-04-01 12:53:41.000000000 +0000
|
|
+++ Makefile
|
|
@@ -92,8 +92,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
|
|
@@ -206,36 +208,36 @@ INSTALL_MANDIR=$(DESTDIR)$(MANDIR)
|
|
|
|
install:
|
|
if test -d $(INSTALL_BINDIR); then : ; \
|
|
- else $(MKDIR) $(INSTALL_BINDIR); fi
|
|
+ else $(BSD_INSTALL_PROGRAM_DIR) $(INSTALL_BINDIR); fi
|
|
if test -d $(INSTALL_LIBDIR); then : ; \
|
|
- else $(MKDIR) $(INSTALL_LIBDIR); fi
|
|
+ else $(BSD_INSTALL_DATA_DIR) $(INSTALL_LIBDIR); fi
|
|
if test -d $(INSTALL_STUBLIBDIR); then : ; \
|
|
- else $(MKDIR) $(INSTALL_STUBLIBDIR); fi
|
|
+ else $(BSD_INSTALL_DATA_DIR) $(INSTALL_STUBLIBDIR); fi
|
|
if test -d $(INSTALL_COMPLIBDIR); then : ; \
|
|
- else $(MKDIR) $(INSTALL_COMPLIBDIR); fi
|
|
+ else $(BSD_INSTALL_DATA_DIR) $(INSTALL_COMPLIBDIR); fi
|
|
if test -d $(INSTALL_MANDIR)/man$(MANEXT); then : ; \
|
|
- else $(MKDIR) $(INSTALL_MANDIR)/man$(MANEXT); fi
|
|
- cp VERSION $(INSTALL_LIBDIR)/
|
|
+ else $(BSD_INSTALL_MAN_DIR) $(INSTALL_MANDIR)/man$(MANEXT); fi
|
|
+ $(BSD_INSTALL_DATA) VERSION $(INSTALL_LIBDIR)/
|
|
cd $(INSTALL_LIBDIR); rm -f \
|
|
dllbigarray$(EXT_DLL) dllnums$(EXT_DLL) dllthreads$(EXT_DLL) \
|
|
dllunix$(EXT_DLL) dllgraphics$(EXT_DLL) dllstr$(EXT_DLL)
|
|
cd byterun; $(MAKE) install
|
|
- cp ocamlc $(INSTALL_BINDIR)/ocamlc$(EXE)
|
|
- cp ocaml $(INSTALL_BINDIR)/ocaml$(EXE)
|
|
+ $(BSD_INSTALL_SCRIPT) ocamlc $(INSTALL_BINDIR)/ocamlc$(EXE)
|
|
+ $(BSD_INSTALL_SCRIPT) ocaml $(INSTALL_BINDIR)/ocaml$(EXE)
|
|
cd stdlib; $(MAKE) install
|
|
- cp lex/ocamllex $(INSTALL_BINDIR)/ocamllex$(EXE)
|
|
- cp $(CAMLYACC)$(EXE) $(INSTALL_BINDIR)/ocamlyacc$(EXE)
|
|
- cp utils/*.cmi utils/*.cmt utils/*.cmti \
|
|
+ $(BSD_INSTALL_SCRIPT) lex/ocamllex $(INSTALL_BINDIR)/ocamllex$(EXE)
|
|
+ $(BSD_INSTALL_SCRIPT) $(CAMLYACC)$(EXE) $(INSTALL_BINDIR)/ocamlyacc$(EXE)
|
|
+ $(BSD_INSTALL_DATA) utils/*.cmi utils/*.cmt utils/*.cmti \
|
|
parsing/*.cmi parsing/*.cmt parsing/*.cmti \
|
|
typing/*.cmi typing/*.cmt typing/*.cmti \
|
|
bytecomp/*.cmi bytecomp/*.cmt bytecomp/*.cmti \
|
|
driver/*.cmi driver/*.cmt driver/*.cmti \
|
|
toplevel/*.cmi toplevel/*.cmt toplevel/*.cmti $(INSTALL_COMPLIBDIR)
|
|
- cp compilerlibs/ocamlcommon.cma compilerlibs/ocamlbytecomp.cma \
|
|
+ $(BSD_INSTALL_DATA) compilerlibs/ocamlcommon.cma compilerlibs/ocamlbytecomp.cma \
|
|
compilerlibs/ocamltoplevel.cma $(BYTESTART) $(TOPLEVELSTART) \
|
|
$(INSTALL_COMPLIBDIR)
|
|
- cp expunge $(INSTALL_LIBDIR)/expunge$(EXE)
|
|
- cp toplevel/topdirs.cmi $(INSTALL_LIBDIR)
|
|
+ $(BSD_INSTALL_SCRIPT) expunge $(INSTALL_LIBDIR)/expunge$(EXE)
|
|
+ $(BSD_INSTALL_DATA) toplevel/topdirs.cmi $(INSTALL_LIBDIR)
|
|
cd tools; $(MAKE) install
|
|
-cd man; $(MAKE) install
|
|
for i in $(OTHERLIBRARIES); do \
|
|
@@ -243,20 +245,20 @@ install:
|
|
done
|
|
if test -n "$(WITH_OCAMLDOC)"; then (cd ocamldoc; $(MAKE) install); fi
|
|
if test -n "$(WITH_DEBUGGER)"; then (cd debugger; $(MAKE) install); fi
|
|
- cp config/Makefile $(INSTALL_LIBDIR)/Makefile.config
|
|
+ $(BSD_INSTALL_DATA) config/Makefile $(INSTALL_LIBDIR)/Makefile.config
|
|
if test -f ocamlopt; then $(MAKE) installopt; fi
|
|
|
|
# Installation of the native-code compiler
|
|
installopt:
|
|
cd asmrun; $(MAKE) install
|
|
- cp ocamlopt $(INSTALL_BINDIR)/ocamlopt$(EXE)
|
|
+ $(BSD_INSTALL_SCRIPT) ocamlopt $(INSTALL_BINDIR)/ocamlopt$(EXE)
|
|
cd stdlib; $(MAKE) installopt
|
|
- cp middle_end/*.cmi middle_end/*.cmt middle_end/*.cmti \
|
|
+ $(BSD_INSTALL_DATA) middle_end/*.cmi middle_end/*.cmt middle_end/*.cmti \
|
|
$(INSTALL_COMPLIBDIR)
|
|
- cp middle_end/base_types/*.cmi middle_end/base_types/*.cmt \
|
|
+ $(BSD_INSTALL_DATA) middle_end/base_types/*.cmi middle_end/base_types/*.cmt \
|
|
middle_end/base_types/*.cmti $(INSTALL_COMPLIBDIR)
|
|
- cp asmcomp/*.cmi asmcomp/*.cmt asmcomp/*.cmti $(INSTALL_COMPLIBDIR)
|
|
- cp compilerlibs/ocamloptcomp.cma $(OPTSTART) $(INSTALL_COMPLIBDIR)
|
|
+ $(BSD_INSTALL_DATA) asmcomp/*.cmi asmcomp/*.cmt asmcomp/*.cmti $(INSTALL_COMPLIBDIR)
|
|
+ $(BSD_INSTALL_DATA) compilerlibs/ocamloptcomp.cma $(OPTSTART) $(INSTALL_COMPLIBDIR)
|
|
if test -n "$(WITH_OCAMLDOC)"; then (cd ocamldoc; $(MAKE) installopt); \
|
|
else :; fi
|
|
for i in $(OTHERLIBRARIES); \
|
|
@@ -265,21 +267,21 @@ installopt:
|
|
cd tools; $(MAKE) installopt
|
|
|
|
installoptopt:
|
|
- cp ocamlc.opt $(INSTALL_BINDIR)/ocamlc.opt$(EXE)
|
|
- cp ocamlopt.opt $(INSTALL_BINDIR)/ocamlopt.opt$(EXE)
|
|
- cp lex/ocamllex.opt $(INSTALL_BINDIR)/ocamllex.opt$(EXE)
|
|
- cp utils/*.cmx parsing/*.cmx typing/*.cmx bytecomp/*.cmx \
|
|
+ $(BSD_INSTALL_PROGRAM) ocamlc.opt $(INSTALL_BINDIR)/ocamlc.opt$(EXE)
|
|
+ $(BSD_INSTALL_PROGRAM) ocamlopt.opt $(INSTALL_BINDIR)/ocamlopt.opt$(EXE)
|
|
+ $(BSD_INSTALL_PROGRAM) lex/ocamllex.opt $(INSTALL_BINDIR)/ocamllex.opt$(EXE)
|
|
+ $(BSD_INSTALL_DATA) utils/*.cmx parsing/*.cmx typing/*.cmx bytecomp/*.cmx \
|
|
driver/*.cmx asmcomp/*.cmx $(INSTALL_COMPLIBDIR)
|
|
- cp compilerlibs/ocamlcommon.cmxa compilerlibs/ocamlcommon.a \
|
|
+ $(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) \
|
|
$(OPTSTART:.cmo=.cmx) $(OPTSTART:.cmo=.o) \
|
|
$(INSTALL_COMPLIBDIR)
|
|
if test -f ocamlnat ; then \
|
|
- cp ocamlnat $(INSTALL_BINDIR)/ocamlnat$(EXE); \
|
|
- cp toplevel/opttopdirs.cmi $(INSTALL_LIBDIR); \
|
|
- cp compilerlibs/ocamlopttoplevel.cmxa \
|
|
+ $(BSD_INSTALL_PROGRAM) ocamlnat $(INSTALL_BINDIR)/ocamlnat$(EXE); \
|
|
+ $(BSD_INSTALL_DATA) toplevel/opttopdirs.cmi $(INSTALL_LIBDIR); \
|
|
+ $(BSD_INSTALL_DATA) compilerlibs/ocamlopttoplevel.cmxa \
|
|
compilerlibs/ocamlopttoplevel.a \
|
|
$(OPTTOPLEVELSTART:.cmo=.cmx) $(OPTTOPLEVELSTART:.cmo=.o) \
|
|
$(INSTALL_COMPLIBDIR); \
|