diff options
-rw-r--r-- | config/Makefile.template | 24 | ||||
-rwxr-xr-x | configure | 28 | ||||
-rw-r--r-- | scripts/coqmktop.ml | 2 |
3 files changed, 27 insertions, 27 deletions
diff --git a/config/Makefile.template b/config/Makefile.template index 1907cb0d6..030670340 100644 --- a/config/Makefile.template +++ b/config/Makefile.template @@ -35,31 +35,31 @@ COQTOP=COQTOPDIRECTORY VERSION=COQVERSION # Directory containing Camlp4 binaries. Can be empty if camlp4 is in the PATH -CAMLP4BIN=CAMLP4BINDIRECTORY +CAMLP4BIN="CAMLP4BINDIRECTORY" # Ocaml version number CAMLVERSION=CAMLTAG # Ocaml .h directory -CAMLHLIB=CAMLLIBDIRECTORY/caml +CAMLHLIB="CAMLLIBDIRECTORY"/caml # Camlp4 library directory (avoid CAMLP4LIB used on Windows) CAMLP4O=CAMLP4TOOL CAMLP4COMPAT=CAMLP4COMPATFLAGS -MYCAMLP4LIB=CAMLP4LIBDIRECTORY +MYCAMLP4LIB="CAMLP4LIBDIRECTORY" # Objective-Caml compile command -OCAMLC=BYTECAMLC -OCAMLOPT=NATIVECAMLC -OCAMLDEP=OCAMLDEPEXEC -OCAMLDOC=OCAMLDOCEXEC -OCAMLLEX=OCAMLLEXEXEC -OCAMLYACC=OCAMLYACCEXEC +OCAMLC="BYTECAMLC" +OCAMLOPT="NATIVECAMLC" +OCAMLDEP="OCAMLDEPEXEC" +OCAMLDOC="OCAMLDOCEXEC" +OCAMLLEX="OCAMLLEXEXEC" +OCAMLYACC="OCAMLYACCEXEC" # Caml link command and Caml make top command -CAMLLINK=BYTECAMLC -CAMLOPTLINK=NATIVECAMLC -CAMLMKTOP=CAMLMKTOPEXEC +CAMLLINK="BYTECAMLC" +CAMLOPTLINK="NATIVECAMLC" +CAMLMKTOP="CAMLMKTOPEXEC" # Compilation debug flag CAMLDEBUG=COQDEBUGFLAG @@ -48,7 +48,7 @@ coqide_spec=no with_geoproof=true # COQTOP=`pwd` - +COQSRC=`pwd` # Parse command-line arguments @@ -248,7 +248,7 @@ CAMLTAG=OCAML`echo $CAMLVERSION | sed -e "s/\([1-9]\)\.\([0-9]*\).*/\1\2/g"` # do we have a native compiler: test of ocamlopt and its version if [ "$best_compiler" = "opt" ] ; then - if test -e $nativecamlc ; then + if test -e "$nativecamlc" ; then CAMLOPTVERSION=`"$nativecamlc" -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' ` if [ "$CAMLOPTVERSION" != "$CAMLVERSION" ] ; then echo "native and bytecode compilers do not have the same version!"; fi @@ -508,7 +508,7 @@ echo "" # An escaped version of a variable escape_var () { -$CAMLBIN/ocaml 2>&1 1>/dev/null <<EOF +"$CAMLBIN"/ocaml 2>&1 1>/dev/null <<EOF prerr_endline(String.escaped(Sys.getenv"$VAR"));; EOF } @@ -520,7 +520,7 @@ ESCLIBDIR="`VAR=LIBDIR escape_var`" ESCCAMLLIB="`VAR=CAMLLIB escape_var`" ESCCAMLP4LIB="$ESCCAMLLIB"/camlp4 -mlconfig_file=$COQTOP/config/coq_config.ml +mlconfig_file="$COQSRC/config/coq_config.ml" rm -f $mlconfig_file cat << END_OF_COQ_CONFIG > $mlconfig_file (* DO NOT EDIT THIS FILE: automatically generated by ../configure *) @@ -548,25 +548,25 @@ PRINTF=`which printf` # Subdirectories of theories/ added in coq_config.ml subdirs () { - (cd $1; find * -type d ! -name .svn -exec $PRINTF "\"%s\";\n" {} \; | grep -v extraction/test | grep -v correctness >> $mlconfig_file) + (cd $1; find * -type d ! -name .svn -exec $PRINTF "\"%s\";\n" {} \; | grep -v extraction/test | grep -v correctness >> "$mlconfig_file") } -echo "let theories_dirs = [" >> $mlconfig_file +echo "let theories_dirs = [" >> "$mlconfig_file" subdirs theories -echo "]" >> $mlconfig_file +echo "]" >> "$mlconfig_file" -echo "let contrib_dirs = [" >> $mlconfig_file +echo "let contrib_dirs = [" >> "$mlconfig_file" subdirs contrib -echo "]" >> $mlconfig_file +echo "]" >> "$mlconfig_file" -chmod a-w $mlconfig_file +chmod a-w "$mlconfig_file" ############################################### # Building the $COQTOP/config/Makefile file ############################################### -rm -f $COQTOP/config/Makefile +rm -f "$COQSRC/config/Makefile" # damned backslashes under M$Windows (bis) case $ARCH in @@ -602,7 +602,7 @@ sed -e "s|LOCALINSTALLATION|$local|" \ -e "s|ARCHITECTURE|$ARCH|" \ -e "s|OSDEPENDENTLIBS|$OSDEPLIBS|" \ -e "s|OSDEPENDENTP4OPTFLAGS|$OSDEPP4OPTFLAGS|" \ - -e "s|CAMLLIBDIRECTORY|$CAMLLIB|" \ + -e "s|CAMLLIBDIRECTORY|$ESCCAMLLIB|" \ -e "s|CAMLTAG|$CAMLTAG|" \ -e "s|CAMLP4BINDIRECTORY|$ESCCAMLP4BIN|" \ -e "s|CAMLP4LIBDIRECTORY|$CAMLP4LIB|" \ @@ -624,9 +624,9 @@ sed -e "s|LOCALINSTALLATION|$local|" \ -e "s|REALSOPT|$reals|" \ -e "s|COQIDEOPT|$COQIDE|" \ -e "s|CHECKEDOUTSOURCETREE|$checkedout|" \ - $COQTOP/config/Makefile.template > $COQTOP/config/Makefile + "$COQSRC/config/Makefile.template" > "$COQSRC/config/Makefile" -chmod a-w $COQTOP/config/Makefile +chmod a-w "$COQSRC/config/Makefile" ################################################## # Building the $COQTOP/dev/ocamldebug-coq file diff --git a/scripts/coqmktop.ml b/scripts/coqmktop.ml index b57361a43..0e465a9f7 100644 --- a/scripts/coqmktop.ml +++ b/scripts/coqmktop.ml @@ -57,7 +57,7 @@ let includes () = List.fold_right (fun d l -> "-I" :: List.fold_left Filename.concat !src_coqtop d :: l) (src_dirs ()) - (["-I"; Coq_config.camlp4lib] @ + (["-I"; "\""; Coq_config.camlp4lib; "\""] @ (if !coqide then ["-thread"; "-I"; "+lablgtk2"] else [])) (* Transform bytecode object file names in native object file names *) |