2009-02-27 12:52 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
* make_b32.bat
* make_vc.bat
* make_gcc.sh
* Redirected old "non-GNU" build starters to the mainstream
Harbour GNU Make system, with some measures to keep
compatibility. It's not 100% compatible, but the most
important settings and aspects should be similar.
It's recommended for everyone to switch using the GNU
make system natively, as the non-GNU one will be removed
in the future, the old way is now legacy and not supported.
* INSTALL
* make_gnu.bat
+ Added some more information.
This commit is contained in:
@@ -8,6 +8,22 @@
|
||||
2009-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org)
|
||||
*/
|
||||
|
||||
2009-02-27 12:52 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
|
||||
* make_b32.bat
|
||||
* make_vc.bat
|
||||
* make_gcc.sh
|
||||
* Redirected old "non-GNU" build starters to the mainstream
|
||||
Harbour GNU Make system, with some measures to keep
|
||||
compatibility. It's not 100% compatible, but the most
|
||||
important settings and aspects should be similar.
|
||||
It's recommended for everyone to switch using the GNU
|
||||
make system natively, as the non-GNU one will be removed
|
||||
in the future, the old way is now legacy and not supported.
|
||||
|
||||
* INSTALL
|
||||
* make_gnu.bat
|
||||
+ Added some more information.
|
||||
|
||||
2009-02-27 12:38 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/bin/postinst.sh
|
||||
! fixed hb-mkslib link. Please test this version in MSys.
|
||||
|
||||
@@ -42,6 +42,8 @@ Windows with other compilers
|
||||
Make sure to have your C compiler of choice properly
|
||||
installed and GNU Make (with the name make.exe)
|
||||
accessible in the PATH _before_ the compiler tools.
|
||||
We recommend using the GNU Make from the MinGW binary
|
||||
distribution.
|
||||
|
||||
> set HB_COMPILER=<msvc|bcc32|owatcom|...>
|
||||
> set HB_INSTALL_PREFIX=<DIR>
|
||||
|
||||
@@ -2,82 +2,27 @@
|
||||
@rem $Id$
|
||||
@rem
|
||||
|
||||
rem ---------------------------------------------------------------
|
||||
rem This file is kept for compatibility with old non-GNU make
|
||||
rem system. Please read INSTALL how to migrate to the GNU make
|
||||
rem based one.
|
||||
rem
|
||||
rem ATTENTION: For this to work, you will need the GNU make.exe
|
||||
rem (MinGW build is fine) in your PATH _before_ the
|
||||
rem compiler tools.
|
||||
rem ---------------------------------------------------------------
|
||||
|
||||
@echo off
|
||||
|
||||
rem ---------------------------------------------------------------
|
||||
rem This is a generic template file, if it doesn't fit your own needs
|
||||
rem please DON'T MODIFY IT.
|
||||
rem
|
||||
rem Instead, make a local copy and modify that one, or make a call to
|
||||
rem this batch file from your customized one. [vszakats]
|
||||
rem
|
||||
rem Set any of the below settings to customize your build process:
|
||||
rem set HB_BUILD_DLL=no
|
||||
rem set HB_BUILD_DEBUG=yes
|
||||
rem set HB_BUILD_VERBOSE=no
|
||||
rem set HB_BUILD_OPTIM=no
|
||||
rem set HB_REBUILD_PARSER=yes
|
||||
rem set HB_MAKE_PROGRAM=
|
||||
rem set HB_SHOW_ERRORS=
|
||||
rem set HB_USER_MAKEFLAGS=
|
||||
rem ---------------------------------------------------------------
|
||||
set HB_COMPILER=bcc32
|
||||
|
||||
if "%HB_INSTALL_PREFIX%" == "" set HB_INSTALL_PREFIX=%~dp0
|
||||
if "%HB_BUILD_DLL%" == "" set HB_BUILD_DLL=yes
|
||||
set _HB_CC_NAME=%HB_CC_NAME%
|
||||
set _HB_MAKE_PROGRAM=%HB_MAKE_PROGRAM%
|
||||
if "%_HB_CC_NAME%" == "" set _HB_CC_NAME=b32
|
||||
|
||||
if "%_HB_CC_NAME%" == "" set _HB_CC_NAME=b32
|
||||
if "%_HB_MAKE_PROGRAM%" == "" set _HB_MAKE_PROGRAM=make.exe
|
||||
|
||||
set _HB_MAKEFILE=make_b32.mak
|
||||
set HB_EXIT_LEVEL=
|
||||
|
||||
rem ---------------------------------------------------------------
|
||||
|
||||
rem Save the user value, force silent file overwrite with COPY
|
||||
rem (not all Windows versions support the COPY /Y flag)
|
||||
set HB_ORGENV_COPYCMD=%COPYCMD%
|
||||
set COPYCMD=/Y
|
||||
|
||||
rem ---------------------------------------------------------------
|
||||
|
||||
if "%1" == "clean" goto CLEAN
|
||||
if "%1" == "Clean" goto CLEAN
|
||||
if "%1" == "CLEAN" goto CLEAN
|
||||
if "%1" == "install" goto INSTALL
|
||||
if "%1" == "Install" goto INSTALL
|
||||
if "%1" == "INSTALL" goto INSTALL
|
||||
|
||||
:BUILD
|
||||
|
||||
%_HB_MAKE_PROGRAM% %HB_USER_MAKEFLAGS% -f %_HB_MAKEFILE% %1 %2 %3 > make_%_HB_CC_NAME%.log
|
||||
if errorlevel 1 set HB_EXIT_LEVEL=1
|
||||
if errorlevel 1 if not "%HB_SHOW_ERRORS%" == "no" notepad make_%_HB_CC_NAME%.log
|
||||
goto EXIT
|
||||
|
||||
:CLEAN
|
||||
|
||||
%_HB_MAKE_PROGRAM% %HB_USER_MAKEFLAGS% -f %_HB_MAKEFILE% CLEAN > make_%_HB_CC_NAME%.log
|
||||
if errorlevel 1 set HB_EXIT_LEVEL=1
|
||||
if errorlevel 1 goto EXIT
|
||||
if exist make_%_HB_CC_NAME%.log del make_%_HB_CC_NAME%.log > nul
|
||||
if exist inst_%_HB_CC_NAME%.log del inst_%_HB_CC_NAME%.log > nul
|
||||
goto EXIT
|
||||
|
||||
:INSTALL
|
||||
|
||||
%_HB_MAKE_PROGRAM% %HB_USER_MAKEFLAGS% -f %_HB_MAKEFILE% INSTALL > nul
|
||||
if errorlevel 1 set HB_EXIT_LEVEL=1
|
||||
goto EXIT
|
||||
|
||||
:EXIT
|
||||
|
||||
rem ---------------------------------------------------------------
|
||||
|
||||
rem Restore user value
|
||||
set COPYCMD=%HB_ORGENV_COPYCMD%
|
||||
call make_gnu.bat > make_%_HB_CC_NAME%.log
|
||||
|
||||
set _HB_CC_NAME=
|
||||
set _HB_MAKE_PROGRAM=
|
||||
set _HB_MAKEFILE=
|
||||
|
||||
if exist hbpostmk.bat call hbpostmk.bat
|
||||
|
||||
@@ -3,189 +3,4 @@
|
||||
# $Id$
|
||||
#
|
||||
|
||||
# ---------------------------------------------------------------
|
||||
# Copyright 2007 Przemyslaw Czerpak (druzus/at/priv.onet.pl),
|
||||
# See doc/license.txt for licensing terms.
|
||||
# ---------------------------------------------------------------
|
||||
|
||||
if [ -z "$HB_ARCHITECTURE" ]; then
|
||||
if [ "$OSTYPE" = "msdosdjgpp" ]; then
|
||||
hb_arch="dos"
|
||||
else
|
||||
hb_arch=`uname -s | tr -d "[-]" | tr '[A-Z]' '[a-z]' 2>/dev/null`
|
||||
case "$hb_arch" in
|
||||
*windows*|*mingw32*|msys*) hb_arch="win" ;;
|
||||
*cygwin*) hb_arch="cyg" ;;
|
||||
*os/2*) hb_arch="os2" ;;
|
||||
*dos) hb_arch="dos" ;;
|
||||
*bsd) hb_arch="bsd" ;;
|
||||
esac
|
||||
fi
|
||||
export HB_ARCHITECTURE="$hb_arch"
|
||||
fi
|
||||
|
||||
if [ -z "$HB_CC_NAME" ]; then
|
||||
case "$HB_ARCHITECTURE" in
|
||||
win) HB_CC_NAME="mingw" ;;
|
||||
dos) HB_CC_NAME="djgpp" ;;
|
||||
*) HB_CC_NAME="gcc" ;;
|
||||
esac
|
||||
export HB_CC_NAME
|
||||
fi
|
||||
|
||||
if [ -z "$HB_GPM_MOUSE" ]; then
|
||||
if [ "$HB_ARCHITECTURE" = "linux" ] && \
|
||||
( [ -f /usr/include/gpm.h ] || [ -f /usr/local/include/gpm.h ]); then
|
||||
HB_GPM_MOUSE=yes
|
||||
else
|
||||
HB_GPM_MOUSE=no
|
||||
fi
|
||||
export HB_GPM_MOUSE
|
||||
fi
|
||||
|
||||
# default lib dir name
|
||||
HB_LIBDIRNAME="lib"
|
||||
|
||||
HB_ARCH64=""
|
||||
if [ "$HB_ARCHITECTURE" = "linux" ]
|
||||
then
|
||||
HB_CPU=`uname -m`
|
||||
case "$HB_CPU" in
|
||||
*[_@]64)
|
||||
HB_ARCH64="yes"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
[ -z "$CC" ] && CC="gcc"
|
||||
[ -z "$LD" ] && LD="gcc"
|
||||
|
||||
MAKE="make"
|
||||
CRSLIB="ncurses"
|
||||
OS_LIBS="-lm"
|
||||
GT_LIST="TRM"
|
||||
|
||||
case "$HB_ARCHITECTURE" in
|
||||
win) GT_LIST="WIN WVT GUI"
|
||||
OS_LIBS="-luser32 -lwinspool -lwsock32 -lgdi32"
|
||||
;;
|
||||
cyg) GT_LIST="${GT_LIST} WIN WVT GUI"
|
||||
OS_LIBS="-luser32 -lwinspool -lwsock32 -lgdi32"
|
||||
;;
|
||||
dos) GT_LIST="DOS"
|
||||
;;
|
||||
os2) GT_LIST="${GT_LIST} OS2"
|
||||
;;
|
||||
linux) OS_LIBS="$OS_LIBS -ldl"
|
||||
[ -d "/usr/lib/lib64" ] && [ "${HB_ARCH64}" = yes ] && HB_LIBDIRNAME="lib64"
|
||||
;;
|
||||
bsd) MAKE="gmake"
|
||||
;;
|
||||
sunos) MAKE="gmake"
|
||||
OS_LIBS="$OS_LIBS -lrt -lsocket -lnsl -lresolv"
|
||||
CRSLIB="curses"
|
||||
;;
|
||||
hpux) MAKE="gmake"
|
||||
OS_LIBS="$OS_LIBS -lrt"
|
||||
;;
|
||||
esac
|
||||
|
||||
#GTSLN=""
|
||||
#GTCRS=""
|
||||
#GTXWC=""
|
||||
for dir in /usr /usr/local /sw /opt/local
|
||||
do
|
||||
if [ "$GTSLN" != yes ]; then
|
||||
if [ "$GTSLN" != no ]; then
|
||||
if [ -f $dir/include/slang.h ]; then
|
||||
[ $dir = /usr ] || HB_USER_CFLAGS="$HB_USER_CFLAGS -I$dir/include"
|
||||
GTSLN=yes
|
||||
elif [ -f $dir/include/slang/slang.h ]; then
|
||||
HB_USER_CFLAGS="$HB_USER_CFLAGS -I$dir/include/slang"
|
||||
GTSLN=yes
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if [ "$GTCRS" != yes ]; then
|
||||
if [ "$GTCRS" != no ]; then
|
||||
if [ -f ${dir}/include/curses.h ]; then
|
||||
[ $dir = /usr ] || HB_USER_CFLAGS="$HB_USER_CFLAGS -I$dir/include"
|
||||
GTCRS=yes
|
||||
elif [ -f ${dir}/include/${CRSLIB}/curses.h ]; then
|
||||
HB_USER_CFLAGS="$HB_USER_CFLAGS -I$dir/include/${CRSLIB}"
|
||||
GTCRS=yes
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if [ "$GTXWC" != yes ]; then
|
||||
if [ "$GTXWC" != no ]; then
|
||||
if [ -f ${dir}/include/X11/Xlib.h ] && \
|
||||
[ -f ${dir}/include/X11/Xcms.h ] && \
|
||||
[ -f ${dir}/include/X11/Xutil.h ] && \
|
||||
[ -f ${dir}/include/X11/keysym.h ]; then
|
||||
[ $dir = /usr ] || HB_USER_CFLAGS="$HB_USER_CFLAGS -I$dir/include"
|
||||
GTXWC=yes
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
[ "${HB_WITHOUT_GTSLN}" != "yes" ] || GTSLN=""
|
||||
if [ "$HB_COMMERCE" = yes ]; then
|
||||
export HB_GPM_MOUSE=no
|
||||
GTSLN=""
|
||||
fi
|
||||
|
||||
if [ "$GTCRS" = "yes" ]; then
|
||||
GT_LIST="$GT_LIST CRS"
|
||||
OS_LIBS="$OS_LIBS -l${CRSLIB}"
|
||||
fi
|
||||
if [ "$GTSLN" = "yes" ]; then
|
||||
GT_LIST="$GT_LIST SLN"
|
||||
OS_LIBS="$OS_LIBS -lslang"
|
||||
fi
|
||||
if [ "$GTXWC" = "yes" ]; then
|
||||
GT_LIST="$GT_LIST XWC"
|
||||
OS_LIBS="$OS_LIBS -lX11 -L/usr/X11R6/$HB_LIBDIRNAME"
|
||||
fi
|
||||
|
||||
for n in $GT_LIST
|
||||
do
|
||||
GT_TEMP="$GT_TEMP \$(GT${n}_LIB)"
|
||||
GT_OBJS="$GT_OBJS \$(GT${n}_LIB_OBJS)"
|
||||
done
|
||||
GT_LIST=$GT_TEMP
|
||||
|
||||
export HB_OS_LIBS="$HB_OS_LIBS $OS_LIBS"
|
||||
export HB_GT_LIST="$HB_GT_LIST $GT_LIST"
|
||||
export HB_GT_OBJS="$HB_GT_OBJS $GT_OBJS"
|
||||
export CC LD
|
||||
|
||||
mkdir -p obj/$HB_CC_NAME/mt obj/$HB_CC_NAME/mt_dll obj/$HB_CC_NAME/dll \
|
||||
lib/$HB_CC_NAME bin/$HB_CC_NAME
|
||||
|
||||
# Convert common.mak (for BCC/VC) to common.cf (GCC)
|
||||
|
||||
# Revert Cygwin architecture to 'win'.
|
||||
# After all it's under Windows OS.
|
||||
if [ "$HB_ARCHITECTURE" = "cyg" ]
|
||||
then
|
||||
export HB_ARCHITECTURE=win
|
||||
fi
|
||||
|
||||
sed -e 's/;/ /g' \
|
||||
-e 's!\\\\!/!g' \
|
||||
-e 's!\\\(.\)!/\1!g' \
|
||||
-e 's/^!if "\($([A-Za-z0-9_]*)\)" != "\(.*\)"/ifneq (\1,\2)/g' \
|
||||
-e 's/^!if "\($([A-Za-z0-9_]*)\)" == "\(.*\)"/ifeq (\1,\2)/g' \
|
||||
-e 's/^!ifdef /ifdef /g' \
|
||||
-e 's/^!ifndef /ifndef /g' \
|
||||
-e 's/^!else/else/g' \
|
||||
-e 's/^!endif/endif/g' \
|
||||
-e 's/^!include/include/g' \
|
||||
common.mak > common.cf
|
||||
|
||||
$MAKE -f make_gcc.mak $HB_USER_MAKEFLAGS $*
|
||||
rm -f common.cf
|
||||
. `dirname $0`/make_gnu.sh $*
|
||||
|
||||
@@ -23,6 +23,17 @@ rem Copyright 1999-2001 Viktor Szakats (viktor.szakats@syenar.hu)
|
||||
rem See doc/license.txt for licensing terms.
|
||||
rem ---------------------------------------------------------------
|
||||
|
||||
rem ---------------------------------------------------------------
|
||||
rem Set these envvars for cross compilation:
|
||||
rem set HB_BIN_COMPILE=<harbourroot>\bin
|
||||
rem set HB_PPGEN_PATH=<harbourroot>\bin
|
||||
rem set HB=<harbourroot>\bin\harbour.exe
|
||||
rem set HBPP=<harbourroot>\bin\hbpp.exe
|
||||
rem
|
||||
rem Set this if you need to rebuild the language parser:
|
||||
rem set HB_REBUILD_PARSER=yes
|
||||
rem ---------------------------------------------------------------
|
||||
|
||||
|
||||
if "%HB_ARCHITECTURE%" == "" if not "%WINDIR%" == "" set HB_ARCHITECTURE=win
|
||||
if "%HB_ARCHITECTURE%" == "" set HB_ARCHITECTURE=dos
|
||||
|
||||
@@ -2,118 +2,26 @@
|
||||
@rem $Id$
|
||||
@rem
|
||||
|
||||
rem ---------------------------------------------------------------
|
||||
rem This file is kept for compatibility with old non-GNU make
|
||||
rem system. Please read INSTALL how to migrate to the GNU make
|
||||
rem based one.
|
||||
rem
|
||||
rem ATTENTION: For this to work, you will need the GNU make.exe
|
||||
rem (MinGW build is fine) in your PATH _before_ the
|
||||
rem compiler tools.
|
||||
rem ---------------------------------------------------------------
|
||||
|
||||
@echo off
|
||||
|
||||
rem ---------------------------------------------------------------
|
||||
rem This is a generic template file, if it doesn't fit your own needs
|
||||
rem please DON'T MODIFY IT.
|
||||
rem
|
||||
rem Instead, make a local copy and modify that one, or make a call to
|
||||
rem this batch file from your customized one. [vszakats]
|
||||
rem
|
||||
rem Set any of the below settings to customize your build process:
|
||||
rem set HB_BUILD_DLL=no
|
||||
rem set HB_BUILD_DEBUG=yes
|
||||
rem set HB_BUILD_VERBOSE=no
|
||||
rem set HB_BUILD_OPTIM=no
|
||||
rem set HB_REBUILD_PARSER=yes
|
||||
rem set HB_MAKE_PROGRAM=
|
||||
rem set HB_SHOW_ERRORS=
|
||||
rem set HB_USER_MAKEFLAGS=
|
||||
rem
|
||||
rem To create a WinCE build, use the following settings:
|
||||
rem set HB_BUILD_WINCE=yes
|
||||
rem set HB_CC_NAME=vcce
|
||||
rem set HB=C:\your_harbour_windows_binaries\harbour.exe
|
||||
rem set HBPP=C:\your_harbour_windows_binaries\hbpp.exe
|
||||
rem ---------------------------------------------------------------
|
||||
|
||||
if "%HB_INSTALL_PREFIX%" == "" set HB_INSTALL_PREFIX=%~dp0
|
||||
if "%HB_BUILD_DLL%" == "" set HB_BUILD_DLL=yes
|
||||
set _HB_CC_NAME=%HB_CC_NAME%
|
||||
set _HB_MAKE_PROGRAM=%HB_MAKE_PROGRAM%
|
||||
if "%HB_BUILD_WINCE%" == "yes" if "%_HB_CC_NAME%" == "" set _HB_CC_NAME=vcce
|
||||
if not "%HB_BUILD_WINCE%" == "yes" if "%_HB_CC_NAME%" == "" set _HB_CC_NAME=vc
|
||||
|
||||
if "%_HB_CC_NAME%" == "" set _HB_CC_NAME=vc
|
||||
if "%_HB_MAKE_PROGRAM%" == "" set _HB_MAKE_PROGRAM=nmake.exe
|
||||
|
||||
set _HB_MAKEFILE=make_vc.mak
|
||||
set HB_EXIT_LEVEL=
|
||||
|
||||
rem ---------------------------------------------------------------
|
||||
|
||||
rem Save the user value, force silent file overwrite with COPY
|
||||
rem (not all Windows versions support the COPY /Y flag)
|
||||
set HB_ORGENV_COPYCMD=%COPYCMD%
|
||||
set COPYCMD=/Y
|
||||
|
||||
rem ---------------------------------------------------------------
|
||||
|
||||
if "%1" == "clean" goto CLEAN
|
||||
if "%1" == "Clean" goto CLEAN
|
||||
if "%1" == "CLEAN" goto CLEAN
|
||||
if "%1" == "install" goto INSTALL
|
||||
if "%1" == "Install" goto INSTALL
|
||||
if "%1" == "INSTALL" goto INSTALL
|
||||
|
||||
rem ---------------------------------------------------------------
|
||||
|
||||
if not "%HB_BUILD_WINCE%" == "yes" goto BUILD
|
||||
|
||||
rem Checking if HB and HBPP are set
|
||||
|
||||
if not "%HB%" == "" if exist %HB% goto CHECK_HBPP
|
||||
echo.
|
||||
echo *******************************************
|
||||
echo You must set HB environment variable to a
|
||||
echo working copy of Harbour compiler executable
|
||||
echo harbour.exe.
|
||||
echo Example: set HB=C:\harbour\harbour.exe
|
||||
echo *******************************************
|
||||
echo.
|
||||
goto EXIT
|
||||
|
||||
:CHECK_HBPP
|
||||
if not "%HBPP%" == "" if exist %HBPP% goto BUILD
|
||||
echo.
|
||||
echo **********************************************
|
||||
echo You must set HBPP environment variable to a
|
||||
echo working copy of hbpp.exe helper executable
|
||||
echo Example: set HBPP=C:\harbour\hbpp.exe
|
||||
echo **********************************************
|
||||
echo.
|
||||
goto EXIT
|
||||
|
||||
rem ---------------------------------------------------------------
|
||||
|
||||
:BUILD
|
||||
|
||||
%_HB_MAKE_PROGRAM% %HB_USER_MAKEFLAGS% -nologo -f %_HB_MAKEFILE% %1 %2 %3 > make_%_HB_CC_NAME%.log
|
||||
if errorlevel 1 set HB_EXIT_LEVEL=1
|
||||
if errorlevel 1 if not "%HB_SHOW_ERRORS%" == "no" notepad make_%_HB_CC_NAME%.log
|
||||
goto EXIT
|
||||
|
||||
:CLEAN
|
||||
|
||||
%_HB_MAKE_PROGRAM% %HB_USER_MAKEFLAGS% -nologo -f %_HB_MAKEFILE% CLEAN > make_%_HB_CC_NAME%.log
|
||||
if errorlevel 1 set HB_EXIT_LEVEL=1
|
||||
if errorlevel 1 goto EXIT
|
||||
if exist make_%_HB_CC_NAME%.log del make_%_HB_CC_NAME%.log > nul
|
||||
if exist inst_%_HB_CC_NAME%.log del inst_%_HB_CC_NAME%.log > nul
|
||||
goto EXIT
|
||||
|
||||
:INSTALL
|
||||
|
||||
%_HB_MAKE_PROGRAM% %HB_USER_MAKEFLAGS% -nologo -f %_HB_MAKEFILE% INSTALL > nul
|
||||
if errorlevel 1 set HB_EXIT_LEVEL=1
|
||||
goto EXIT
|
||||
|
||||
:EXIT
|
||||
|
||||
rem ---------------------------------------------------------------
|
||||
|
||||
rem Restore user value
|
||||
set COPYCMD=%HB_ORGENV_COPYCMD%
|
||||
call make_gnu.bat > make_%_HB_CC_NAME%.log
|
||||
|
||||
set _HB_CC_NAME=
|
||||
set _HB_MAKE_PROGRAM=
|
||||
set _HB_MAKEFILE=
|
||||
|
||||
if exist hbpostmk.bat call hbpostmk.bat
|
||||
|
||||
Reference in New Issue
Block a user