]> git.pld-linux.org Git - packages/ocaml.git/blob - ocaml-DESTDIR.patch
- support for tk8.5
[packages/ocaml.git] / ocaml-DESTDIR.patch
1 diff -ur ocaml-3.04--/Makefile ocaml-3.04/Makefile
2 --- ocaml-3.04--/Makefile       Tue Dec 11 09:32:41 2001
3 +++ ocaml-3.04/Makefile Sat Feb  2 01:48:21 2002
4 @@ -220,23 +220,23 @@
5  
6  # Installation
7  install: FORCE
8 -       if test -d $(BINDIR); then : ; else $(MKDIR) $(BINDIR); fi
9 -       if test -d $(LIBDIR); then : ; else $(MKDIR) $(LIBDIR); fi
10 -       if test -d $(LIBDIR)/shlibs; then : ; else $(MKDIR) $(LIBDIR)/shlibs; fi
11 -       if test -d $(MANDIR); then : ; else $(MKDIR) $(MANDIR); fi
12 -       rm -f $(LIBDIR)/lib*.so
13 +       if test -d $(DESTDIR)$(BINDIR); then : ; else $(MKDIR) $(DESTDIR)$(BINDIR); fi
14 +       if test -d $(DESTDIR)$(LIBDIR); then : ; else $(MKDIR) $(DESTDIR)$(LIBDIR); fi
15 +       if test -d $(DESTDIR)$(LIBDIR)/shlibs; then : ; else $(MKDIR) $(DESTDIR)$(LIBDIR)/shlibs; fi
16 +       if test -d $(DESTDIR)$(MANDIR); then : ; else $(MKDIR) $(DESTDIR)$(MANDIR); fi
17 +       rm -f $(DESTDIR)$(LIBDIR)/lib*.so
18         cd byterun; $(MAKE) install
19 -       if test -r $(LIBDIR)/ld.conf; then :; else echo "$(LIBDIR)" > $(LIBDIR)/ld.conf; fi
20 -       cp ocamlc $(BINDIR)/ocamlc$(EXE)
21 -       cp ocaml $(BINDIR)/ocaml$(EXE)
22 +       if test -r $(DESTDIR)$(LIBDIR)/ld.conf; then :; else echo "$(LIBDIR)" > $(DESTDIR)$(LIBDIR)/ld.conf; fi
23 +       cp ocamlc $(DESTDIR)$(BINDIR)/ocamlc$(EXE)
24 +       cp ocaml $(DESTDIR)$(BINDIR)/ocaml$(EXE)
25         cd stdlib; $(MAKE) install
26 -       cp lex/ocamllex $(BINDIR)/ocamllex$(EXE)
27 -       cp yacc/ocamlyacc$(EXE) $(BINDIR)/ocamlyacc$(EXE)
28 -       cp toplevel/toplevellib.cma $(LIBDIR)/toplevellib.cma
29 -       cp expunge $(LIBDIR)/expunge$(EXE)
30 -       cp typing/outcometree.cmi typing/outcometree.mli $(LIBDIR)
31 -       cp toplevel/topmain.cmo $(LIBDIR)
32 -       cp toplevel/toploop.cmi toplevel/topdirs.cmi $(LIBDIR)
33 +       cp lex/ocamllex $(DESTDIR)$(BINDIR)/ocamllex$(EXE)
34 +       cp yacc/ocamlyacc$(EXE) $(DESTDIR)$(BINDIR)/ocamlyacc$(EXE)
35 +       cp toplevel/toplevellib.cma $(DESTDIR)$(LIBDIR)/toplevellib.cma
36 +       cp expunge $(DESTDIR)$(LIBDIR)/expunge$(EXE)
37 +       cp typing/outcometree.cmi typing/outcometree.mli $(DESTDIR)$(LIBDIR)
38 +       cp toplevel/topmain.cmo $(DESTDIR)$(LIBDIR)
39 +       cp toplevel/toploop.cmi toplevel/topdirs.cmi $(DESTDIR)$(LIBDIR)
40         cd tools; $(MAKE) install
41         -cd man; $(MAKE) install
42         for i in $(OTHERLIBRARIES); do \
43 @@ -249,12 +249,12 @@
44  # Installation of the native-code compiler
45  installopt:
46         cd asmrun; $(MAKE) install
47 -       cp ocamlopt $(BINDIR)/ocamlopt$(EXE)
48 +       cp ocamlopt $(DESTDIR)$(BINDIR)/ocamlopt$(EXE)
49         cd stdlib; $(MAKE) installopt
50         for i in $(OTHERLIBRARIES); do (cd otherlibs/$$i; $(MAKE) installopt) || exit $$?; done
51 -       if test -f ocamlc.opt; then cp ocamlc.opt $(BINDIR)/ocamlc.opt$(EXE); else :; fi
52 -       if test -f ocamlopt.opt; then cp ocamlopt.opt $(BINDIR)/ocamlopt.opt$(EXE); else :; fi
53 -       if test -f lex/ocamllex.opt; then cp lex/ocamllex.opt $(BINDIR)/ocamllex.opt$(EXE); else :; fi
54 +       if test -f ocamlc.opt; then cp ocamlc.opt $(DESTDIR)$(BINDIR)/ocamlc.opt$(EXE); else :; fi
55 +       if test -f ocamlopt.opt; then cp ocamlopt.opt $(DESTDIR)$(BINDIR)/ocamlopt.opt$(EXE); else :; fi
56 +       if test -f lex/ocamllex.opt; then cp lex/ocamllex.opt $(DESTDIR)$(BINDIR)/ocamllex.opt$(EXE); else :; fi
57  
58  clean:: partialclean
59  
60 diff -ur ocaml-3.04--/asmrun/Makefile ocaml-3.04/asmrun/Makefile
61 --- ocaml-3.04--/asmrun/Makefile        Fri Dec  7 14:39:18 2001
62 +++ ocaml-3.04/asmrun/Makefile  Sat Feb  2 01:48:21 2002
63 @@ -57,15 +57,15 @@
64  install: install-default install-$(PROFILING)
65  
66  install-default:
67 -       cp libasmrun.a $(LIBDIR)/libasmrun.a
68 -       cd $(LIBDIR); $(RANLIB) libasmrun.a
69 +       cp libasmrun.a $(DESTDIR)$(LIBDIR)/libasmrun.a
70 +       cd $(DESTDIR)$(LIBDIR); $(RANLIB) libasmrun.a
71  
72  install-noprof:
73 -       rm -f $(LIBDIR)/libasmrunp.a; ln -s libasmrun.a $(LIBDIR)/libasmrunp.a
74 +       rm -f $(DESTDIR)$(LIBDIR)/libasmrunp.a; ln -s libasmrun.a $(DESTDIR)$(LIBDIR)/libasmrunp.a
75  
76  install-prof:
77 -       cp libasmrunp.a $(LIBDIR)/libasmrunp.a
78 -       cd $(LIBDIR); $(RANLIB) libasmrunp.a
79 +       cp libasmrunp.a $(DESTDIR)$(LIBDIR)/libasmrunp.a
80 +       cd $(DESTDIR)$(LIBDIR); $(RANLIB) libasmrunp.a
81  
82  power.o: power-$(SYSTEM).o
83         cp power-$(SYSTEM).o power.o
84 diff -ur ocaml-3.04--/byterun/Makefile ocaml-3.04/byterun/Makefile
85 --- ocaml-3.04--/byterun/Makefile       Fri Dec  7 14:39:21 2001
86 +++ ocaml-3.04/byterun/Makefile Sat Feb  2 01:48:21 2002
87 @@ -47,17 +47,17 @@
88                   prims.o libcamlrund.a $(BYTECCLIBS)
89  
90  install:
91 -       cp ocamlrun$(EXE) $(BINDIR)/ocamlrun$(EXE)
92 -       cp libcamlrun.a $(LIBDIR)/libcamlrun.a
93 -       cd $(LIBDIR); $(RANLIB) libcamlrun.a
94 -       if test -d $(LIBDIR)/caml; then : ; else mkdir $(LIBDIR)/caml; fi
95 -       cp $(PUBLIC_INCLUDES) $(LIBDIR)/caml
96 +       cp ocamlrun$(EXE) $(DESTDIR)$(BINDIR)/ocamlrun$(EXE)
97 +       cp libcamlrun.a $(DESTDIR)$(LIBDIR)/libcamlrun.a
98 +       cd $(DESTDIR)$(LIBDIR); $(RANLIB) libcamlrun.a
99 +       if test -d $(DESTDIR)$(LIBDIR)/caml; then : ; else mkdir $(DESTDIR)$(LIBDIR)/caml; fi
100 +       cp $(PUBLIC_INCLUDES) $(DESTDIR)$(LIBDIR)/caml
101         sed -e '/#include ".*\/m.h/r ../config/m.h' \
102              -e '/#include ".*\/s.h/r ../config/s.h' \
103 -            -e '/#include "/d' config.h > $(LIBDIR)/caml/config.h
104 +            -e '/#include "/d' config.h > $(DESTDIR)$(LIBDIR)/caml/config.h
105         sed -e '/#include ".*gc\.h"/d' \
106             -e '/#define Alloc_small/,/^}/d' \
107 -           -e '/Modify/,/^}/d' memory.h > $(LIBDIR)/caml/memory.h
108 +           -e '/Modify/,/^}/d' memory.h > $(DESTDIR)$(LIBDIR)/caml/memory.h
109  
110  libcamlrun.a: $(OBJS)
111         ar rc libcamlrun.a $(OBJS)
112 diff -ur ocaml-3.04--/camlp4/Makefile ocaml-3.04/camlp4/Makefile
113 --- ocaml-3.04--/camlp4/Makefile        Mon Sep 10 11:56:13 2001
114 +++ ocaml-3.04/camlp4/Makefile  Sat Feb  2 01:48:21 2002
115 @@ -28,7 +28,9 @@
116         for i in $(DIRS); do (cd $$i; $(MAKE) depend); done
117  
118  install:
119 -       for i in $(DIRS); do (cd $$i; $(MAKE) install BINDIR=$(BINDIR) LIBDIR=$(LIBDIR) MANDIR=$(MANDIR)); done
120 +       for i in $(DIRS); do \
121 +               (cd $$i; $(MAKE) install) || exit $$?; \
122 +       done
123  
124  clean::
125         $(MAKE) clean_hot clean_cold
126 diff -ur ocaml-3.04--/camlp4/camlp4/Makefile ocaml-3.04/camlp4/camlp4/Makefile
127 --- ocaml-3.04--/camlp4/camlp4/Makefile Wed Oct  3 01:25:20 2001
128 +++ ocaml-3.04/camlp4/camlp4/Makefile   Sat Feb  2 01:48:21 2002
129 @@ -61,10 +61,10 @@
130         done
131  
132  install:
133 -       -$(MKDIR) $(BINDIR)
134 -       cp $(CAMLP4) $(BINDIR)/.
135 -       cp mLast.mli quotation.mli pcaml.mli spretty.mli $(LIBDIR)/.
136 -       cp mLast.cmi quotation.cmi ast2pt.cmi pcaml.cmi spretty.cmi $(LIBDIR)/.
137 -       cp camlp4.cma $(LIBDIR)/.
138 +       -$(MKDIR) $(DESTDIR)$(BINDIR)
139 +       cp $(CAMLP4) $(DESTDIR)$(BINDIR)/.
140 +       cp mLast.mli quotation.mli pcaml.mli spretty.mli $(DESTDIR)$(LIBDIR)/.
141 +       cp mLast.cmi quotation.cmi ast2pt.cmi pcaml.cmi spretty.cmi $(DESTDIR)$(LIBDIR)/.
142 +       cp camlp4.cma $(DESTDIR)$(LIBDIR)/.
143  
144  include .depend
145 diff -ur ocaml-3.04--/camlp4/etc/Makefile ocaml-3.04/camlp4/etc/Makefile
146 --- ocaml-3.04--/camlp4/etc/Makefile    Fri Sep 28 14:11:43 2001
147 +++ ocaml-3.04/camlp4/etc/Makefile      Sat Feb  2 01:48:21 2002
148 @@ -48,14 +48,14 @@
149  get_promote:
150  
151  install:
152 -       -$(MKDIR) $(LIBDIR) $(BINDIR)
153 -       cp $(OBJS) $(LIBDIR)/.
154 -       cp $(INTF) $(LIBDIR)/.
155 -       cp lib.sml $(LIBDIR)/.
156 -       cp camlp4o$(EXE) $(BINDIR)/.
157 -       if test -f $(COPT); then cp $(COPT) $(BINDIR)/.; fi
158 -       cp mkcamlp4.sh $(BINDIR)/mkcamlp4
159 -       chmod a+x $(BINDIR)/mkcamlp4
160 +       -$(MKDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(BINDIR)
161 +       cp $(OBJS) $(DESTDIR)$(LIBDIR)/.
162 +       cp $(INTF) $(DESTDIR)$(LIBDIR)/.
163 +       cp lib.sml $(DESTDIR)$(LIBDIR)/.
164 +       cp camlp4o$(EXE) $(DESTDIR)$(BINDIR)/.
165 +       if test -f $(COPT); then cp $(COPT) $(DESTDIR)$(BINDIR)/.; fi
166 +       cp mkcamlp4.sh $(DESTDIR)$(BINDIR)/mkcamlp4
167 +       chmod a+x $(DESTDIR)$(BINDIR)/mkcamlp4
168  
169  pa_lisp.cmo: pa_lispr.cmo
170  pr_extend.cmo: pa_extfun.cmo
171 diff -ur ocaml-3.04--/camlp4/lib/Makefile ocaml-3.04/camlp4/lib/Makefile
172 --- ocaml-3.04--/camlp4/lib/Makefile    Fri Sep  7 09:58:12 2001
173 +++ ocaml-3.04/camlp4/lib/Makefile      Sat Feb  2 01:48:21 2002
174 @@ -36,17 +36,17 @@
175         done
176  
177  install:
178 -       -$(MKDIR) $(LIBDIR)
179 -       cp $(TARGET) *.mli $(LIBDIR)/.
180 -       cp *.cmi $(LIBDIR)/.
181 -       if test -f $(TARGET:.cma=.cmxa); then $(MAKE) installopt LIBDIR=$(LIBDIR); fi
182 +       -$(MKDIR) $(DESTDIR)$(LIBDIR)
183 +       cp $(TARGET) *.mli $(DESTDIR)$(LIBDIR)/.
184 +       cp *.cmi $(DESTDIR)$(LIBDIR)/.
185 +       if test -f $(TARGET:.cma=.cmxa); then $(MAKE) installopt; fi
186  
187  installopt:
188 -       cp $(TARGET:.cma=.cmxa) *.cmx $(LIBDIR)/.
189 +       cp $(TARGET:.cma=.cmxa) *.cmx $(DESTDIR)$(LIBDIR)/.
190         if test -f $(TARGET:.cma=.lib); then \
191 -               cp $(TARGET:.cma=.lib) $(LIBDIR)/.; \
192 +               cp $(TARGET:.cma=.lib) $(DESTDIR)$(LIBDIR)/.; \
193         else \
194 -               tar cf - $(TARGET:.cma=.a) | (cd $(LIBDIR)/.; tar xf -); \
195 +               tar cf - $(TARGET:.cma=.a) | (cd $(DESTDIR)$(LIBDIR)/.; tar xf -); \
196         fi
197  
198  include .depend
199 diff -ur ocaml-3.04--/camlp4/meta/Makefile ocaml-3.04/camlp4/meta/Makefile
200 --- ocaml-3.04--/camlp4/meta/Makefile   Sat Feb  2 01:06:30 2002
201 +++ ocaml-3.04/camlp4/meta/Makefile     Sat Feb  2 01:48:21 2002
202 @@ -42,10 +42,10 @@
203         done
204  
205  install:
206 -       -$(MKDIR) $(LIBDIR) $(BINDIR)
207 -       cp $(OBJS) $(LIBDIR)/.
208 -       cp pa_ifdef.cmi $(LIBDIR)/.
209 -       cp camlp4r$(EXE) $(BINDIR)/.
210 -       if test -f $(COPT); then cp $(COPT) $(BINDIR)/.; fi
211 +       -$(MKDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(BINDIR)
212 +       cp $(OBJS) $(DESTDIR)$(LIBDIR)/.
213 +       cp pa_ifdef.cmi $(DESTDIR)$(LIBDIR)/.
214 +       cp camlp4r$(EXE) $(DESTDIR)$(BINDIR)/.
215 +       if test -f $(COPT); then cp $(COPT) $(DESTDIR)$(BINDIR)/.; fi
216  
217  include .depend
218 diff -ur ocaml-3.04--/camlp4/ocaml_src/camlp4/Makefile ocaml-3.04/camlp4/ocaml_src/camlp4/Makefile
219 --- ocaml-3.04--/camlp4/ocaml_src/camlp4/Makefile       Wed Oct  3 11:40:12 2001
220 +++ ocaml-3.04/camlp4/ocaml_src/camlp4/Makefile Sat Feb  2 01:48:21 2002
221 @@ -61,10 +61,10 @@
222         done
223  
224  install:
225 -       -$(MKDIR) $(BINDIR)
226 -       cp $(CAMLP4) $(BINDIR)/.
227 -       cp mLast.mli quotation.mli pcaml.mli spretty.mli $(LIBDIR)/.
228 -       cp mLast.cmi quotation.cmi ast2pt.cmi pcaml.cmi spretty.cmi $(LIBDIR)/.
229 -       cp camlp4.cma $(LIBDIR)/.
230 +       -$(MKDIR) $(DESTDIR)$(BINDIR)
231 +       cp $(CAMLP4) $(DESTDIR)$(BINDIR)/.
232 +       cp mLast.mli quotation.mli pcaml.mli spretty.mli $(DESTDIR)$(LIBDIR)/.
233 +       cp mLast.cmi quotation.cmi ast2pt.cmi pcaml.cmi spretty.cmi $(DESTDIR)$(LIBDIR)/.
234 +       cp camlp4.cma $(DESTDIR)$(LIBDIR)/.
235  
236  include .depend
237 diff -ur ocaml-3.04--/camlp4/ocaml_src/lib/Makefile ocaml-3.04/camlp4/ocaml_src/lib/Makefile
238 --- ocaml-3.04--/camlp4/ocaml_src/lib/Makefile  Fri Sep  7 09:20:28 2001
239 +++ ocaml-3.04/camlp4/ocaml_src/lib/Makefile    Sat Feb  2 01:48:21 2002
240 @@ -36,17 +36,17 @@
241         done
242  
243  install:
244 -       -$(MKDIR) $(LIBDIR)
245 -       cp $(TARGET) *.mli $(LIBDIR)/.
246 -       cp *.cmi $(LIBDIR)/.
247 -       if test -f $(TARGET:.cma=.cmxa); then $(MAKE) installopt LIBDIR=$(LIBDIR); fi
248 +       -$(MKDIR) $(DESTDIR)$(LIBDIR)
249 +       cp $(TARGET) *.mli $(DESTDIR)$(LIBDIR)/.
250 +       cp *.cmi $(DESTDIR)$(LIBDIR)/.
251 +       if test -f $(TARGET:.cma=.cmxa); then $(MAKE) installopt; fi
252  
253  installopt:
254 -       cp $(TARGET:.cma=.cmxa) *.cmx $(LIBDIR)/.
255 +       cp $(TARGET:.cma=.cmxa) *.cmx $(DESTDIR)$(LIBDIR)/.
256         if test -f $(TARGET:.cma=.lib); then \
257 -               cp $(TARGET:.cma=.lib) $(LIBDIR)/.; \
258 +               cp $(TARGET:.cma=.lib) $(DESTDIR)$(LIBDIR)/.; \
259         else \
260 -               tar cf - $(TARGET:.cma=.a) | (cd $(LIBDIR)/.; tar xf -); \
261 +               tar cf - $(TARGET:.cma=.a) | (cd $(DESTDIR)$(LIBDIR)/.; tar xf -); \
262         fi
263  
264  include .depend
265 diff -ur ocaml-3.04--/camlp4/ocaml_src/meta/Makefile ocaml-3.04/camlp4/ocaml_src/meta/Makefile
266 --- ocaml-3.04--/camlp4/ocaml_src/meta/Makefile Sat Feb  2 01:06:30 2002
267 +++ ocaml-3.04/camlp4/ocaml_src/meta/Makefile   Sat Feb  2 01:48:21 2002
268 @@ -42,10 +42,10 @@
269         done
270  
271  install:
272 -       -$(MKDIR) $(LIBDIR) $(BINDIR)
273 -       cp $(OBJS) $(LIBDIR)/.
274 -       cp pa_ifdef.cmi $(LIBDIR)/.
275 -       cp camlp4r$(EXE) $(BINDIR)/.
276 -       if test -f $(COPT); then cp $(COPT) $(BINDIR)/.; fi
277 +       -$(MKDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(BINDIR)
278 +       cp $(OBJS) $(DESTDIR)$(LIBDIR)/.
279 +       cp pa_ifdef.cmi $(DESTDIR)$(LIBDIR)/.
280 +       cp camlp4r$(EXE) $(DESTDIR)$(BINDIR)/.
281 +       if test -f $(COPT); then cp $(COPT) $(DESTDIR)$(BINDIR)/.; fi
282  
283  include .depend
284 diff -ur ocaml-3.04--/camlp4/ocaml_src/odyl/Makefile ocaml-3.04/camlp4/ocaml_src/odyl/Makefile
285 --- ocaml-3.04--/camlp4/ocaml_src/odyl/Makefile Wed Oct  3 14:06:22 2001
286 +++ ocaml-3.04/camlp4/ocaml_src/odyl/Makefile   Sat Feb  2 01:48:21 2002
287 @@ -49,8 +49,8 @@
288  compare:
289  
290  install:
291 -       -$(MKDIR) $(LIBDIR) $(BINDIR)
292 -       cp odyl.cmo odyl.cma $(LIBDIR)
293 -       cp odyl$(EXE) $(BINDIR)/.
294 +       -$(MKDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(BINDIR)
295 +       cp odyl.cmo odyl.cma $(DESTDIR)$(LIBDIR)
296 +       cp odyl$(EXE) $(DESTDIR)$(BINDIR)/.
297  
298  include .depend
299 diff -ur ocaml-3.04--/camlp4/ocpp/Makefile ocaml-3.04/camlp4/ocpp/Makefile
300 --- ocaml-3.04--/camlp4/ocpp/Makefile   Fri Sep  7 09:57:04 2001
301 +++ ocaml-3.04/camlp4/ocpp/Makefile     Sat Feb  2 01:48:21 2002
302 @@ -24,9 +24,9 @@
303         rm -f *.cm[ioa] *.pp[io] *.o *.out *.bak .*.bak crc.ml ocpp$(EXE)
304  
305  install:
306 -       -$(MKDIR) $(LIBDIR) $(BINDIR)
307 -       cp $(OBJS) $(LIBDIR)
308 -       cp ocpp$(EXE) $(BINDIR)/.
309 +       -$(MKDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(BINDIR)
310 +       cp $(OBJS) $(DESTDIR)$(LIBDIR)
311 +       cp ocpp$(EXE) $(DESTDIR)$(BINDIR)/.
312  
313  depend:
314  
315 diff -ur ocaml-3.04--/camlp4/odyl/Makefile ocaml-3.04/camlp4/odyl/Makefile
316 --- ocaml-3.04--/camlp4/odyl/Makefile   Wed Oct  3 13:50:08 2001
317 +++ ocaml-3.04/camlp4/odyl/Makefile     Sat Feb  2 01:48:21 2002
318 @@ -49,8 +49,8 @@
319  compare:
320  
321  install:
322 -       -$(MKDIR) $(LIBDIR) $(BINDIR)
323 -       cp odyl.cmo odyl.cma $(LIBDIR)
324 -       cp odyl$(EXE) $(BINDIR)/.
325 +       -$(MKDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(BINDIR)
326 +       cp odyl.cmo odyl.cma $(DESTDIR)$(LIBDIR)
327 +       cp odyl$(EXE) $(DESTDIR)$(BINDIR)/.
328  
329  include .depend
330 diff -ur ocaml-3.04--/camlp4/top/Makefile ocaml-3.04/camlp4/top/Makefile
331 --- ocaml-3.04--/camlp4/top/Makefile    Sat Sep  8 12:45:45 2001
332 +++ ocaml-3.04/camlp4/top/Makefile      Sat Feb  2 01:48:21 2002
333 @@ -41,7 +41,7 @@
334  get_promote:
335  
336  install:
337 -       -$(MKDIR) $(LIBDIR)
338 -       cp $(TARGET) $(LIBDIR)/.
339 +       -$(MKDIR) $(DESTDIR)$(LIBDIR)
340 +       cp $(TARGET) $(DESTDIR)$(LIBDIR)/.
341  
342  include .depend
343 diff -ur ocaml-3.04--/debugger/Makefile ocaml-3.04/debugger/Makefile
344 --- ocaml-3.04--/debugger/Makefile      Tue Oct 30 11:02:42 2001
345 +++ ocaml-3.04/debugger/Makefile        Sat Feb  2 01:48:21 2002
346 @@ -79,7 +79,7 @@
347         $(CAMLC) $(LINKFLAGS) -o ocamldebug$(EXE) $(OTHEROBJS) $(OBJS)
348  
349  install:
350 -       cp ocamldebug$(EXE) $(BINDIR)/ocamldebug$(EXE)
351 +       cp ocamldebug$(EXE) $(DESTDIR)$(BINDIR)/ocamldebug$(EXE)
352  
353  clean::
354         rm -f ocamldebug$(EXE)
355 diff -ur ocaml-3.04--/emacs/Makefile ocaml-3.04/emacs/Makefile
356 --- ocaml-3.04--/emacs/Makefile Wed Nov 17 19:57:32 1999
357 +++ ocaml-3.04/emacs/Makefile   Sat Feb  2 01:48:21 2002
358 @@ -38,9 +38,9 @@
359  
360  simple-install:
361         @echo "Installing in $(EMACSDIR)..."
362 -       if test -d $(EMACSDIR); then : ; else mkdir -p $(EMACSDIR); fi
363 -       cp $(FILES) $(EMACSDIR)
364 -       cd $(EMACSDIR); $(EMACS) --batch --eval '$(COMPILECMD)'
365 +       if test -d $(DESTDIR)$(EMACSDIR); then : ; else mkdir -p $(DESTDIR)$(EMACSDIR); fi
366 +       cp $(FILES) $(DESTDIR)$(EMACSDIR)
367 +       cd $(DESTDIR)$(EMACSDIR); $(EMACS) --batch --eval '$(COMPILECMD)'
368  
369  ocamltags:     ocamltags.in
370         sed -e 's:@EMACS@:$(EMACS):' ocamltags.in >ocamltags
371 diff -ur ocaml-3.04--/man/Makefile ocaml-3.04/man/Makefile
372 --- ocaml-3.04--/man/Makefile   Wed Nov 17 19:57:40 1999
373 +++ ocaml-3.04/man/Makefile     Sat Feb  2 01:48:21 2002
374 @@ -15,6 +15,6 @@
375  include ../config/Makefile
376  
377  install:
378 -       for i in *.m; do cp $$i $(MANDIR)/`basename $$i .m`.$(MANEXT); done
379 -       echo '.so man$(MANEXT)/ocamlc.$(MANEXT)' > $(MANDIR)/ocamlc.opt.$(MANEXT)
380 -       echo '.so man$(MANEXT)/ocamlopt.$(MANEXT)' > $(MANDIR)/ocamlopt.opt.$(MANEXT)
381 +       for i in *.m; do cp $$i $(DESTDIR)$(MANDIR)/`basename $$i .m`.$(MANEXT); done
382 +       echo '.so man$(MANEXT)/ocamlc.$(MANEXT)' > $(DESTDIR)$(MANDIR)/ocamlc.opt.$(MANEXT)
383 +       echo '.so man$(MANEXT)/ocamlopt.$(MANEXT)' > $(DESTDIR)$(MANDIR)/ocamlopt.opt.$(MANEXT)
384 diff -ur ocaml-3.04--/otherlibs/bigarray/Makefile ocaml-3.04/otherlibs/bigarray/Makefile
385 --- ocaml-3.04--/otherlibs/bigarray/Makefile    Fri Dec  7 14:39:49 2001
386 +++ ocaml-3.04/otherlibs/bigarray/Makefile      Sat Feb  2 01:48:21 2002
387 @@ -40,14 +40,14 @@
388            $(CAML_OBJS:.cmo=.cmx)
389  
390  install:
391 -       if test -f dllbigarray.so; then cp dllbigarray.so $(LIBDIR)/dllbigarray.so; fi
392 -       cp bigarray.cmi bigarray.mli libbigarray.a bigarray.cma $(LIBDIR)
393 -       cd $(LIBDIR); $(RANLIB) libbigarray.a
394 -       cp bigarray.h $(LIBDIR)/caml/bigarray.h
395 +       if test -f dllbigarray.so; then cp dllbigarray.so $(DESTDIR)$(LIBDIR)/dllbigarray.so; fi
396 +       cp bigarray.cmi bigarray.mli libbigarray.a bigarray.cma $(DESTDIR)$(LIBDIR)
397 +       cd $(DESTDIR)$(LIBDIR); $(RANLIB) libbigarray.a
398 +       cp bigarray.h $(DESTDIR)$(LIBDIR)/caml/bigarray.h
399  
400  installopt:
401 -       cp bigarray.a $(CAML_OBJS:.cmo=.cmx) bigarray.cmxa $(LIBDIR)
402 -       cd $(LIBDIR); $(RANLIB) bigarray.a
403 +       cp bigarray.a $(CAML_OBJS:.cmo=.cmx) bigarray.cmxa $(DESTDIR)$(LIBDIR)
404 +       cd $(DESTDIR)$(LIBDIR); $(RANLIB) bigarray.a
405  
406  partialclean:
407         rm -f *.cm* 
408 diff -ur ocaml-3.04--/otherlibs/db/Makefile ocaml-3.04/otherlibs/db/Makefile
409 --- ocaml-3.04--/otherlibs/db/Makefile  Fri Dec  7 14:39:50 2001
410 +++ ocaml-3.04/otherlibs/db/Makefile    Sat Feb  2 01:48:21 2002
411 @@ -46,13 +46,13 @@
412         rm -f *.a *.o
413  
414  install:
415 -       cp libmldb.a $(LIBDIR)/libmldb.a
416 -       cd $(LIBDIR); $(RANLIB) libmldb.a
417 -       cp db.cma db.cmi db.mli $(LIBDIR)
418 +       cp libmldb.a $(DESTDIR)$(LIBDIR)/libmldb.a
419 +       cd $(DESTDIR)$(LIBDIR); $(RANLIB) libmldb.a
420 +       cp db.cma db.cmi db.mli $(DESTDIR)$(LIBDIR)
421  
422  installopt:
423 -       cp db.cmx db.cmxa db.a $(LIBDIR)
424 -       cd $(LIBDIR); $(RANLIB) db.a
425 +       cp db.cmx db.cmxa db.a $(DESTDIR)$(LIBDIR)
426 +       cd $(DESTDIR)$(LIBDIR); $(RANLIB) db.a
427  
428  .SUFFIXES: .ml .mli .cmo .cmi .cmx
429  
430 diff -ur ocaml-3.04--/otherlibs/db/dbstubs.c ocaml-3.04/otherlibs/db/dbstubs.c
431 --- ocaml-3.04--/otherlibs/db/dbstubs.c Fri Dec  7 14:39:50 2001
432 +++ ocaml-3.04/otherlibs/db/dbstubs.c   Sat Feb  2 02:36:52 2002
433 @@ -22,7 +22,7 @@
434  
435  #include <sys/types.h>
436  #include <limits.h>
437 -#include <db.h>
438 +#include <db_185.h>
439  /* O_CREAT and others are not defined in db.h */
440  #include <fcntl.h>
441  
442 diff -ur ocaml-3.04--/otherlibs/dbm/Makefile ocaml-3.04/otherlibs/dbm/Makefile
443 --- ocaml-3.04--/otherlibs/dbm/Makefile Fri Dec  7 14:39:51 2001
444 +++ ocaml-3.04/otherlibs/dbm/Makefile   Sat Feb  2 01:50:02 2002
445 @@ -46,14 +46,14 @@
446         rm -f *.a *.o *.so
447  
448  install:
449 -       if test -f dllmldbm.so; then cp dllmldbm.so $(LIBDIR)/dllmldbm.so; fi
450 -       cp libmldbm.a $(LIBDIR)/libmldbm.a
451 -       cd $(LIBDIR); $(RANLIB) libmldbm.a
452 -       cp dbm.cma dbm.cmi dbm.mli $(LIBDIR)
453 +       if test -f dllmldbm.so; then cp dllmldbm.so $(DESTDIR)$(LIBDIR)/dllmldbm.so; fi
454 +       cp libmldbm.a $(DESTDIR)$(LIBDIR)/libmldbm.a
455 +       cd $(DESTDIR)$(LIBDIR); $(RANLIB) libmldbm.a
456 +       cp dbm.cma dbm.cmi dbm.mli $(DESTDIR)$(LIBDIR)
457  
458  installopt:
459 -       cp dbm.cmx dbm.cmxa dbm.a $(LIBDIR)
460 -       cd $(LIBDIR); $(RANLIB) dbm.a
461 +       cp dbm.cmx dbm.cmxa dbm.a $(DESTDIR)$(LIBDIR)
462 +       cd $(DESTDIR)$(LIBDIR); $(RANLIB) dbm.a
463  
464  .SUFFIXES: .ml .mli .cmo .cmi .cmx
465  
466 diff -ur ocaml-3.04--/otherlibs/dynlink/Makefile ocaml-3.04/otherlibs/dynlink/Makefile
467 --- ocaml-3.04--/otherlibs/dynlink/Makefile     Fri Dec  7 14:39:51 2001
468 +++ ocaml-3.04/otherlibs/dynlink/Makefile       Sat Feb  2 01:48:21 2002
469 @@ -38,7 +38,7 @@
470         $(CAMLC) $(COMPFLAGS) -o extract_crc dynlink.cma extract_crc.cmo
471  
472  install:
473 -       cp dynlink.cmi dynlink.cma dynlink.mli extract_crc $(LIBDIR)
474 +       cp dynlink.cmi dynlink.cma dynlink.mli extract_crc $(DESTDIR)$(LIBDIR)
475  
476  installopt:
477  
478 diff -ur ocaml-3.04--/otherlibs/graph/Makefile ocaml-3.04/otherlibs/graph/Makefile
479 --- ocaml-3.04--/otherlibs/graph/Makefile       Fri Dec  7 14:39:52 2001
480 +++ ocaml-3.04/otherlibs/graph/Makefile Sat Feb  2 01:48:21 2002
481 @@ -49,14 +49,14 @@
482         rm -f *.a *.so *.o
483  
484  install:
485 -       if test -f dllgraphics.so; then cp dllgraphics.so $(LIBDIR)/dllgraphics.so; fi
486 -       cp libgraphics.a $(LIBDIR)/libgraphics.a
487 -       cd $(LIBDIR); $(RANLIB) libgraphics.a
488 -       cp graphics.cm[ia] graphicsX11.cmi graphics.mli graphicsX11.mli $(LIBDIR)
489 +       if test -f dllgraphics.so; then cp dllgraphics.so $(DESTDIR)$(LIBDIR)/dllgraphics.so; fi
490 +       cp libgraphics.a $(DESTDIR)$(LIBDIR)/libgraphics.a
491 +       cd $(DESTDIR)$(LIBDIR); $(RANLIB) libgraphics.a
492 +       cp graphics.cm[ia] graphicsX11.cmi graphics.mli graphicsX11.mli $(DESTDIR)$(LIBDIR)
493  
494  installopt:
495 -       cp graphics.cmxa graphics.a $(LIBDIR)
496 -       cd $(LIBDIR); $(RANLIB) graphics.a
497 +       cp graphics.cmxa graphics.a $(DESTDIR)$(LIBDIR)
498 +       cd $(DESTDIR)$(LIBDIR); $(RANLIB) graphics.a
499  
500  .SUFFIXES: .ml .mli .cmo .cmi .cmx
501  
502 diff -ur ocaml-3.04--/otherlibs/labltk/browser/Makefile ocaml-3.04/otherlibs/labltk/browser/Makefile
503 --- ocaml-3.04--/otherlibs/labltk/browser/Makefile      Wed Oct  3 08:34:55 2001
504 +++ ocaml-3.04/otherlibs/labltk/browser/Makefile        Sat Feb  2 01:48:21 2002
505 @@ -44,7 +44,7 @@
506  
507  install:
508         if test -f ocamlbrowser$(EXE); then : ; \
509 -         cp ocamlbrowser$(EXE) $(BINDIR); fi
510 +         cp ocamlbrowser$(EXE) $(DESTDIR)$(BINDIR); fi
511  
512  clean:
513         rm -f *.cm? ocamlbrowser$(EXE) dummy.mli *~ *.orig
514 diff -ur ocaml-3.04--/otherlibs/labltk/compiler/Makefile ocaml-3.04/otherlibs/labltk/compiler/Makefile
515 --- ocaml-3.04--/otherlibs/labltk/compiler/Makefile     Thu Sep  6 10:52:25 2001
516 +++ ocaml-3.04/otherlibs/labltk/compiler/Makefile       Sat Feb  2 01:48:21 2002
517 @@ -19,7 +19,7 @@
518         rm -f *.cm*  parser.ml parser.mli lexer.ml tkcompiler
519  
520  install: 
521 -       cp tkcompiler $(LABLTKDIR)
522 +       cp tkcompiler $(DESTDIR)$(LABLTKDIR)
523  
524  .SUFFIXES :
525  .SUFFIXES : .mli .ml .cmi .cmo .mlp
526 diff -ur ocaml-3.04--/otherlibs/labltk/jpf/Makefile ocaml-3.04/otherlibs/labltk/jpf/Makefile
527 --- ocaml-3.04--/otherlibs/labltk/jpf/Makefile  Tue Feb 27 11:09:42 2001
528 +++ ocaml-3.04/otherlibs/labltk/jpf/Makefile    Sat Feb  2 01:48:21 2002
529 @@ -21,10 +21,10 @@
530         $(CAMLOPTLIBR) -o libjpf.cmxa $(OBJSX)
531  
532  install: libjpf.cma
533 -       cp $(OBJS:.cmo=.cmi) $(OBJS:.cmo=.mli) libjpf.cma $(LABLTKDIR)
534 +       cp $(OBJS:.cmo=.cmi) $(OBJS:.cmo=.mli) libjpf.cma $(DESTDIR)$(LABLTKDIR)
535  
536  installopt: libjpf.cmxa
537 -       cp libjpf.cmxa libjpf.a $(OBJS:.cmo=.cmx) $(LABLTKDIR)
538 +       cp libjpf.cmxa libjpf.a $(OBJS:.cmo=.cmx) $(DESTDIR)$(LABLTKDIR)
539  
540  clean:
541         rm -f *.cm* *.o *.a *~ *test
542 diff -ur ocaml-3.04--/otherlibs/labltk/lib/Makefile ocaml-3.04/otherlibs/labltk/lib/Makefile
543 --- ocaml-3.04--/otherlibs/labltk/lib/Makefile  Tue Oct 30 10:32:31 2001
544 +++ ocaml-3.04/otherlibs/labltk/lib/Makefile    Sat Feb  2 01:48:21 2002
545 @@ -45,28 +45,27 @@
546         rm -f *.cm* *.ml *.mli *.o *.a labltktop$(EXE)
547  
548  install: labltk.cma labltktop$(EXE) labltk
549 -       if test -d $(LABLTKDIR); then : ; else mkdir $(LABLTKDIR); fi
550 -       if test `grep -s -c '^$(LABLTKDIR)$$' $(LIBDIR)/ld.conf || :` = 0; \
551 -        then echo $(LABLTKDIR) >> $(LIBDIR)/ld.conf; fi
552 -       cp $(WIDGETOBJS:.cmo=.cmi) tk.cmi $(LABLTKDIR)
553 -       cp labltk.cma labltktop$(EXE) $(LABLTKDIR)
554 -       chmod 644 $(LABLTKDIR)/*.cmi
555 -       chmod 644 $(LABLTKDIR)/labltk.cma
556 -       chmod 755 $(LABLTKDIR)/labltktop$(EXE)
557 -       @if test -d $(BINDIR); then : ; else mkdir $(BINDIR); fi
558 -       cp labltk $(BINDIR)
559 -       chmod 755 $(BINDIR)/labltk
560 +       if test -d $(DESTDIR)$(LABLTKDIR); then : ; else mkdir $(DESTDIR)$(LABLTKDIR); fi
561 +       if test `grep -s -c '^$(LABLTKDIR)$$' $(DESTDIR)$(LIBDIR)/ld.conf || :` = 0; \
562 +        then echo $(LABLTKDIR) >> $(DESTDIR)$(LIBDIR)/ld.conf; fi
563 +       cp $(WIDGETOBJS:.cmo=.cmi) tk.cmi $(DESTDIR)$(LABLTKDIR)
564 +       cp labltk.cma labltktop$(EXE) $(DESTDIR)$(LABLTKDIR)
565 +       chmod 644 $(DESTDIR)$(LABLTKDIR)/*.cmi
566 +       chmod 644 $(DESTDIR)$(LABLTKDIR)/labltk.cma
567 +       chmod 755 $(DESTDIR)$(LABLTKDIR)/labltktop$(EXE)
568 +       @if test -d $(DESTDIR)$(BINDIR); then : ; else mkdir $(DESTDIR)$(BINDIR); fi
569 +       cp labltk $(DESTDIR)$(BINDIR)
570 +       chmod 755 $(DESTDIR)$(BINDIR)/labltk
571  
572  
573  installopt: labltk.cmxa
574 -       @if test -d $(LABLTKDIR); then : ; else mkdir $(LABLTKDIR); fi
575 -       cp $(SUPPORTX) $(WIDGETOBJSX) tk.cmx $(LABLTKDIR)
576 -       cp labltk.cmxa labltk.a $(LABLTKDIR)
577 -       cd $(LABLTKDIR); $(RANLIB) labltk.a
578 -       chmod 644 $(LABLTKDIR)/*.cmx
579 -       chmod 644 $(LABLTKDIR)/labltk.cmxa
580 -       chmod 644 $(LABLTKDIR)/labltk.a
581 -       @if test -d $(BINDIR); then : ; else mkdir $(BINDIR); fi
582 +       @if test -d $(DESTDIR)$(LABLTKDIR); then : ; else mkdir $(DESTDIR)$(LABLTKDIR); fi
583 +       cp $(SUPPORTX) $(WIDGETOBJSX) tk.cmx $(DESTDIR)$(LABLTKDIR)
584 +       cp labltk.cmxa labltk.a $(DESTDIR)$(LABLTKDIR)
585 +       cd $(DESTDIR)$(LABLTKDIR); $(RANLIB) labltk.a
586 +       chmod 644 $(DESTDIR)$(LABLTKDIR)/*.cmx
587 +       chmod 644 $(DESTDIR)$(LABLTKDIR)/labltk.cmxa
588 +       chmod 644 $(DESTDIR)$(LABLTKDIR)/labltk.a
589  
590  .SUFFIXES :
591  .SUFFIXES : .mli .ml .cmi .cmx .cmo .mlp
592 diff -ur ocaml-3.04--/otherlibs/labltk/support/Makefile ocaml-3.04/otherlibs/labltk/support/Makefile
593 --- ocaml-3.04--/otherlibs/labltk/support/Makefile      Mon Dec  3 01:26:38 2001
594 +++ ocaml-3.04/otherlibs/labltk/support/Makefile        Sat Feb  2 01:48:21 2002
595 @@ -25,13 +25,13 @@
596      widget.cmi widget.mli
597  
598  install: liblabltk41.a $(PUB)
599 -       if test -d $(LABLTKDIR); then : ; else mkdir $(LABLTKDIR); fi
600 -       cp $(PUB) liblabltk41.a $(LABLTKDIR)
601 -       cd $(LABLTKDIR); $(RANLIB) liblabltk41.a
602 -       cd $(LABLTKDIR); chmod 644 $(PUB) liblabltk41.a
603 +       if test -d $(DESTDIR)$(LABLTKDIR); then : ; else mkdir $(DESTDIR)$(LABLTKDIR); fi
604 +       cp $(PUB) liblabltk41.a $(DESTDIR)$(LABLTKDIR)
605 +       cd $(DESTDIR)$(LABLTKDIR); $(RANLIB) liblabltk41.a
606 +       cd $(DESTDIR)$(LABLTKDIR); chmod 644 $(PUB) liblabltk41.a
607         if test -f dlllabltk41.so; then \
608 -          cp dlllabltk41.so $(LABLTKDIR)/dlllabltk41.so; \
609 -          chmod 644 $(LABLTKDIR)/dlllabltk41.so; fi
610 +          cp dlllabltk41.so $(DESTDIR)$(LABLTKDIR)/dlllabltk41.so; \
611 +          chmod 644 $(DESTDIR)$(LABLTKDIR)/dlllabltk41.so; fi
612  
613  clean : 
614         rm -f *.cm* *.o *.a
615 diff -ur ocaml-3.04--/otherlibs/num/Makefile ocaml-3.04/otherlibs/num/Makefile
616 --- ocaml-3.04--/otherlibs/num/Makefile Fri Dec  7 14:40:14 2001
617 +++ ocaml-3.04/otherlibs/num/Makefile   Sat Feb  2 01:48:21 2002
618 @@ -52,14 +52,14 @@
619  $(CAMLOBJS:.cmo=.cmx): ../../ocamlopt
620  
621  install:
622 -       if test -f dllnums.so; then cp dllnums.so $(LIBDIR)/dllnums.so; fi
623 -       cp libnums.a $(LIBDIR)/libnums.a
624 -       cd $(LIBDIR); $(RANLIB) libnums.a
625 -       cp nums.cma $(CMIFILES) $(CMIFILES:.cmi=.mli) $(LIBDIR)
626 +       if test -f dllnums.so; then cp dllnums.so $(DESTDIR)$(LIBDIR)/dllnums.so; fi
627 +       cp libnums.a $(DESTDIR)$(LIBDIR)/libnums.a
628 +       cd $(DESTDIR)$(LIBDIR); $(RANLIB) libnums.a
629 +       cp nums.cma $(CMIFILES) $(CMIFILES:.cmi=.mli) $(DESTDIR)$(LIBDIR)
630  
631  installopt:
632 -       cp $(CAMLOBJS:.cmo=.cmx) nums.cmxa nums.a $(LIBDIR)
633 -       cd $(LIBDIR); $(RANLIB) nums.a
634 +       cp $(CAMLOBJS:.cmo=.cmx) nums.cmxa nums.a $(DESTDIR)$(LIBDIR)
635 +       cd $(DESTDIR)$(LIBDIR); $(RANLIB) nums.a
636  
637  partialclean:
638         rm -f *.cm*
639 diff -ur ocaml-3.04--/otherlibs/str/Makefile ocaml-3.04/otherlibs/str/Makefile
640 --- ocaml-3.04--/otherlibs/str/Makefile Fri Dec  7 14:40:17 2001
641 +++ ocaml-3.04/otherlibs/str/Makefile   Sat Feb  2 01:48:21 2002
642 @@ -52,14 +52,14 @@
643         cd $(REGEXLIB); if test -f Makefile; then $(MAKE) distclean; else exit 0; fi
644  
645  install:
646 -       if test -f dllstr.so; then cp dllstr.so $(LIBDIR)/dllstr.so; fi
647 -       cp libstr.a $(LIBDIR)/libstr.a
648 -       cd $(LIBDIR); $(RANLIB) libstr.a
649 -       cp str.cma str.cmi str.mli $(LIBDIR)
650 +       if test -f dllstr.so; then cp dllstr.so $(DESTDIR)$(LIBDIR)/dllstr.so; fi
651 +       cp libstr.a $(DESTDIR)$(LIBDIR)/libstr.a
652 +       cd $(DESTDIR)$(LIBDIR); $(RANLIB) libstr.a
653 +       cp str.cma str.cmi str.mli $(DESTDIR)$(LIBDIR)
654  
655  installopt:
656 -       cp str.cmx str.cmxa str.a $(LIBDIR)
657 -       cd $(LIBDIR); $(RANLIB) str.a
658 +       cp str.cmx str.cmxa str.a $(DESTDIR)$(LIBDIR)
659 +       cd $(DESTDIR)$(LIBDIR); $(RANLIB) str.a
660  
661  .SUFFIXES: .ml .mli .cmo .cmi .cmx
662  
663 diff -ur ocaml-3.04--/otherlibs/systhreads/Makefile ocaml-3.04/otherlibs/systhreads/Makefile
664 --- ocaml-3.04--/otherlibs/systhreads/Makefile  Fri Dec  7 14:40:18 2001
665 +++ ocaml-3.04/otherlibs/systhreads/Makefile    Sat Feb  2 01:48:21 2002
666 @@ -69,19 +69,19 @@
667         rm -f $(GENFILES)
668  
669  install:
670 -       if test -f dllthreads.so; then cp dllthreads.so $(LIBDIR)/dllthreads.so; fi
671 -       cp libthreads.a $(LIBDIR)/libthreads.a
672 -       cd $(LIBDIR); $(RANLIB) libthreads.a
673 -       if test -d $(LIBDIR)/threads; then :; else mkdir $(LIBDIR)/threads; fi
674 -       cp $(THREAD_OBJS:.cmo=.cmi) threads.cma $(LIBDIR)/threads
675 -       rm -f $(LIBDIR)/threads/stdlib.cma
676 -       cp thread.mli mutex.mli condition.mli event.mli threadUnix.mli $(LIBDIR)
677 +       if test -f dllthreads.so; then cp dllthreads.so $(DESTDIR)$(LIBDIR)/dllthreads.so; fi
678 +       cp libthreads.a $(DESTDIR)$(LIBDIR)/libthreads.a
679 +       cd $(DESTDIR)$(LIBDIR); $(RANLIB) libthreads.a
680 +       if test -d $(DESTDIR)$(LIBDIR)/threads; then :; else mkdir $(DESTDIR)$(LIBDIR)/threads; fi
681 +       cp $(THREAD_OBJS:.cmo=.cmi) threads.cma $(DESTDIR)$(LIBDIR)/threads
682 +       rm -f $(DESTDIR)$(LIBDIR)/threads/stdlib.cma
683 +       cp thread.mli mutex.mli condition.mli event.mli threadUnix.mli $(DESTDIR)$(LIBDIR)
684  
685  installopt:
686 -       cp libthreadsnat.a $(LIBDIR)/libthreadsnat.a
687 -       cd $(LIBDIR); $(RANLIB) libthreadsnat.a
688 -       cp $(THREAD_OBJS:.cmo=.cmx) threads.cmxa threads.a $(LIBDIR)/threads
689 -       cd $(LIBDIR)/threads; $(RANLIB) threads.a
690 +       cp libthreadsnat.a $(DESTDIR)$(LIBDIR)/libthreadsnat.a
691 +       cd $(DESTDIR)$(LIBDIR); $(RANLIB) libthreadsnat.a
692 +       cp $(THREAD_OBJS:.cmo=.cmx) threads.cmxa threads.a $(DESTDIR)$(LIBDIR)/threads
693 +       cd $(DESTDIR)$(LIBDIR)/threads; $(RANLIB) threads.a
694  
695  .SUFFIXES: .ml .mli .cmo .cmi .cmx
696  
697 diff -ur ocaml-3.04--/otherlibs/threads/Makefile ocaml-3.04/otherlibs/threads/Makefile
698 --- ocaml-3.04--/otherlibs/threads/Makefile     Fri Dec  7 14:40:21 2001
699 +++ ocaml-3.04/otherlibs/threads/Makefile       Sat Feb  2 01:48:21 2002
700 @@ -96,12 +96,12 @@
701         rm -f pervasives.mli marshal.mli unix.mli
702  
703  install:
704 -       if test -f dllthreads.so; then cp dllthreads.so $(LIBDIR)/dllthreads.so; fi
705 -       cp libthreads.a $(LIBDIR)/libthreads.a
706 -       cd $(LIBDIR); $(RANLIB) libthreads.a
707 -       if test -d $(LIBDIR)/threads; then : ; else mkdir $(LIBDIR)/threads; fi
708 -       cp thread.cmi mutex.cmi condition.cmi event.cmi threadUnix.cmi threads.cma stdlib.cma unix.cma $(LIBDIR)/threads
709 -       cp thread.mli mutex.mli condition.mli event.mli threadUnix.mli $(LIBDIR)
710 +       if test -f dllthreads.so; then cp dllthreads.so $(DESTDIR)$(LIBDIR)/dllthreads.so; fi
711 +       cp libthreads.a $(DESTDIR)$(LIBDIR)/libthreads.a
712 +       cd $(DESTDIR)$(LIBDIR); $(RANLIB) libthreads.a
713 +       if test -d $(DESTDIR)$(LIBDIR)/threads; then : ; else mkdir $(DESTDIR)$(LIBDIR)/threads; fi
714 +       cp thread.cmi mutex.cmi condition.cmi event.cmi threadUnix.cmi threads.cma stdlib.cma unix.cma $(DESTDIR)$(LIBDIR)/threads
715 +       cp thread.mli mutex.mli condition.mli event.mli threadUnix.mli $(DESTDIR)$(LIBDIR)
716  
717  installopt:
718  
719 diff -ur ocaml-3.04--/otherlibs/unix/Makefile ocaml-3.04/otherlibs/unix/Makefile
720 --- ocaml-3.04--/otherlibs/unix/Makefile        Fri Dec  7 14:40:24 2001
721 +++ ocaml-3.04/otherlibs/unix/Makefile  Sat Feb  2 01:48:21 2002
722 @@ -64,14 +64,14 @@
723         rm -f *.a *.o *.so
724  
725  install:
726 -       if test -f dllunix.so; then cp dllunix.so $(LIBDIR)/dllunix.so; fi
727 -       cp libunix.a $(LIBDIR)/libunix.a
728 -       cd $(LIBDIR); $(RANLIB) libunix.a
729 -       cp unix.cma $(MLOBJS:.cmo=.cmi) $(MLOBJS:.cmo=.mli) $(LIBDIR)
730 +       if test -f dllunix.so; then cp dllunix.so $(DESTDIR)$(LIBDIR)/dllunix.so; fi
731 +       cp libunix.a $(DESTDIR)$(LIBDIR)/libunix.a
732 +       cd $(DESTDIR)$(LIBDIR); $(RANLIB) libunix.a
733 +       cp unix.cma $(MLOBJS:.cmo=.cmi) $(MLOBJS:.cmo=.mli) $(DESTDIR)$(LIBDIR)
734  
735  installopt:
736 -       cp $(MLOBJS:.cmo=.cmx) unix.cmxa unix.a $(LIBDIR)
737 -       cd $(LIBDIR); $(RANLIB) unix.a
738 +       cp $(MLOBJS:.cmo=.cmx) unix.cmxa unix.a $(DESTDIR)$(LIBDIR)
739 +       cd $(DESTDIR)$(LIBDIR); $(RANLIB) unix.a
740  
741  .SUFFIXES: .ml .mli .cmo .cmi .cmx
742  
743 diff -ur ocaml-3.04--/stdlib/Makefile ocaml-3.04/stdlib/Makefile
744 --- ocaml-3.04--/stdlib/Makefile        Fri Dec  7 14:40:48 2001
745 +++ ocaml-3.04/stdlib/Makefile  Sat Feb  2 01:48:21 2002
746 @@ -45,23 +45,23 @@
747  allopt-prof: stdlib.p.cmxa std_exit.p.cmx
748  
749  install:
750 -       cp stdlib.cma std_exit.cmo *.cmi *.mli *.ml camlheader camlheader_ur $(LIBDIR)
751 +       cp stdlib.cma std_exit.cmo *.cmi *.mli *.ml camlheader camlheader_ur $(DESTDIR)$(LIBDIR)
752  
753  installopt: installopt-default installopt-$(PROFILING)
754  
755  installopt-default:
756 -       cp stdlib.cmxa stdlib.a std_exit.o *.cmx $(LIBDIR)
757 -       cd $(LIBDIR); $(RANLIB) stdlib.a
758 +       cp stdlib.cmxa stdlib.a std_exit.o *.cmx $(DESTDIR)$(LIBDIR)
759 +       cd $(DESTDIR)$(LIBDIR); $(RANLIB) stdlib.a
760  
761  installopt-noprof:
762 -       rm -f $(LIBDIR)/stdlib.p.cmxa; ln -s stdlib.cmxa $(LIBDIR)/stdlib.p.cmxa
763 -       rm -f $(LIBDIR)/stdlib.p.a; ln -s stdlib.a $(LIBDIR)/stdlib.p.a
764 -       rm -f $(LIBDIR)/std_exit.p.cmx; ln -s std_exit.cmx $(LIBDIR)/std_exit.p.cmx
765 -       rm -f $(LIBDIR)/std_exit.p.o; ln -s std_exit.o $(LIBDIR)/std_exit.p.o
766 +       rm -f $(DESTDIR)$(LIBDIR)/stdlib.p.cmxa; ln -s stdlib.cmxa $(DESTDIR)$(LIBDIR)/stdlib.p.cmxa
767 +       rm -f $(DESTDIR)$(LIBDIR)/stdlib.p.a; ln -s stdlib.a $(DESTDIR)$(LIBDIR)/stdlib.p.a
768 +       rm -f $(DESTDIR)$(LIBDIR)/std_exit.p.cmx; ln -s std_exit.cmx $(DESTDIR)$(LIBDIR)/std_exit.p.cmx
769 +       rm -f $(DESTDIR)$(LIBDIR)/std_exit.p.o; ln -s std_exit.o $(DESTDIR)$(LIBDIR)/std_exit.p.o
770  
771  installopt-prof:
772 -       cp stdlib.p.cmxa stdlib.p.a std_exit.p.cmx std_exit.p.o $(LIBDIR)
773 -       cd $(LIBDIR); $(RANLIB) stdlib.p.a
774 +       cp stdlib.p.cmxa stdlib.p.a std_exit.p.cmx std_exit.p.o $(DESTDIR)$(LIBDIR)
775 +       cd $(DESTDIR)$(LIBDIR); $(RANLIB) stdlib.p.a
776  
777  stdlib.cma: $(OBJS)
778         $(CAMLC) -a -o stdlib.cma $(ALLOBJS)
779 diff -ur ocaml-3.04--/tools/Makefile ocaml-3.04/tools/Makefile
780 --- ocaml-3.04--/tools/Makefile Fri Dec  7 15:25:00 2001
781 +++ ocaml-3.04/tools/Makefile   Sat Feb  2 01:48:21 2002
782 @@ -38,7 +38,7 @@
783         rm -f ocamldep
784  
785  install::
786 -       cp ocamldep $(BINDIR)/ocamldep$(EXE)
787 +       cp ocamldep $(DESTDIR)$(BINDIR)/ocamldep$(EXE)
788  
789  # The profiler
790  
791 @@ -54,9 +54,9 @@
792         $(CAMLC) $(LINKFLAGS) -o ocamlcp main_args.cmo ocamlcp.cmo
793  
794  install::
795 -       cp ocamlprof $(BINDIR)/ocamlprof$(EXE)
796 -       cp ocamlcp $(BINDIR)/ocamlcp$(EXE)
797 -       cp profiling.cmi profiling.cmo $(LIBDIR)
798 +       cp ocamlprof $(DESTDIR)$(BINDIR)/ocamlprof$(EXE)
799 +       cp ocamlcp $(DESTDIR)$(BINDIR)/ocamlcp$(EXE)
800 +       cp profiling.cmi profiling.cmo $(DESTDIR)$(LIBDIR)
801  
802  clean::
803         rm -f ocamlprof ocamlcp
804 @@ -68,7 +68,7 @@
805         chmod +x ocamlmktop
806  
807  install::
808 -       cp ocamlmktop $(BINDIR)/ocamlmktop
809 +       cp ocamlmktop $(DESTDIR)$(BINDIR)/ocamlmktop
810  
811  clean::
812         rm -f ocamlmktop
813 @@ -79,7 +79,7 @@
814         $(CAMLC) $(LINKFLAGS) -o ocamlmklib ocamlmklib.cmo
815  
816  install::
817 -       cp ocamlmklib $(BINDIR)/ocamlmklib
818 +       cp ocamlmklib $(DESTDIR)$(BINDIR)/ocamlmklib
819  
820  clean::
821         rm -f ocamlmklib
822 @@ -127,7 +127,7 @@
823         $(CAMLLEX) lexer301.mll
824  
825  install::
826 -       cp scrapelabels $(LIBDIR)
827 +       cp scrapelabels $(DESTDIR)$(LIBDIR)
828  
829  clean::
830         rm -f scrapelabels lexer301.ml
831 @@ -143,7 +143,7 @@
832                 $(ADDLABELS_IMPORTS) addlabels.ml
833  
834  install::
835 -       cp addlabels $(LIBDIR)
836 +       cp addlabels $(DESTDIR)$(LIBDIR)
837  
838  clean::
839         rm -f addlabels
This page took 0.160568 seconds and 3 git commands to generate.