From df61dfde04a16d3744844e13f63373f335ba9823 Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Tue, 13 Nov 2007 13:13:53 +0000 Subject: [PATCH] 2007-11-13 14:13 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/make_xmingwce.sh * harbour/make_xmingw.sh * do not create compiler binaries in cross builds * use hbce and hbw prefixes for generated build scripts * harbour/make_tgz.sh * use strip from cross compiler instead of native one * harbour/include/Makefile + added missing header files * harbour/harbour.spec * minor cleanup * harbour/source/compiler/cmdcheck.c * accept internal option delimiters in define value (-d option, f.e.: '-dABC="QWE-ASD"') --- harbour/ChangeLog | 19 +++++++++++++++++++ harbour/harbour.spec | 2 +- harbour/include/Makefile | 3 +++ harbour/make_tgz.sh | 11 +++++++---- harbour/make_xmingw.sh | 16 ++++++++++++++-- harbour/make_xmingwce.sh | 18 ++++++++++++++---- harbour/source/compiler/cmdcheck.c | 2 +- 7 files changed, 59 insertions(+), 12 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index ab334a4df5..f9a1da23ba 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,25 @@ 2002-12-01 13:30 UTC+0100 Foo Bar */ +2007-11-13 14:13 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/make_xmingwce.sh + * harbour/make_xmingw.sh + * do not create compiler binaries in cross builds + * use hbce and hbw prefixes for generated build scripts + + * harbour/make_tgz.sh + * use strip from cross compiler instead of native one + + * harbour/include/Makefile + + added missing header files + + * harbour/harbour.spec + * minor cleanup + + * harbour/source/compiler/cmdcheck.c + * accept internal option delimiters in define value + (-d option, f.e.: '-dABC="QWE-ASD"') + 2007-11-13 01:25 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * contrib/odbc/odbc.c ! MSVC casting warnings silenced. diff --git a/harbour/harbour.spec b/harbour/harbour.spec index f9441c45a8..d0188cf052 100644 --- a/harbour/harbour.spec +++ b/harbour/harbour.spec @@ -307,7 +307,7 @@ then for utl in hbmake hbrun hbdot hbpp hbdoc do pushd utils/${utl} - rm -fR "./${HB_ARCHITECTURE}" + rm -fR "./${HB_ARCHITECTURE}/${HB_COMPILER}" make -r install strip ${HB_BIN_INSTALL}/${utl} popd diff --git a/harbour/include/Makefile b/harbour/include/Makefile index 3096715cfd..e4574cd63f 100644 --- a/harbour/include/Makefile +++ b/harbour/include/Makefile @@ -17,6 +17,7 @@ C_HEADERS=\ hbapiitm.h \ hbapilng.h \ hbapirdd.h \ + hbassert.h \ hbchksum.h \ hbcomp.h \ hbcompdf.h \ @@ -55,6 +56,7 @@ C_HEADERS=\ hbvmpub.h \ hbxvm.h \ hbwince.h \ + hbwmain.c \ hb_io.h \ PRG_HEADERS=\ @@ -89,6 +91,7 @@ PRG_HEADERS=\ hboo.ch \ hbpers.ch \ hbsetup.ch \ + hbsix.ch \ hbstdgen.ch \ hbusrrdd.ch \ inkey.ch \ diff --git a/harbour/make_tgz.sh b/harbour/make_tgz.sh index f656520302..4486f6c306 100755 --- a/harbour/make_tgz.sh +++ b/harbour/make_tgz.sh @@ -17,6 +17,7 @@ name="harbour" hb_ver=`get_hbver` hb_platform=`get_hbplatform` [ "${hb_platform}" = "" ] || hb_platform="-${hb_platform}" +[ "${HB_XBUILD}" = "" ] || hb_platform="-${HB_XBUILD}" hb_archfile="${name}-${hb_ver}${hb_platform}.bin.tar.gz" hb_instfile="${name}-${hb_ver}${hb_platform}.inst.sh" hb_lnkso="yes" @@ -228,10 +229,12 @@ do done # Keep the size of the binaries to a minimim. -strip $HB_BIN_INSTALL/harbour${hb_exesuf} +if [ -f $HB_BIN_INSTALL/harbour${hb_exesuf} ]; then + ${CCPREFIX}strip $HB_BIN_INSTALL/harbour${hb_exesuf} +fi if [ "$HB_ARCHITECTURE" != "hpux" ]; then # Keep the size of the libraries to a minimim, but don't try to strip symlinks. - strip -S `find $HB_LIB_INSTALL -type f` + ${CCPREFIX}strip -S `find $HB_LIB_INSTALL -type f` fi if [ "${hb_sysdir}" = "yes" ]; then @@ -266,9 +269,9 @@ then for utl in hbmake hbrun hbdot hbpp hbdoc hbtest do (cd "utils/${utl}" - rm -fR "./${HB_ARCHITECTURE}" + rm -fR "./${HB_ARCHITECTURE}/${HB_COMPILER}" $MAKE -r install - strip "${HB_BIN_INSTALL}/${utl}${hb_exesuf}") + ${CCPREFIX}strip "${HB_BIN_INSTALL}/${utl}${hb_exesuf}") done fi diff --git a/harbour/make_xmingw.sh b/harbour/make_xmingw.sh index df060a2d9e..3885ae53fb 100755 --- a/harbour/make_xmingw.sh +++ b/harbour/make_xmingw.sh @@ -14,6 +14,7 @@ cleanup() } UNAME=`uname` +UNAMEL=`echo "$UNAME"|tr A-Z a-z` export HB_ARCHITECTURE=w32 export HB_COMPILER=mingw32 @@ -50,19 +51,30 @@ PATH="$CCPATH$PATH" export PATH CCPATH CCPREFIX +export HB_TOOLS_PREF="hbw" +export HB_XBUILD="w32" +export HB_HOST_BUILD="lib" + export HB_BIN_COMPILE=/tmp/hb-xmingw-$$ rm -fR "${HB_BIN_COMPILE}" trap cleanup EXIT &>/dev/null mkdir ${HB_BIN_COMPILE} +DIR=`cd $(dirname $0);pwd` if which harbour &> /dev/null; then - ln -s `which harbour` ${HB_BIN_COMPILE}/harbour.exe + HB_COMP_PATH=`which harbour 2> /dev/null` +else + HB_COMP_PATH="$DIR/source/main/$UNAMEL/gcc/harbour" +fi + +if [ -x "${HB_COMP_PATH}" ]; then + ln -s "${HB_COMP_PATH}" ${HB_BIN_COMPILE}/harbour.exe else echo "You must have a working Harbour executable for your platform on your PATH." exit 1 fi -(cd `dirname $0`; ln -s `pwd`/source/pp/linux/gcc/hbppgen ${HB_BIN_COMPILE}/hbppgen.exe) +ln -s "$DIR/source/pp/$UNAMEL/gcc/hbppgen" ${HB_BIN_COMPILE}/hbppgen.exe export HB_PPGEN_PATH=${HB_BIN_COMPILE} case "$1" in diff --git a/harbour/make_xmingwce.sh b/harbour/make_xmingwce.sh index 3d6b314ec7..0a110d483d 100755 --- a/harbour/make_xmingwce.sh +++ b/harbour/make_xmingwce.sh @@ -14,6 +14,7 @@ cleanup() } UNAME=`uname` +UNAMEL=`echo "$UNAME"|tr A-Z a-z` export HB_ARCHITECTURE=w32 export HB_COMPILER=cemgw @@ -29,21 +30,30 @@ export CCPATH="/opt/mingw32ce/bin:" export CCPREFIX="arm-wince-mingw32ce-" export PATH="$CCPATH$PATH" +export HB_TOOLS_PREF="hbce" +export HB_XBUILD="wce" +export HB_HOST_BUILD="lib" +export HB_GT_LIB="gtwvt" + export HB_BIN_COMPILE="/tmp/hb-${CCPREFIX}-$$" rm -fR "${HB_BIN_COMPILE}" trap cleanup EXIT &>/dev/null mkdir ${HB_BIN_COMPILE} +DIR=`cd $(dirname $0);pwd` if which harbour &> /dev/null; then - ln -s `which harbour` ${HB_BIN_COMPILE}/harbour.exe + HB_COMP_PATH=`which harbour 2> /dev/null` +else + HB_COMP_PATH="$DIR/source/main/$UNAMEL/gcc/harbour" +fi +if [ -x "${HB_COMP_PATH}" ]; then + ln -s "${HB_COMP_PATH}" ${HB_BIN_COMPILE}/harbour.exe else echo "You must have a working Harbour executable for your platform on your PATH." exit 1 fi -(cd `dirname $0` -ln -s `pwd`/source/pp/`echo "$UNAME"|tr A-Z a-z`/gcc/hbppgen \ - ${HB_BIN_COMPILE}/hbppgen.exe) +ln -s "$DIR/source/pp/$UNAMEL/gcc/hbppgen" ${HB_BIN_COMPILE}/hbppgen.exe export HB_PPGEN_PATH=${HB_BIN_COMPILE} case "$1" in diff --git a/harbour/source/compiler/cmdcheck.c b/harbour/source/compiler/cmdcheck.c index 0d6eefbe0b..d24c5f4dfc 100644 --- a/harbour/source/compiler/cmdcheck.c +++ b/harbour/source/compiler/cmdcheck.c @@ -992,7 +992,7 @@ static void hb_compChkDefineSwitch( HB_COMP_DECL, char *pszSwitch ) char *szDefText = hb_strdup( pszSwitch + 2 ), *pAssign; unsigned int i = 0; - while( i < strlen( szDefText ) && !HB_ISOPTSEP( szDefText[i] ) ) + while( szDefText[i] /*&& !HB_ISOPTSEP( szDefText[i] )*/ ) i++; szDefText[i] = '\0';