Commits

camlspotter  committed 4c139ae

0BUILD.sh can install things now

  • Participants
  • Parent commits 539fb9e
  • Branches custom

Comments (0)

Files changed (1)

File 0scripts/0BUILD.sh

 #!/bin/sh
 
-# Build the whole. No install.
+# Build the whole.
 #
-# Parameter : PREFIX
+#   If an argument is specified, use it as PREFIX, then install the system
+#   Otherwise, it uses $PREFIX, and does not perform installation.
 
 set -e
+
+if [ "$1" != "" ]; then
+    PREFIX=$1
+    INSTALL=1
+fi
+
 ./configure --prefix $PREFIX
 make clean core coreboot
 ./build/mixed-boot.sh
 cp boot/myocamlbuild boot/myocamlbuild.boot
 make world opt opt.opt
+
+if [ "$INSTALL" = "1" ]; then
+  /bin/rm -rf $PREFIX/lib/ocaml
+  /bin/rm -rf $PREFIX/bin/ocaml*
+  /bin/rm -rf $PREFIX/bin/caml*
+  mkdir -p $PREFIX/lib
+  mkdir -p $PREFIX/bin
+  make install
+fi