blob: d04260d0a95fce60293ade9d69d7efbe99be78a7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
$NetBSD: patch-Makefile,v 1.7 2015/12/29 23:34:52 dholland Exp $
Use BSD_INSTALL_* instead of mkdir and cp; remove ocamlrun before cold start
--- Makefile.orig 2015-07-20 14:10:11.000000000 +0000
+++ Makefile
@@ -186,8 +186,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
@@ -302,35 +304,35 @@ 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.so dllnums.so dllthreads.so \
dllunix.so dllgraphics.so dllstr.so
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 \
@@ -341,16 +343,16 @@ install:
else :; fi
if test -n "$(WITH_OCAMLBUILD)"; then (cd ocamlbuild; $(MAKE) install); \
else :; fi
- cp config/Makefile $(INSTALL_LIBDIR)/Makefile.config
+ $(BSD_INSTALL_DATA) config/Makefile $(INSTALL_LIBDIR)/Makefile.config
if test -f ocamlopt; then $(MAKE) installopt; else :; 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 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
if test -n "$(WITH_OCAMLBUILD)"; then (cd ocamlbuild; $(MAKE) installopt); \
@@ -361,10 +363,10 @@ 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 compilerlibs/ocamlcommon.cmxa compilerlibs/ocamlcommon.a \
+ $(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) compilerlibs/ocamlcommon.cmxa compilerlibs/ocamlcommon.a \
compilerlibs/ocamlbytecomp.cmxa compilerlibs/ocamlbytecomp.a \
compilerlibs/ocamloptcomp.cmxa compilerlibs/ocamloptcomp.a \
$(BYTESTART:.cmo=.cmx) $(BYTESTART:.cmo=.o) \
|