Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 6 additions & 19 deletions bootstrap
Original file line number Diff line number Diff line change
@@ -1,26 +1,11 @@
#!/usr/bin/env bash
#!/bin/sh

libs="unix.cma"

OCAMLC="ocamlc -g -I +unix"
OCAMLVER=$($OCAMLC -version)
echo "$OCAMLVER"

rm -f lib/base/compat.ml
if [[ $OCAMLVER < "4.02.0" ]] ; then
echo "Using compat401.ml"
cp -f compat401.ml lib/base/compat.ml
else
if [[ $OCAMLVER < "4.03.0" ]] ; then
echo "Using compat402.ml"
cp -f compat402.ml lib/base/compat.ml
else
echo "Using compat403.ml"
cp -f compat403.ml lib/base/compat.ml
fi
fi


extmodules="compat fugue filepath filesystem"
coremodules="types gconf filetype dag libname pp expr utils modname taskdep helper dagutils process findlibConf scheduler prog dependencies generators hier meta metacache target dist project analyze configure prepare_types ppx_resolver prepare buildprogs build exception"
commandmodules="sdist doc init help install"
Expand Down Expand Up @@ -93,21 +78,23 @@ let project_version = "0.0.0"

EOF
cd src
FILES=()
FILES=""
for mod in $mainmodules
do
echo "COMPILING $mod"
[ -f "${mod}.mli" ] && $OCAMLC -I ../ -c "${mod}.mli"
$OCAMLC -I ../ -c "${mod}.ml"
FILES+=("${mod}.cmo")
FILES="${FILES} ${mod}.cmo"
done
echo "LINKING obuild.bootstrap"
# Link with all individual .cmo files for bootstrap
ALLCMO=""
for mod in $extmodules; do ALLCMO="$ALLCMO ${mod}.cmo"; done
for mod in $coremodules; do ALLCMO="$ALLCMO ${mod}.cmo"; done
for mod in $commandmodules; do ALLCMO="$ALLCMO ${mod}.cmo"; done
$OCAMLC -o ../obuild.bootstrap -I ../ ${libs} $ALLCMO "${FILES[@]}"

$OCAMLC -o ../obuild.bootstrap -I ../ $libs $ALLCMO $FILES

cd ..

rm -f lib/*.cmi lib/*.cmo lib/*.o
Expand Down
166 changes: 0 additions & 166 deletions compat401.ml

This file was deleted.

171 changes: 0 additions & 171 deletions compat402.ml

This file was deleted.

Loading