]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/ocaml/contrib/build/install.sh
update
[l4.git] / l4 / pkg / ocaml / contrib / build / install.sh
1 #!/bin/sh
2
3 #########################################################################
4 #                                                                       #
5 #                            Objective Caml                             #
6 #                                                                       #
7 #       Nicolas Pouillard, projet Gallium, INRIA Rocquencourt           #
8 #                                                                       #
9 #   Copyright 2007 Institut National de Recherche en Informatique et    #
10 #   en Automatique.  All rights reserved.  This file is distributed     #
11 #   under the terms of the Q Public License version 1.0.                #
12 #                                                                       #
13 #########################################################################
14
15 # $Id: install.sh 9530 2010-01-15 13:33:23Z xclerc $
16
17 set -e
18
19 cd `dirname $0`/..
20
21 . config/config.sh
22
23 not_installed=$PWD/_build/not_installed
24
25 rm -f "$not_installed"
26 touch "$not_installed"
27
28 wontinstall() {
29   echo "$1" >> "$not_installed"
30   echo "  don't install $1"
31 }
32
33 installbin() {
34   if [ -f "$1" ]; then
35     echo "  install binary $2"
36     cp -f "$1" "$2"
37     [ -x "$2" ] || chmod +x "$2"
38   else
39     wontinstall "$1"
40   fi
41 }
42
43 installbestbin() {
44   if [ -f "$1" ]; then
45     echo "  install binary $3 (with `basename $1`)"
46     cp -f "$1" "$3"
47   else
48     if [ -f "$2" ]; then
49       echo "  install binary $3 (with `basename $2`)"
50       cp -f "$2" "$3"
51     else
52       echo "None of $1, $2 exists"
53       exit 3
54     fi
55   fi
56   [ -x "$3" ] || chmod +x "$3"
57 }
58
59 installlib() {
60   if [ -f "$1" ]; then
61     dest="$2/`basename $1`"
62     echo "  install library $dest"
63     cp -f "$1" "$2"
64     if [ "$RANLIB" != "" ]; then
65       "$RANLIB" "$dest"
66     fi
67   else
68     wontinstall "$1"
69   fi
70 }
71
72 installdir() {
73   args=""
74   while [ $# -gt 1 ]; do
75     if [ -f "$1" ]; then
76       args="$args $1"
77     else
78       wontinstall "$1"
79     fi
80     shift
81   done
82   last="$1"
83   for file in $args; do
84     echo "  install $last/`basename $file`"
85     cp -f "$file" "$last"
86   done
87 }
88
89 installlibdir() {
90   args=""
91   while [ $# -gt 1 ]; do
92     args="$args $1"
93     shift
94   done
95   last="$1"
96   for file in $args; do
97     installlib "$file" "$last"
98   done
99 }
100
101 mkdir -p $BINDIR
102 mkdir -p $LIBDIR
103 mkdir -p $LIBDIR/caml
104 mkdir -p $LIBDIR/camlp4
105 mkdir -p $LIBDIR/vmthreads
106 mkdir -p $LIBDIR/threads
107 mkdir -p $LIBDIR/labltk
108 mkdir -p $LIBDIR/ocamlbuild
109 mkdir -p $LIBDIR/ocamldoc
110 mkdir -p $LIBDIR/ocamldoc/custom
111 mkdir -p $STUBLIBDIR
112 mkdir -p $MANDIR/man1
113 mkdir -p $MANDIR/man3
114 mkdir -p $MANDIR/man$MANEXT
115
116 echo "Installing core libraries..."
117 installlibdir byterun/libcamlrun.$A asmrun/libasmrun.$A asmrun/libasmrunp.$A \
118               $LIBDIR
119 installdir byterun/libcamlrun_shared$EXT_DLL $LIBDIR
120
121 PUBLIC_INCLUDES="\
122   alloc.h callback.h config.h custom.h fail.h intext.h \
123   memory.h misc.h mlvalues.h printexc.h signals.h compatibility.h"
124
125 cd byterun
126 for i in $PUBLIC_INCLUDES; do
127   echo "  install caml/$i"
128   sed -f ../tools/cleanup-header $i > $LIBDIR/caml/$i
129 done
130 cd ..
131
132 WIN32=""
133 if [ "x$EXE" = "x.exe" ]; then
134   installbin win32caml/ocamlwin.exe $PREFIX/OCamlWin.exe
135   WIN32=win32
136 fi
137
138 installdir otherlibs/"$WIN32"unix/unixsupport.h \
139            otherlibs/bigarray/bigarray.h \
140            $LIBDIR/caml
141
142 installdir yacc/ocamlyacc$EXE byterun/ocamlrun$EXE $BINDIR
143
144 installdir config/Makefile $LIBDIR/Makefile.config
145 installdir byterun/ld.conf $LIBDIR
146
147 cd _build
148
149 echo "Installing the toplevel and compilers..."
150 installbin ocaml$EXE $BINDIR/ocaml$EXE
151 installbin ocamlc$EXE $BINDIR/ocamlc$EXE
152 installbin ocamlopt$EXE $BINDIR/ocamlopt$EXE
153 installbin ocamlc.opt$EXE $BINDIR/ocamlc.opt$EXE
154 installbin ocamlopt.opt$EXE $BINDIR/ocamlopt.opt$EXE
155
156 set=set # coloration workaround
157
158 echo "Installing the standard library..."
159 installdir \
160   stdlib/stdlib.cma \
161   stdlib/stdlib.cmxa stdlib/stdlib.p.cmxa \
162   stdlib/camlheader \
163   stdlib/camlheader_ur \
164   stdlib/std_exit.cm[io] stdlib/std_exit.ml \
165   stdlib/arg.cmi stdlib/arg.ml stdlib/arg.mli \
166   stdlib/array.cmi stdlib/array.ml stdlib/array.mli \
167   stdlib/arrayLabels.cmi stdlib/arrayLabels.ml stdlib/arrayLabels.mli \
168   stdlib/buffer.cmi stdlib/buffer.ml stdlib/buffer.mli \
169   stdlib/callback.cmi stdlib/callback.ml stdlib/callback.mli \
170   stdlib/camlinternalLazy.cmi stdlib/camlinternalLazy.ml stdlib/camlinternalLazy.mli \
171   stdlib/camlinternalMod.cmi stdlib/camlinternalMod.ml stdlib/camlinternalMod.mli \
172   stdlib/camlinternalOO.cmi stdlib/camlinternalOO.ml stdlib/camlinternalOO.mli \
173   stdlib/char.cmi stdlib/char.ml stdlib/char.mli \
174   stdlib/complex.cmi stdlib/complex.ml stdlib/complex.mli \
175   stdlib/digest.cmi stdlib/digest.ml stdlib/digest.mli \
176   stdlib/filename.cmi stdlib/filename.ml stdlib/filename.mli \
177   stdlib/format.cmi stdlib/format.ml stdlib/format.mli \
178   stdlib/gc.cmi stdlib/gc.ml stdlib/gc.mli \
179   stdlib/genlex.cmi stdlib/genlex.ml stdlib/genlex.mli \
180   stdlib/hashtbl.cmi stdlib/hashtbl.ml stdlib/hashtbl.mli \
181   stdlib/int32.cmi stdlib/int32.ml stdlib/int32.mli \
182   stdlib/int64.cmi stdlib/int64.ml stdlib/int64.mli \
183   stdlib/lazy.cmi stdlib/lazy.ml stdlib/lazy.mli \
184   stdlib/lexing.cmi stdlib/lexing.ml stdlib/lexing.mli \
185   stdlib/list.cmi stdlib/list.ml stdlib/list.mli \
186   stdlib/listLabels.cmi stdlib/listLabels.ml stdlib/listLabels.mli \
187   stdlib/map.cmi stdlib/map.ml stdlib/map.mli \
188   stdlib/marshal.cmi stdlib/marshal.ml stdlib/marshal.mli \
189   stdlib/moreLabels.cmi stdlib/moreLabels.ml stdlib/moreLabels.mli \
190   stdlib/nativeint.cmi stdlib/nativeint.ml stdlib/nativeint.mli \
191   stdlib/obj.cmi stdlib/obj.ml stdlib/obj.mli \
192   stdlib/oo.cmi stdlib/oo.ml stdlib/oo.mli \
193   stdlib/parsing.cmi stdlib/parsing.ml stdlib/parsing.mli \
194   stdlib/pervasives.cmi stdlib/pervasives.ml stdlib/pervasives.mli \
195   stdlib/printexc.cmi stdlib/printexc.ml stdlib/printexc.mli \
196   stdlib/printf.cmi stdlib/printf.ml stdlib/printf.mli \
197   stdlib/queue.cmi stdlib/queue.ml stdlib/queue.mli \
198   stdlib/random.cmi stdlib/random.ml stdlib/random.mli \
199   stdlib/scanf.cmi stdlib/scanf.ml stdlib/scanf.mli \
200   stdlib/sort.cmi stdlib/sort.ml stdlib/sort.mli \
201   stdlib/stack.cmi stdlib/stack.ml stdlib/stack.mli \
202   stdlib/stdLabels.cmi stdlib/stdLabels.ml stdlib/stdLabels.mli \
203   stdlib/stream.cmi stdlib/stream.ml stdlib/stream.mli \
204   stdlib/string.cmi stdlib/string.ml stdlib/string.mli \
205   stdlib/stringLabels.cmi stdlib/stringLabels.ml stdlib/stringLabels.mli \
206   stdlib/sys.cmi stdlib/sys.ml stdlib/sys.mli \
207   stdlib/weak.cmi stdlib/weak.ml stdlib/weak.mli \
208   stdlib/$set.cmi stdlib/$set.ml stdlib/$set.mli \
209  stdlib/arg.cmx stdlib/arg.p.cmx \
210  stdlib/array.cmx stdlib/array.p.cmx \
211  stdlib/arrayLabels.cmx stdlib/arrayLabels.p.cmx \
212  stdlib/buffer.cmx stdlib/buffer.p.cmx \
213  stdlib/callback.cmx stdlib/callback.p.cmx \
214  stdlib/camlinternalLazy.cmx stdlib/camlinternalLazy.p.cmx \
215  stdlib/camlinternalMod.cmx stdlib/camlinternalMod.p.cmx \
216  stdlib/camlinternalOO.cmx stdlib/camlinternalOO.p.cmx \
217  stdlib/char.cmx stdlib/char.p.cmx \
218  stdlib/complex.cmx stdlib/complex.p.cmx \
219  stdlib/digest.cmx stdlib/digest.p.cmx \
220  stdlib/filename.cmx stdlib/filename.p.cmx \
221  stdlib/format.cmx stdlib/format.p.cmx \
222  stdlib/gc.cmx stdlib/gc.p.cmx \
223  stdlib/genlex.cmx stdlib/genlex.p.cmx \
224  stdlib/hashtbl.cmx stdlib/hashtbl.p.cmx \
225  stdlib/int32.cmx stdlib/int32.p.cmx \
226  stdlib/int64.cmx stdlib/int64.p.cmx \
227  stdlib/lazy.cmx stdlib/lazy.p.cmx \
228  stdlib/lexing.cmx stdlib/lexing.p.cmx \
229  stdlib/list.cmx stdlib/list.p.cmx \
230  stdlib/listLabels.cmx stdlib/listLabels.p.cmx \
231  stdlib/map.cmx stdlib/map.p.cmx \
232  stdlib/marshal.cmx stdlib/marshal.p.cmx \
233  stdlib/moreLabels.cmx stdlib/moreLabels.p.cmx \
234  stdlib/nativeint.cmx stdlib/nativeint.p.cmx \
235  stdlib/obj.cmx stdlib/obj.p.cmx \
236  stdlib/oo.cmx stdlib/oo.p.cmx \
237  stdlib/parsing.cmx stdlib/parsing.p.cmx \
238  stdlib/pervasives.cmx stdlib/pervasives.p.cmx \
239  stdlib/printexc.cmx stdlib/printexc.p.cmx \
240  stdlib/printf.cmx stdlib/printf.p.cmx \
241  stdlib/queue.cmx stdlib/queue.p.cmx \
242  stdlib/random.cmx stdlib/random.p.cmx \
243  stdlib/scanf.cmx stdlib/scanf.p.cmx \
244  stdlib/sort.cmx stdlib/sort.p.cmx \
245  stdlib/stack.cmx stdlib/stack.p.cmx \
246  stdlib/stdLabels.cmx stdlib/stdLabels.p.cmx \
247  stdlib/std_exit.cmx stdlib/std_exit.p.cmx stdlib/std_exit.$O stdlib/std_exit.p.$O \
248  stdlib/stream.cmx stdlib/stream.p.cmx \
249  stdlib/string.cmx stdlib/string.p.cmx \
250  stdlib/stringLabels.cmx stdlib/stringLabels.p.cmx \
251  stdlib/sys.cmx stdlib/sys.p.cmx \
252  stdlib/weak.cmx stdlib/weak.p.cmx \
253  stdlib/$set.cmx stdlib/$set.p.cmx \
254   $LIBDIR
255
256 installlibdir \
257   stdlib/stdlib.$A stdlib/stdlib.p.$A \
258   $LIBDIR
259
260 echo "Installing ocamllex, ocamldebug..."
261 installbin lex/ocamllex$EXE $BINDIR/ocamllex$EXE
262 installbin debugger/ocamldebug$EXE $BINDIR/ocamldebug$EXE
263 installbin lex/ocamllex.opt$EXE $BINDIR/ocamllex.opt$EXE
264 installbin tools/ocamldep.native$EXE $BINDIR/ocamldep.opt$EXE
265
266 echo "Installing some tools..."
267 installbin tools/ocamlcp.byte$EXE $BINDIR/ocamlcp$EXE
268 installbin tools/ocamldep.byte$EXE $BINDIR/ocamldep$EXE
269 installbin tools/ocamlmklib.byte$EXE $BINDIR/ocamlmklib$EXE
270 installbin tools/ocamlmktop.byte$EXE $BINDIR/ocamlmktop$EXE
271 installbin tools/ocamlprof.byte$EXE $BINDIR/ocamlprof$EXE
272 installbin toplevel/expunge.byte$EXE $LIBDIR/expunge$EXE
273 installbin tools/addlabels.byte $LIBDIR/addlabels
274 installbin tools/scrapelabels.byte $LIBDIR/scrapelabels
275 installbin otherlibs/dynlink/extract_crc.byte $LIBDIR/extract_crc
276 installbin otherlibs/labltk/lib/labltk$EXE $BINDIR/labltk$EXE
277 installbin otherlibs/labltk/browser/ocamlbrowser$EXE $BINDIR/ocamlbrowser$EXE
278 installbin otherlibs/labltk/compiler/pp$EXE $LIBDIR/labltk/pp$EXE
279 installbin otherlibs/labltk/lib/labltktop$EXE $LIBDIR/labltk/labltktop$EXE
280
281 echo "Installing libraries..."
282 installdir \
283   otherlibs/bigarray/bigarray.cma \
284   otherlibs/dbm/dbm.cma \
285   otherlibs/dynlink/dynlink.cma \
286   otherlibs/"$WIN32"graph/graphics.cma \
287   otherlibs/num/nums.cma \
288   otherlibs/str/str.cma \
289   otherlibs/"$WIN32"unix/unix.cma \
290   otherlibs/bigarray/bigarray.cmxa \
291   otherlibs/dbm/dbm.cmxa \
292   otherlibs/dynlink/dynlink.cmxa \
293   otherlibs/"$WIN32"graph/graphics.cmxa \
294   otherlibs/num/nums.cmxa \
295   otherlibs/str/str.cmxa \
296   otherlibs/"$WIN32"unix/unix.cmxa \
297   toplevel/toplevellib.cma \
298   otherlibs/systhreads/thread.mli \
299   otherlibs/systhreads/mutex.mli \
300   otherlibs/systhreads/condition.mli \
301   otherlibs/systhreads/event.mli \
302   otherlibs/systhreads/threadUnix.mli \
303   $LIBDIR
304
305 installdir \
306   otherlibs/labltk/support/fileevent.mli \
307   otherlibs/labltk/support/fileevent.cmi \
308   otherlibs/labltk/support/fileevent.cmx \
309   otherlibs/labltk/support/protocol.mli \
310   otherlibs/labltk/support/protocol.cmi \
311   otherlibs/labltk/support/protocol.cmx \
312   otherlibs/labltk/support/textvariable.mli \
313   otherlibs/labltk/support/textvariable.cmi \
314   otherlibs/labltk/support/textvariable.cmx \
315   otherlibs/labltk/support/timer.mli \
316   otherlibs/labltk/support/timer.cmi \
317   otherlibs/labltk/support/timer.cmx \
318   otherlibs/labltk/support/rawwidget.mli \
319   otherlibs/labltk/support/rawwidget.cmi \
320   otherlibs/labltk/support/rawwidget.cmx \
321   otherlibs/labltk/support/widget.mli \
322   otherlibs/labltk/support/widget.cmi \
323   otherlibs/labltk/support/widget.cmx \
324   otherlibs/labltk/support/tkthread.mli \
325   otherlibs/labltk/support/tkthread.cmi \
326   otherlibs/labltk/support/tkthread.cmo \
327   otherlibs/labltk/support/tkthread.$O \
328   otherlibs/labltk/support/tkthread.cmx \
329   otherlibs/labltk/labltk/[^_]*.mli \
330   otherlibs/labltk/labltk/*.cmi \
331   otherlibs/labltk/labltk/*.cmx \
332   otherlibs/labltk/camltk/[^_]*.mli \
333   otherlibs/labltk/camltk/*.cmi \
334   otherlibs/labltk/camltk/*.cmx \
335   otherlibs/labltk/frx/frxlib.cma \
336   otherlibs/labltk/frx/frxlib.cmxa \
337   ../otherlibs/labltk/frx/*.mli \
338   otherlibs/labltk/frx/*.cmi \
339   otherlibs/labltk/jpf/jpflib.cma \
340   otherlibs/labltk/jpf/jpflib.cmxa \
341   otherlibs/labltk/jpf/*.mli \
342   otherlibs/labltk/jpf/*.cmi \
343   otherlibs/labltk/jpf/*.cmx \
344   otherlibs/labltk/lib/labltk.cma \
345   otherlibs/labltk/lib/labltk.cmxa \
346   otherlibs/labltk/lib/labltk.cmx \
347   otherlibs/labltk/tkanim/*.mli \
348   otherlibs/labltk/tkanim/*.cmi \
349   otherlibs/labltk/tkanim/tkanim.cma \
350   otherlibs/labltk/tkanim/tkanim.cmxa \
351   otherlibs/labltk/compiler/tkcompiler \
352   $LIBDIR/labltk
353
354 installdir \
355   otherlibs/systhreads/threads.cma \
356   otherlibs/systhreads/threads.cmxa \
357   otherlibs/systhreads/thread.cmi \
358   otherlibs/systhreads/thread.cmx \
359   otherlibs/systhreads/mutex.cmi \
360   otherlibs/systhreads/mutex.cmx \
361   otherlibs/systhreads/condition.cmi \
362   otherlibs/systhreads/condition.cmx \
363   otherlibs/systhreads/event.cmi \
364   otherlibs/systhreads/event.cmx \
365   otherlibs/systhreads/threadUnix.cmi \
366   otherlibs/systhreads/threadUnix.cmx \
367   $LIBDIR/threads
368
369 installdir \
370   otherlibs/bigarray/dllbigarray$EXT_DLL \
371   otherlibs/dbm/dllmldbm$EXT_DLL \
372   otherlibs/"$WIN32"graph/dllgraphics$EXT_DLL \
373   otherlibs/num/dllnums$EXT_DLL \
374   otherlibs/str/dllstr$EXT_DLL \
375   otherlibs/systhreads/dllthreads$EXT_DLL \
376   otherlibs/"$WIN32"unix/dllunix$EXT_DLL \
377   otherlibs/threads/dllvmthreads$EXT_DLL \
378   otherlibs/labltk/support/dlllabltk$EXT_DLL \
379   otherlibs/labltk/tkanim/dlltkanim$EXT_DLL \
380   $STUBLIBDIR
381
382 installlibdir \
383   otherlibs/threads/libvmthreads.$A \
384   $LIBDIR/vmthreads
385
386 installdir \
387   otherlibs/threads/thread.cmi \
388   otherlibs/threads/thread.mli \
389   otherlibs/threads/mutex.cmi \
390   otherlibs/threads/mutex.mli \
391   otherlibs/threads/condition.cmi \
392   otherlibs/threads/condition.mli \
393   otherlibs/threads/event.cmi \
394   otherlibs/threads/event.mli \
395   otherlibs/threads/threadUnix.cmi \
396   otherlibs/threads/threadUnix.mli \
397   otherlibs/threads/threads.cma \
398   otherlibs/threads/stdlib.cma \
399   otherlibs/threads/unix.cma \
400   $LIBDIR/vmthreads
401
402 installlibdir \
403   otherlibs/labltk/support/liblabltk.$A \
404   otherlibs/labltk/lib/labltk.$A \
405   otherlibs/labltk/jpf/jpflib.$A \
406   otherlibs/labltk/tkanim/libtkanim.$A \
407   otherlibs/labltk/tkanim/tkanim.$A \
408   otherlibs/labltk/frx/frxlib.$A \
409   $LIBDIR/labltk
410
411 installlibdir \
412   otherlibs/bigarray/libbigarray.$A \
413   otherlibs/dbm/libmldbm.$A \
414   otherlibs/"$WIN32"graph/libgraphics.$A \
415   otherlibs/num/libnums.$A \
416   otherlibs/str/libstr.$A \
417   otherlibs/systhreads/libthreads.$A \
418   otherlibs/systhreads/libthreadsnat.$A \
419   otherlibs/"$WIN32"unix/libunix.$A \
420   $LIBDIR
421
422 echo "Installing object files and interfaces..."
423 installdir \
424   tools/profiling.cm[oi] \
425   toplevel/topstart.cmo \
426   toplevel/toploop.cmi \
427   toplevel/topdirs.cmi \
428   toplevel/topmain.cmi \
429   typing/outcometree.cmi \
430   typing/outcometree.mli \
431   otherlibs/graph/graphicsX11.cmi \
432   otherlibs/graph/graphicsX11.mli \
433   otherlibs/dynlink/dynlink.cmi \
434   otherlibs/dynlink/dynlink.mli \
435   otherlibs/num/arith_status.cmi \
436   otherlibs/num/arith_status.mli \
437   otherlibs/num/big_int.cmi \
438   otherlibs/num/big_int.mli \
439   otherlibs/num/nat.cmi \
440   otherlibs/num/nat.mli \
441   otherlibs/num/num.cmi \
442   otherlibs/num/num.mli \
443   otherlibs/num/ratio.cmi \
444   otherlibs/num/ratio.mli \
445   otherlibs/bigarray/bigarray.cmi \
446   otherlibs/bigarray/bigarray.mli \
447   otherlibs/dbm/dbm.cmi \
448   otherlibs/dbm/dbm.mli \
449   otherlibs/dynlink/dynlink.cmx \
450   otherlibs/"$WIN32"graph/graphics.cmi \
451   otherlibs/"$WIN32"graph/graphics.mli \
452   otherlibs/str/str.cmi \
453   otherlibs/str/str.mli \
454   otherlibs/"$WIN32"unix/unix.cmi \
455   otherlibs/"$WIN32"unix/unix.mli \
456   otherlibs/"$WIN32"unix/unixLabels.cmi \
457   otherlibs/"$WIN32"unix/unixLabels.mli \
458   otherlibs/num/arith_flags.cmx \
459   otherlibs/num/int_misc.cmx \
460   otherlibs/num/arith_status.cmx \
461   otherlibs/num/big_int.cmx \
462   otherlibs/num/nat.cmx \
463   otherlibs/num/num.cmx \
464   otherlibs/num/ratio.cmx \
465   otherlibs/bigarray/bigarray.cmx \
466   otherlibs/dbm/dbm.cmx \
467   otherlibs/"$WIN32"graph/graphics.cmx \
468   otherlibs/graph/graphicsX11.cmx \
469   otherlibs/str/str.cmx \
470   otherlibs/"$WIN32"unix/unix.cmx \
471   otherlibs/"$WIN32"unix/unixLabels.cmx \
472   $LIBDIR
473
474 installlibdir \
475   otherlibs/bigarray/bigarray.$A \
476   otherlibs/dbm/dbm.$A \
477   otherlibs/dynlink/dynlink.$A \
478   otherlibs/"$WIN32"graph/graphics.$A \
479   otherlibs/num/nums.$A \
480   otherlibs/str/str.$A \
481   otherlibs/"$WIN32"unix/unix.$A \
482   stdlib/stdlib.$A \
483   $LIBDIR
484
485 installlibdir \
486   otherlibs/systhreads/threads.$A \
487   $LIBDIR/threads
488
489 echo "Installing manuals..."
490 (cd ../man && make install)
491
492 echo "Installing ocamldoc..."
493 installbin ocamldoc/ocamldoc $BINDIR/ocamldoc$EXE
494 installbin ocamldoc/ocamldoc.opt $BINDIR/ocamldoc.opt$EXE
495
496 installdir \
497   ../ocamldoc/ocamldoc.hva \
498   ocamldoc/*.cmi \
499   ocamldoc/odoc_info.mli ocamldoc/odoc_info.cm[ia] ocamldoc/odoc_info.cmxa \
500   ocamldoc/odoc_info.$A \
501   $LIBDIR/ocamldoc
502
503 installdir \
504   ocamldoc/stdlib_man/* \
505   $MANDIR/man3
506
507 echo "Installing camlp4..."
508 installbin camlp4/camlp4prof.byte$EXE $BINDIR/camlp4prof$EXE
509 installbin camlp4/mkcamlp4.byte$EXE $BINDIR/mkcamlp4$EXE
510 installbin camlp4/camlp4.byte$EXE $BINDIR/camlp4$EXE
511 installbin camlp4/camlp4boot.byte$EXE $BINDIR/camlp4boot$EXE
512 installbin camlp4/camlp4o.byte$EXE $BINDIR/camlp4o$EXE
513 installbin camlp4/camlp4of.byte$EXE $BINDIR/camlp4of$EXE
514 installbin camlp4/camlp4oof.byte$EXE $BINDIR/camlp4oof$EXE
515 installbin camlp4/camlp4orf.byte$EXE $BINDIR/camlp4orf$EXE
516 installbin camlp4/camlp4r.byte$EXE $BINDIR/camlp4r$EXE
517 installbin camlp4/camlp4rf.byte$EXE $BINDIR/camlp4rf$EXE
518 installbin camlp4/camlp4o.native$EXE $BINDIR/camlp4o.opt$EXE
519 installbin camlp4/camlp4of.native$EXE $BINDIR/camlp4of.opt$EXE
520 installbin camlp4/camlp4oof.native$EXE $BINDIR/camlp4oof.opt$EXE
521 installbin camlp4/camlp4orf.native$EXE $BINDIR/camlp4orf.opt$EXE
522 installbin camlp4/camlp4r.native$EXE $BINDIR/camlp4r.opt$EXE
523 installbin camlp4/camlp4rf.native$EXE $BINDIR/camlp4rf.opt$EXE
524
525 cd camlp4
526 CAMLP4DIR=$LIBDIR/camlp4
527 for dir in Camlp4Parsers Camlp4Printers Camlp4Filters Camlp4Top; do
528   echo "Installing $dir..."
529   mkdir -p $CAMLP4DIR/$dir
530   installdir     \
531     $dir/*.cm*   \
532     $dir/*.$O    \
533     $CAMLP4DIR/$dir
534 done
535 installdir \
536   camlp4lib.cma camlp4lib.cmxa Camlp4.cmi \
537   camlp4fulllib.cma camlp4fulllib.cmxa \
538   camlp4o.cma camlp4of.cma camlp4oof.cma \
539   camlp4orf.cma camlp4r.cma camlp4rf.cma \
540   Camlp4Bin.cm[iox] Camlp4Bin.$O Camlp4Top.cm[io] \
541   Camlp4_config.cmi camlp4prof.cm[iox] camlp4prof.$O Camlp4_import.cmi \
542   $CAMLP4DIR
543 installlibdir camlp4lib.$A camlp4fulllib.$A $CAMLP4DIR
544 cd ..
545
546 echo "Installing ocamlbuild..."
547
548 cd ocamlbuild
549 installbin ocamlbuild.byte$EXE $BINDIR/ocamlbuild.byte$EXE
550 installbin ocamlbuild.native$EXE $BINDIR/ocamlbuild.native$EXE
551 installbestbin ocamlbuild.native$EXE ocamlbuild.byte$EXE $BINDIR/ocamlbuild$EXE
552
553 installlibdir \
554   ocamlbuildlib.$A \
555   $LIBDIR/ocamlbuild
556
557 installdir \
558   ocamlbuildlib.cmxa \
559   ocamlbuildlib.cma \
560   ocamlbuild_plugin.cmi \
561   ocamlbuild_pack.cmi \
562   ocamlbuild_unix_plugin.cmi \
563   ocamlbuild_unix_plugin.cmo \
564   ocamlbuild_unix_plugin.cmx \
565   ocamlbuild_unix_plugin.$O \
566   ocamlbuild_executor.cmi \
567   ocamlbuild_executor.cmo \
568   ocamlbuild_executor.cmx \
569   ocamlbuild_executor.$O \
570   ocamlbuild.cmo \
571   ocamlbuild.cmx \
572   ocamlbuild.$O \
573   $LIBDIR/ocamlbuild
574 cd ..
575
576 installdir \
577   ../ocamlbuild/man/ocamlbuild.1 \
578   $MANDIR/man1