improvements

This commit is contained in:
vscosta 2014-11-09 12:08:23 +00:00
parent 9c2fd881f7
commit 9868abab6c

View File

@ -1,4 +1,4 @@
# !/bin/sh #!/bin/sh
# #
# script for compiling and installing YAP under msys. Uses a mingw64 # script for compiling and installing YAP under msys. Uses a mingw64
# compiler, msys shell and nsis to do the installing # compiler, msys shell and nsis to do the installing
@ -19,6 +19,8 @@
# http://nsis.sourceforge.net/Main_Page # http://nsis.sourceforge.net/Main_Page
# #
# #
# newline
for YHOME in /y/vsc /z /home/vsc /home/vitor /Users/vsc /u/vitor; for YHOME in /y/vsc /z /home/vsc /home/vitor /Users/vsc /u/vitor;
do do
if test -d $YHOME/Yap if test -d $YHOME/Yap
@ -60,34 +62,39 @@ VERSION="$VER"."$PATCHID"
I=$# I=$#
while test $I -gt 0 while test $I -gt 0
do do
if test $1 = threads case $1 in
then threads)
THREADS=yes THREADS=yes
elif test $1 = no_threads ;;
then no_threads)
THREADS=no THREADS=no
elif test $1 = reuse ;;
then reuse)
CLEAN=no CLEAN=no
elif test $1 = clean ;;
then exe)
CLEAN=exe
;;
clean)
CLEAN=yes CLEAN=yes
elif test $1 = 32 ;;
then 32)
ABI=32 ABI=32
elif test $1 = 64 ;;
then 64)
ABI=64 ABI=64
else ;;
**)
echo "received \"$1\", should be one of threads, no_threads, 32, 64, reuse, clean" echo "received \"$1\", should be one of threads, no_threads, 32, 64, reuse, clean"
fi ;;
esac
I=$(( $I - 1 )) I=$(( $I - 1 ))
done done
# srcdir comes from here, please avoid relative paths # srcdir comes from here, please avoid relative paths
CONFIGURE="$SRC"/configure CONFIGURE="$SRC"/configure
#DEBUG=" --enable-debug-yap --enable-low-level-tracer" DEBUG=" --enable-debug-yap --enable-low-level-tracer"
DEBUG= #DEBUG=
# debugging setup # debugging setup
do_compile=yes do_compile=yes
@ -128,7 +135,7 @@ if test $ABI = 64; then
JAVA="$( echo /c/Program\ Files/Java/jdk* )" JAVA="$( echo /c/Program\ Files/Java/jdk* )"
# "/c/Python33-64" # "/c/Python33-64"
PYTHON=yes PYTHON=yes
R="$( echo /c/Program\ Files/R/R-*/bin/x64* )" R=yes
# HOME WIN32 configuration # HOME WIN32 configuration
elif test $ABI = 32; then elif test $ABI = 32; then
TARGET=YAP TARGET=YAP
@ -153,7 +160,7 @@ elif test $ABI = 32; then
JAVA="$( echo /c/Program\ Files\ *x86*/Java/jdk* )" JAVA="$( echo /c/Program\ Files\ *x86*/Java/jdk* )"
#"/c/Python27/DLLs" #"/c/Python27/DLLs"
PYTHON=yes PYTHON=yes
R="$( echo /c/Program\ Files/R/R-*/bin/i* )" R=yes
# HOST=" --enable-abi=32" # HOST=" --enable-abi=32"
fi fi
@ -170,16 +177,26 @@ BUILD+="/mingw""$ABI""$EXTRA_THREADS"
export PATH="$GCC_DIR"/bin:"$PATH" export PATH="$GCC_DIR"/bin:"$PATH"
# echo "gcc= " $GCC_DIR # echo "gcc= " $GCC_DIR
echo "host= " $HOST echo "host= " $HOST
if test x"$JAVA" != xno if test x"$JAVA" != xno
then then
export PATH="$PATH":"$JAVA"/bin export PATH="$PATH":"$JAVA"/bin
fi fi
if test x"$PYTHON" != xno if test x"$PYTHON" != xno -a x"$PYTHON" != yes
then then
export PATH="$PATH":"$PYTHON" export PATH="$PATH":"$PYTHON"
fi fi
if test x"$R" != xno
if test x"$R" != yes
then
if test "$ABI" = 32
then
RPATH="$( echo /c/Program\ Files/R/R-*/bin/i386 )"
else
RPATH="$( echo /c/Program\ Files/R/R-*/bin/x64 )"
fi
export PATH="$PATH":"$RPATH"
elif test x"$R" != xno
then then
export PATH="$PATH":"$R" export PATH="$PATH":"$R"
fi fi
@ -220,16 +237,16 @@ fi
if test $CLEAN = yes if test $CLEAN = yes
then then
make distclean rm -rf /c/$TARGET
fi fi
export INSTALL_SH=$SRC/yap-"$VERSION"/install.sh export INSTALL_SH=$SRC/yap-"$VERSION"/install.sh
# avoid using relative paths # avoid using relative paths
if test "$do_compile" = yes; then if test "$do_compile" = yes -a "$CLEAN" = yes; then
rm -rf "$BUILD"/*
mkdir -p "$BUILD" mkdir -p "$BUILD"
cd "$BUILD" cd "$BUILD"
# make distclean
# /bin/rm -rf "$BUILD"/* # /bin/rm -rf "$BUILD"/*
"$CONFIGURE" --host="$HOST" "$BLD" \ "$CONFIGURE" --host="$HOST" "$BLD" \
--prefix=/c/"$TARGET" $DEBUG\ --prefix=/c/"$TARGET" $DEBUG\
@ -241,8 +258,8 @@ if test "$do_compile" = yes; then
--with-gecode="$GECODE" \ --with-gecode="$GECODE" \
--enable-threads="$THREADS" --enable-pthread-locking --enable-threads="$THREADS" --enable-pthread-locking
make -j 4
fi fi
make -j 4
if test "$do_install" = yes; then if test "$do_install" = yes; then
make install make install
cp -a "$DOCS_DIR"0/html /c/$TARGET/share/doc/Yap cp -a "$DOCS_DIR"0/html /c/$TARGET/share/doc/Yap