Permalink
Browse files

[fix] build: fix compilation because of config path change

  • Loading branch information...
1 parent ffa4eed commit 030430ade2eac8b9d312214f05239a621f801270 @Aqua-Ye Aqua-Ye committed Jul 10, 2012
Showing with 11 additions and 13 deletions.
  1. +1 −1 configure
  2. +1 −1 ocamllib/libbase.mllib
  3. +9 −11 tools/build/gen_myocamlbuild.sh
View
@@ -93,7 +93,7 @@ done
: ${IS_RELEASE:=}
: ${LIBDIR:=$PREFIX}
-CONFIG_PATH=`pwd`/tools/build
+CONFIG_PATH=$PWD/tools/build
CONFIG_LOG=$CONFIG_PATH/config.log
echo -n > $CONFIG_LOG
View
@@ -1,4 +1,4 @@
-Config
+tools/build/Config
ocamllib/libbase/Mlstate_platform
ocamllib/libbase/PathTransform
ocamllib/libbase/Option
@@ -73,6 +73,7 @@ done
MYOCAMLBUILD=$BUILD_DIR/myocamlbuild.ml
mkdir -p $BUILD_DIR
+mkdir -p $BUILD_DIR/$CONFIG_PATH
# Generate the myocamlbuild.ml
{
@@ -124,18 +125,15 @@ mkdir -p $BUILD_DIR
OCAMLBUILD_LIB=$($OCAMLBUILD -where)
-cp $CONFIG_ML ${CONFIG_ML}i $BUILD_DIR
+cp $CONFIG_ML ${CONFIG_ML}i $BUILD_DIR/$CONFIG_PATH/
+cd $BUILD_DIR
if [ "${BYTECODE:-}" ]; then
- cd $BUILD_DIR
OCAMLC=${OCAMLOPT/ocamlopt/ocamlc}
- $OCAMLC -c config.mli
- $OCAMLC -c config.ml
- $OCAMLC -w y -I "$OCAMLBUILD_LIB" unix.cma ocamlbuildlib.cma config.ml myocamlbuild.ml "$OCAMLBUILD_LIB"/ocamlbuild.cmo -o myocamlbuild
+ $OCAMLC -I $CONFIG_PATH -c $CONFIG_PATH/config.mli
+ $OCAMLC -I $CONFIG_PATH -c $CONFIG_PATH/config.ml
+ $OCAMLC -w y -I "$OCAMLBUILD_LIB" -I $CONFIG_PATH unix.cma ocamlbuildlib.cma $CONFIG_PATH/config.ml myocamlbuild.ml "$OCAMLBUILD_LIB"/ocamlbuild.cmo -o myocamlbuild
else
- rm -f _build/config.*
- cp $CONFIG_ML ${CONFIG_ML}i $BUILD_DIR
- cd $BUILD_DIR
- $OCAMLOPT -c config.mli
- $OCAMLOPT -c config.ml
- $OCAMLOPT -w y -I "$OCAMLBUILD_LIB" unix.cmxa ocamlbuildlib.cmxa config.cmx myocamlbuild.ml "$OCAMLBUILD_LIB"/ocamlbuild.cmx -o myocamlbuild
+ $OCAMLOPT -I $CONFIG_PATH -c $CONFIG_PATH/config.mli
+ $OCAMLOPT -I $CONFIG_PATH -c $CONFIG_PATH/config.ml
+ $OCAMLOPT -w y -I "$OCAMLBUILD_LIB" -I $CONFIG_PATH unix.cmxa ocamlbuildlib.cmxa $CONFIG_PATH/config.cmx myocamlbuild.ml "$OCAMLBUILD_LIB"/ocamlbuild.cmx -o myocamlbuild
fi

0 comments on commit 030430a

Please sign in to comment.