| @@ -1,19 +1,30 @@ | | | @@ -1,19 +1,30 @@ |
1 | $NetBSD: patch-Makefile,v 1.1 2012/10/08 15:05:32 jaapb Exp $ | | 1 | $NetBSD: patch-Makefile,v 1.2 2012/12/04 13:55:23 jaapb Exp $ |
2 | | | 2 | |
3 | Use BSD_INSTALL_* instead of mkdir and cp | | 3 | Use BSD_INSTALL_* instead of mkdir and cp; remove ocamlrun before cold start |
4 | --- Makefile.orig 2012-07-20 08:06:01.000000000 +0000 | | 4 | --- Makefile.orig 2012-09-17 16:23:06.000000000 +0000 |
5 | +++ Makefile | | 5 | +++ Makefile |
6 | @@ -264,26 +264,26 @@ base.opt: checkstack runtime core ocaml | | 6 | @@ -172,8 +172,10 @@ LIBFILES=stdlib.cma std_exit.cmo *.cmi c |
| | | 7 | # Start up the system from the distribution compiler |
| | | 8 | coldstart: |
| | | 9 | cd byterun; $(MAKE) all |
| | | 10 | + rm -f boot/ocamlrun$(EXE) |
| | | 11 | cp byterun/ocamlrun$(EXE) boot/ocamlrun$(EXE) |
| | | 12 | cd yacc; $(MAKE) all |
| | | 13 | + rm -f boot/ocamlyacc$(EXE) |
| | | 14 | cp yacc/ocamlyacc$(EXE) boot/ocamlyacc$(EXE) |
| | | 15 | cd stdlib; $(MAKE) COMPILER=../boot/ocamlc all |
| | | 16 | cd stdlib; cp $(LIBFILES) ../boot |
| | | 17 | @@ -263,26 +265,26 @@ base.opt: checkstack runtime core ocaml |
7 | COMPLIBDIR=$(LIBDIR)/compiler-libs | | 18 | COMPLIBDIR=$(LIBDIR)/compiler-libs |
8 | | | 19 | |
9 | install: | | 20 | install: |
10 | - if test -d $(BINDIR); then : ; else $(MKDIR) $(BINDIR); fi | | 21 | - if test -d $(BINDIR); then : ; else $(MKDIR) $(BINDIR); fi |
11 | - if test -d $(LIBDIR); then : ; else $(MKDIR) $(LIBDIR); fi | | 22 | - if test -d $(LIBDIR); then : ; else $(MKDIR) $(LIBDIR); fi |
12 | - if test -d $(STUBLIBDIR); then : ; else $(MKDIR) $(STUBLIBDIR); fi | | 23 | - if test -d $(STUBLIBDIR); then : ; else $(MKDIR) $(STUBLIBDIR); fi |
13 | - if test -d $(COMPLIBDIR); then : ; else $(MKDIR) $(COMPLIBDIR); fi | | 24 | - if test -d $(COMPLIBDIR); then : ; else $(MKDIR) $(COMPLIBDIR); fi |
14 | + if test -d $(BINDIR); then : ; else $(BSD_INSTALL_PROGRAM_DIR) $(BINDIR); fi | | 25 | + if test -d $(BINDIR); then : ; else $(BSD_INSTALL_PROGRAM_DIR) $(BINDIR); fi |
15 | + if test -d $(LIBDIR); then : ; else $(BSD_INSTALL_DATA_DIR) $(LIBDIR); fi | | 26 | + if test -d $(LIBDIR); then : ; else $(BSD_INSTALL_DATA_DIR) $(LIBDIR); fi |
16 | + if test -d $(STUBLIBDIR); then : ; else $(BSD_INSTALL_DATA_DIR) $(STUBLIBDIR); fi | | 27 | + if test -d $(STUBLIBDIR); then : ; else $(BSD_INSTALL_DATA_DIR) $(STUBLIBDIR); fi |
17 | + if test -d $(COMPLIBDIR); then : ; else $(BSD_INSTALL_DATA_DIR) $(COMPLIBDIR); fi | | 28 | + if test -d $(COMPLIBDIR); then : ; else $(BSD_INSTALL_DATA_DIR) $(COMPLIBDIR); fi |
18 | if test -d $(MANDIR)/man$(MANEXT); then : ; \ | | 29 | if test -d $(MANDIR)/man$(MANEXT); then : ; \ |
19 | - else $(MKDIR) $(MANDIR)/man$(MANEXT); fi | | 30 | - else $(MKDIR) $(MANDIR)/man$(MANEXT); fi |
| @@ -34,49 +45,49 @@ Use BSD_INSTALL_* instead of mkdir and c | | | @@ -34,49 +45,49 @@ Use BSD_INSTALL_* instead of mkdir and c |
34 | - cp utils/*.cmi parsing/*.cmi typing/*.cmi bytecomp/*.cmi driver/*.cmi toplevel/*.cmi $(COMPLIBDIR) | | 45 | - cp utils/*.cmi parsing/*.cmi typing/*.cmi bytecomp/*.cmi driver/*.cmi toplevel/*.cmi $(COMPLIBDIR) |
35 | - cp compilerlibs/ocamlcommon.cma compilerlibs/ocamlbytecomp.cma compilerlibs/ocamltoplevel.cma $(BYTESTART) $(TOPLEVELSTART) $(COMPLIBDIR) | | 46 | - cp compilerlibs/ocamlcommon.cma compilerlibs/ocamlbytecomp.cma compilerlibs/ocamltoplevel.cma $(BYTESTART) $(TOPLEVELSTART) $(COMPLIBDIR) |
36 | - cp expunge $(LIBDIR)/expunge$(EXE) | | 47 | - cp expunge $(LIBDIR)/expunge$(EXE) |
37 | - cp toplevel/topdirs.cmi $(LIBDIR) | | 48 | - cp toplevel/topdirs.cmi $(LIBDIR) |
38 | + $(BSD_INSTALL_SCRIPT) lex/ocamllex $(BINDIR)/ocamllex$(EXE) | | 49 | + $(BSD_INSTALL_SCRIPT) lex/ocamllex $(BINDIR)/ocamllex$(EXE) |
39 | + $(BSD_INSTALL_PROGRAM) yacc/ocamlyacc$(EXE) $(BINDIR)/ocamlyacc$(EXE) | | 50 | + $(BSD_INSTALL_PROGRAM) yacc/ocamlyacc$(EXE) $(BINDIR)/ocamlyacc$(EXE) |
40 | + $(BSD_INSTALL_DATA) utils/*.cmi parsing/*.cmi typing/*.cmi bytecomp/*.cmi driver/*.cmi toplevel/*.cmi $(COMPLIBDIR) | | 51 | + $(BSD_INSTALL_DATA) utils/*.cmi parsing/*.cmi typing/*.cmi bytecomp/*.cmi driver/*.cmi toplevel/*.cmi $(COMPLIBDIR) |
41 | + $(BSD_INSTALL_DATA) compilerlibs/ocamlcommon.cma compilerlibs/ocamlbytecomp.cma compilerlibs/ocamltoplevel.cma $(BYTESTART) $(TOPLEVELSTART) $(COMPLIBDIR) | | 52 | + $(BSD_INSTALL_DATA) compilerlibs/ocamlcommon.cma compilerlibs/ocamlbytecomp.cma compilerlibs/ocamltoplevel.cma $(BYTESTART) $(TOPLEVELSTART) $(COMPLIBDIR) |
42 | + $(BSD_INSTALL_SCRIPT) expunge $(LIBDIR)/expunge$(EXE) | | 53 | + $(BSD_INSTALL_SCRIPT) expunge $(LIBDIR)/expunge$(EXE) |
43 | + $(BSD_INSTALL_DATA) toplevel/topdirs.cmi $(LIBDIR) | | 54 | + $(BSD_INSTALL_DATA) toplevel/topdirs.cmi $(LIBDIR) |
44 | cd tools; $(MAKE) install | | 55 | cd tools; $(MAKE) install |
45 | -cd man; $(MAKE) install | | 56 | -cd man; $(MAKE) install |
46 | for i in $(OTHERLIBRARIES); do \ | | 57 | for i in $(OTHERLIBRARIES); do \ |
47 | @@ -293,17 +293,17 @@ install: | | 58 | @@ -292,17 +294,17 @@ install: |
48 | if test -f ocamlopt; then $(MAKE) installopt; else :; fi | | 59 | if test -f ocamlopt; then $(MAKE) installopt; else :; fi |
49 | if test -f debugger/ocamldebug; then (cd debugger; $(MAKE) install); \ | | 60 | if test -f debugger/ocamldebug; then (cd debugger; $(MAKE) install); \ |
50 | else :; fi | | 61 | else :; fi |
51 | - cp config/Makefile $(LIBDIR)/Makefile.config | | 62 | - cp config/Makefile $(LIBDIR)/Makefile.config |
52 | + $(BSD_INSTALL_DATA) config/Makefile $(LIBDIR)/Makefile.config | | 63 | + $(BSD_INSTALL_DATA) config/Makefile $(LIBDIR)/Makefile.config |
53 | BINDIR=$(BINDIR) LIBDIR=$(LIBDIR) PREFIX=$(PREFIX) \ | | 64 | BINDIR=$(BINDIR) LIBDIR=$(LIBDIR) PREFIX=$(PREFIX) \ |
54 | ./build/partial-install.sh | | 65 | ./build/partial-install.sh |
55 | | | 66 | |
56 | # Installation of the native-code compiler | | 67 | # Installation of the native-code compiler |
57 | installopt: | | 68 | installopt: |
58 | cd asmrun; $(MAKE) install | | 69 | cd asmrun; $(MAKE) install |
59 | - cp ocamlopt $(BINDIR)/ocamlopt$(EXE) | | 70 | - cp ocamlopt $(BINDIR)/ocamlopt$(EXE) |
60 | + $(BSD_INSTALL_SCRIPT) ocamlopt $(BINDIR)/ocamlopt$(EXE) | | 71 | + $(BSD_INSTALL_SCRIPT) ocamlopt $(BINDIR)/ocamlopt$(EXE) |
61 | cd stdlib; $(MAKE) installopt | | 72 | cd stdlib; $(MAKE) installopt |
62 | - cp asmcomp/*.cmi $(COMPLIBDIR) | | 73 | - cp asmcomp/*.cmi $(COMPLIBDIR) |
63 | - cp compilerlibs/ocamloptcomp.cma $(OPTSTART) $(COMPLIBDIR) | | 74 | - cp compilerlibs/ocamloptcomp.cma $(OPTSTART) $(COMPLIBDIR) |
64 | + $(BSD_INSTALL_DATA) asmcomp/*.cmi $(COMPLIBDIR) | | 75 | + $(BSD_INSTALL_DATA) asmcomp/*.cmi $(COMPLIBDIR) |
65 | + $(BSD_INSTALL_DATA) compilerlibs/ocamloptcomp.cma $(OPTSTART) $(COMPLIBDIR) | | 76 | + $(BSD_INSTALL_DATA) compilerlibs/ocamloptcomp.cma $(OPTSTART) $(COMPLIBDIR) |
66 | cd ocamldoc; $(MAKE) installopt | | 77 | cd ocamldoc; $(MAKE) installopt |
67 | for i in $(OTHERLIBRARIES); \ | | 78 | for i in $(OTHERLIBRARIES); \ |
68 | do (cd otherlibs/$$i; $(MAKE) installopt) || exit $$?; done | | 79 | do (cd otherlibs/$$i; $(MAKE) installopt) || exit $$?; done |
69 | @@ -311,10 +311,10 @@ installopt: | | 80 | @@ -310,10 +312,10 @@ installopt: |
70 | cd tools; $(MAKE) installopt | | 81 | cd tools; $(MAKE) installopt |
71 | | | 82 | |
72 | installoptopt: | | 83 | installoptopt: |
73 | - cp ocamlc.opt $(BINDIR)/ocamlc.opt$(EXE) | | 84 | - cp ocamlc.opt $(BINDIR)/ocamlc.opt$(EXE) |
74 | - cp ocamlopt.opt $(BINDIR)/ocamlopt.opt$(EXE) | | 85 | - cp ocamlopt.opt $(BINDIR)/ocamlopt.opt$(EXE) |
75 | - cp lex/ocamllex.opt $(BINDIR)/ocamllex.opt$(EXE) | | 86 | - cp lex/ocamllex.opt $(BINDIR)/ocamllex.opt$(EXE) |
76 | - cp compilerlibs/ocamlcommon.cmxa compilerlibs/ocamlcommon.a \ | | 87 | - cp compilerlibs/ocamlcommon.cmxa compilerlibs/ocamlcommon.a \ |
77 | + $(BSD_INSTALL_PROGRAM) ocamlc.opt $(BINDIR)/ocamlc.opt$(EXE) | | 88 | + $(BSD_INSTALL_PROGRAM) ocamlc.opt $(BINDIR)/ocamlc.opt$(EXE) |
78 | + $(BSD_INSTALL_PROGRAM) ocamlopt.opt $(BINDIR)/ocamlopt.opt$(EXE) | | 89 | + $(BSD_INSTALL_PROGRAM) ocamlopt.opt $(BINDIR)/ocamlopt.opt$(EXE) |
79 | + $(BSD_INSTALL_PROGRAM) lex/ocamllex.opt $(BINDIR)/ocamllex.opt$(EXE) | | 90 | + $(BSD_INSTALL_PROGRAM) lex/ocamllex.opt $(BINDIR)/ocamllex.opt$(EXE) |
80 | + $(BSD_INSTALL_DATA) compilerlibs/ocamlcommon.cmxa compilerlibs/ocamlcommon.a \ | | 91 | + $(BSD_INSTALL_DATA) compilerlibs/ocamlcommon.cmxa compilerlibs/ocamlcommon.a \ |
81 | compilerlibs/ocamlbytecomp.cmxa compilerlibs/ocamlbytecomp.a \ | | 92 | compilerlibs/ocamlbytecomp.cmxa compilerlibs/ocamlbytecomp.a \ |
82 | compilerlibs/ocamloptcomp.cmxa compilerlibs/ocamloptcomp.a \ | | 93 | compilerlibs/ocamloptcomp.cmxa compilerlibs/ocamloptcomp.a \ |