* INSTALL
* make_gnu.bat
+ Added support for Cygwin builds (passes call to make_gnu.sh).
+ Added Cygwin build starter example.
+ Cygwin mentioned as a requirement for mingwarm builds,
also added to PATH.
! Fixed cygwin autodetection.
! Fixed wrong PATH order in 'MinGW GCC + MSYS' example.
* Merged mingw+msys and cygwin bash based build methods,
and titled as "alternate" method.
Now all supported compilers work by starting up make_gnu.bat.
* utils/hbmk2/hbmk2.prg
! Change compiler autodetection to work for cygwin.
* mpkg_dos.bat
* mpkg_win.bat
* make_gnu.bat
! Fixed build process to work in paths containing spaces.
I didn't test the batch in pure DOS, so I may have broken it.
* config/win/install.cf
* config/wce/install.cf
! Fixed 'install' to work when there is a space in install path.
* make_gnu.bat
* INSTALL
+ Added support for HB_BUILD_LOG envvar. If set to 'yes',
it will automatically set log output filename to:
'log-<arch>-<comp>.txt'
if set to 'no' it will no make any extra redirection,
if set to any other value, it will be used for output
(both std and err). The batch will set HB_BUILD_LOGFILE
to the filename used for output for processing.
This feature requires Windows NT or upper host.
I didn't enable this feature yet by default to not break
existing user setups, but maybe I'll do it before the
final release.
* Modified text shown (+ beep thrown) when build failed.
* Messages now all start with 'Harbour'.
* Do not do the second build pass if the first one failed.
* contrib/hbwin/legacy.prg
! Fixed CreateObject() not working due to typo.
Thanks to Itamar Lins for the report.
* mpkg_dos.bat
* mpkg_win.bat
* mpkg_win.nsi
+ Enabled HB_BUILD_LOG=yes.
* Silenced copy, zip, makensis commands.
+ Added message about failed build process.
* Changed to use 'copy' instead of 'xcopy'
* Changed internals so now they don't require HB_COMPILER
and HB_ARCHITECTURE to be set. This means that now
we can rely on autodetection even for mpkg_*.bat files.
Creating an installer is very easy now for most cases.
Just type:
mpkg_gnu.bat
* source/vm/set.c
+ Added file commit support to __MVSAVE(), if Set( _SET_HARDCOMMIT )
is set to .T.. This is the default which means by default we aren't
CA-Cl*pper compatible. Addition protected by HB_C52_STRICT.
* source/rdd/dbf1.c
! Minor typo in comment.
* doc/en-EN/hb_apiit.txt
* include/hbapi.h
* include/hbapiitm.h
* source/vm/itemapi.c
* source/vm/extend.c
* source/rtl/gtwvt/gtwvt.c
* source/rdd/dbf1.c
* contrib/gtqtc/gtqtc.cpp
* contrib/gtwvg/gtwvg.c
* contrib/gtwvg/wvggui.c
* contrib/hbwin/olecore.c
* examples/hboleold/win_ole.c
* Finishing long planned function renames to clear up
a very (10 years) old naming inconsistency.
To adapt you code to this, please do changes below:
1) hb_itemPutCPtr() (with three parameters) -> hb_itemPutCLPtr()
2) hb_itemPutCPtr2() -> hb_itemPutCPtr()
Unmodified code will generate compile time errors, so it's easy
to spot where the modifications need to be done. For most users,
only case 1) will need to be dealt with.
; INCOMPATIBLE. Please update your code.
* source/rtl/hbi18n1.c
* source/rdd/dbfnsx/dbfnsx1.c
* hb_itemPutCPtr() (with three parameters) -> hb_itemPutCLPtr()
* contrib/gtwvg/wvggui.c
* contrib/gtqtc/gtqtc.cpp
! Fixed GPF in hb_gtInfo( HB_GTI_SCREENSIZE ) call with wrong
parameter.
249 lines
9.0 KiB
Batchfile
249 lines
9.0 KiB
Batchfile
@rem
|
||
@rem $Id$
|
||
@rem
|
||
|
||
@echo off
|
||
|
||
rem ---------------------------------------------------------------
|
||
rem Copyright 1999-2009 Viktor Szakats (harbour.01 syenar.hu)
|
||
rem See COPYING for licensing terms.
|
||
rem
|
||
rem Initialize environment for GNU Make system to build Harbour
|
||
rem
|
||
rem For further information about the GNU Make system please
|
||
rem check doc/gmake.txt
|
||
rem ---------------------------------------------------------------
|
||
|
||
rem Setup defaults
|
||
if "%HB_ARCHITECTURE%" == "" if not "%WINDIR%" == "" set HB_ARCHITECTURE=win
|
||
if "%HB_ARCHITECTURE%" == "" set HB_ARCHITECTURE=dos
|
||
if "%HB_COMPILER%" == "" if not "%WINDIR%" == "" goto WIN_AUTODETECT
|
||
if "%HB_COMPILER%" == "" set HB_COMPILER=djgpp
|
||
|
||
:CONTINUE_MAKE
|
||
|
||
if "%HB_ARCHITECTURE%" == "" goto BAD_ARCH
|
||
if "%HB_COMPILER%" == "" goto BAD_COMP
|
||
|
||
if "%HB_INSTALL_PREFIX%" == "" if "%OS%" == "Windows_NT" set HB_INSTALL_PREFIX=%~dp0
|
||
|
||
rem Set to constant value
|
||
if "%HB_BIN_INSTALL%" == "" set HB_BIN_INSTALL=%HB_INSTALL_PREFIX%\bin
|
||
if "%HB_LIB_INSTALL%" == "" set HB_LIB_INSTALL=%HB_INSTALL_PREFIX%\lib\%HB_ARCHITECTURE%\%HB_COMPILER%
|
||
if "%HB_INC_INSTALL%" == "" set HB_INC_INSTALL=%HB_INSTALL_PREFIX%\include
|
||
if "%HB_DOC_INSTALL%" == "" set HB_DOC_INSTALL=%HB_INSTALL_PREFIX%\doc
|
||
|
||
rem Create install dirs
|
||
if not exist "%HB_BIN_INSTALL%\*.*" md "%HB_BIN_INSTALL%"
|
||
if not exist "%HB_LIB_INSTALL%\*.*" md "%HB_LIB_INSTALL%"
|
||
if not exist "%HB_INC_INSTALL%\*.*" md "%HB_INC_INSTALL%"
|
||
if not exist "%HB_DOC_INSTALL%\*.*" md "%HB_DOC_INSTALL%"
|
||
if not exist "%HB_DOC_INSTALL%\en-EN\*.*" md "%HB_DOC_INSTALL%\en-EN"
|
||
|
||
goto MAKE
|
||
|
||
:WIN_AUTODETECT
|
||
|
||
rem We need some batch features to autodetect compiler
|
||
if not "%OS%" == "Windows_NT" goto HELP
|
||
|
||
rem Order is significant
|
||
call :COMP_DET_ONE cygstart.exe cygwin win
|
||
call :COMP_DET_ONE gcc.exe mingw win
|
||
call :COMP_DET_ONE wpp386.exe watcom win
|
||
call :COMP_DET_ONE ml64.exe msvc64 win
|
||
call :COMP_DET_ONE icl.exe icc win
|
||
call :COMP_DET_ONE cl.exe msvc win
|
||
call :COMP_DET_ONE bcc32.exe bcc win
|
||
call :COMP_DET_ONE porc64.exe pocc64 win
|
||
call :COMP_DET_ONE pocc.exe pocc win
|
||
call :COMP_DET_ONE xcc.exe xcc win
|
||
call :COMP_DET_ONE x86_64-w64-mingw32-gcc.exe mingw64 win x86_64-w64-mingw32-
|
||
call :COMP_DET_ONE arm-wince-mingw32ce-gcc.exe mingwarm wce arm-wince-mingw32ce-
|
||
call :COMP_DET_ONE arm-mingw32ce-gcc.exe mingwarm wce arm-mingw32ce-
|
||
|
||
if "%HB_COMPILER%" == "" ( echo HB_COMPILER couldn't be automatically determined. && goto HELP )
|
||
|
||
echo Harbour HB_COMPILER autodetected: '%HB_COMPILER%'
|
||
echo Harbour HB_ARCHITECTURE autodetected: '%HB_ARCHITECTURE%'
|
||
if not "%HB_CCPREFIX%" == "" echo Harbour HB_CCPREFIX autodetected: '%HB_CCPREFIX%'
|
||
|
||
goto CONTINUE_MAKE
|
||
|
||
:HELP
|
||
|
||
echo.
|
||
echo Usage: make_gnu [command]
|
||
echo.
|
||
echo The following commands are supported:
|
||
echo - all (default)
|
||
echo - clean
|
||
echo - install
|
||
echo.
|
||
echo Please read INSTALL for HOWTOs and description
|
||
echo of available options.
|
||
goto END
|
||
|
||
:BAD_ARCH
|
||
|
||
echo Harbour: Error: HB_ARCHITECTURE not set.
|
||
goto HELP
|
||
|
||
:BAD_COMP
|
||
|
||
echo Harbour: Error: HB_COMPILER not set.
|
||
goto HELP
|
||
|
||
:MAKE
|
||
|
||
set _HB_HARBOUR_OLD=%HARBOUR%
|
||
set _HB_CLIPPER_OLD=%CLIPPER%
|
||
set HARBOUR=
|
||
set CLIPPER=
|
||
|
||
rem ---------------------------------------------------------------
|
||
rem Setup output log
|
||
|
||
set _HB_BUILD_LOG=
|
||
set HB_BUILD_LOGFILE=
|
||
if not "%HB_BUILD_LOG%" == "" if "%OS%" == "Windows_NT" set _HB_BUILD_LOG=%HB_BUILD_LOG%
|
||
: if "%HB_BUILD_LOG%" == "" if "%OS%" == "Windows_NT" set _HB_BUILD_LOG=log-%HB_ARCHITECTURE%-%HB_COMPILER%.txt
|
||
if "%_HB_BUILD_LOG%" == "yes" if "%OS%" == "Windows_NT" set _HB_BUILD_LOG=log-%HB_ARCHITECTURE%-%HB_COMPILER%.txt
|
||
if "%_HB_BUILD_LOG%" == "no" if "%OS%" == "Windows_NT" set _HB_BUILD_LOG=
|
||
if not "%_HB_BUILD_LOG%" == "" if "%OS%" == "Windows_NT" set HB_BUILD_LOGFILE=%_HB_BUILD_LOG%
|
||
if not "%_HB_BUILD_LOG%" == "" if "%OS%" == "Windows_NT" echo Harbour build output to: '%_HB_BUILD_LOG%'
|
||
if not "%_HB_BUILD_LOG%" == "" if "%OS%" == "Windows_NT" if exist "%_HB_BUILD_LOG%" del "%_HB_BUILD_LOG%"
|
||
if not "%_HB_BUILD_LOG%" == "" if "%OS%" == "Windows_NT" set _HB_BUILD_LOG=^>^> %_HB_BUILD_LOG% 2^>^&1
|
||
|
||
rem ---------------------------------------------------------------
|
||
rem Detect name of GNU Make
|
||
rem
|
||
rem Look for mingw32-make.exe and use it if found. Works only
|
||
rem on Windows NT and upper. [vszakats]
|
||
|
||
set _HB_MAKE=make.exe
|
||
|
||
if not "%HB_ARCHITECTURE%" == "dos" goto _FM_WIN
|
||
if not exist config\djg-make.exe goto SKIP_WINDLL
|
||
set _HB_MAKE=config\djg-make.exe
|
||
goto _FM_DONE
|
||
|
||
:_FM_WIN
|
||
if not exist config\mingw32-make.exe goto _FM_NOLOCAL
|
||
set _HB_MAKE=config\mingw32-make.exe
|
||
goto _FM_DONE
|
||
:_FM_NOLOCAL
|
||
if not "%OS%" == "Windows_NT" goto _FM_DONE
|
||
set _HB_CHECK=mingw32-make.exe
|
||
if exist "%_HB_CHECK%" ( set _HB_MAKE=%_HB_CHECK%&& goto _FM_DONE )
|
||
set _HB_PATH=%PATH%
|
||
:_FM_LOOP
|
||
for /F "delims=; tokens=1,2*" %%p in ("%_HB_PATH%") do (
|
||
if exist "%%p\%_HB_CHECK%" ( set _HB_MAKE=%_HB_CHECK%&& goto _FM_DONE )
|
||
if exist "%%p%_HB_CHECK%" ( set _HB_MAKE=%_HB_CHECK%&& goto _FM_DONE )
|
||
set _HB_PATH=%%~q;%%~r
|
||
)
|
||
if not "%_HB_PATH%"==";" goto _FM_LOOP
|
||
:_FM_DONE
|
||
set _HB_CHECK=
|
||
set _HB_PATH=
|
||
|
||
rem ---------------------------------------------------------------
|
||
rem Start the GNU Make system
|
||
|
||
rem ---------------------------------------------------------------
|
||
rem Special build mode when HB_BUILD_DLL=yes on Windows platform.
|
||
rem It will automatically build Harbour in two passes, one for
|
||
rem the .dlls and a final pass for the regular version.
|
||
|
||
if not "%HB_BUILD_DLL%" == "yes" goto SKIP_WINDLL
|
||
|
||
if "%HB_COMPILER%%HB_CCPREFIX%" == "mingw64" set HB_CCPREFIX=x86_64-pc-mingw32-
|
||
if "%HB_COMPILER%%HB_CCPREFIX%" == "mingwarm" set HB_CCPREFIX=arm-wince-mingw32ce-
|
||
|
||
if "%HB_COMPILER%" == "mingw" goto DO_GCC
|
||
if "%HB_COMPILER%" == "mingw64" goto DO_GCC
|
||
if "%HB_COMPILER%" == "mingwarm" goto DO_GCC
|
||
if "%HB_COMPILER%" == "cygwin" goto DO_GCC_CYG
|
||
|
||
set _HB_CONTRIBLIBS=%HB_CONTRIBLIBS%
|
||
set _HB_CONTRIB_ADDONS=%HB_CONTRIB_ADDONS%
|
||
set _HB_EXTERNALLIBS=%HB_EXTERNALLIBS%
|
||
set _HB_EXTERNAL_ADDONS=%HB_EXTERNAL_ADDONS%
|
||
set HB_DYNLIB=yes
|
||
set HB_CONTRIBLIBS=no
|
||
set HB_CONTRIB_ADDONS=
|
||
set HB_EXTERNALLIBS=no
|
||
set HB_EXTERNAL_ADDONS=
|
||
%_HB_MAKE% clean install %HB_USER_MAKEFLAGS% %1 %2 %3 %4 %5 %6 %7 %8 %9 %_HB_BUILD_LOG%
|
||
if errorlevel 1 echo Harbour GNU Make returned: %ERRORLEVEL%
|
||
if errorlevel 1 goto MAKE_DONE
|
||
set HB_DYNLIB=no
|
||
set HB_CONTRIBLIBS=%_HB_CONTRIBLIBS%
|
||
set HB_CONTRIB_ADDONS=%_HB_CONTRIB_ADDONS%
|
||
set HB_EXTERNALLIBS=%_HB_EXTERNALLIBS%
|
||
set HB_EXTERNAL_ADDONS=%_HB_EXTERNAL_ADDONS%
|
||
set _HB_CONTRIBLIBS=
|
||
set _HB_CONTRIB_ADDONS=
|
||
set _HB_EXTERNALLIBS=
|
||
set _HB_EXTERNAL_ADDONS=
|
||
%_HB_MAKE% clean install %HB_USER_MAKEFLAGS% %1 %2 %3 %4 %5 %6 %7 %8 %9 %_HB_BUILD_LOG%
|
||
if errorlevel 1 echo Harbour GNU Make returned: %ERRORLEVEL%
|
||
goto MAKE_DONE
|
||
|
||
:DO_GCC
|
||
|
||
set HB_DYNLIB=no
|
||
%_HB_MAKE% clean install %HB_USER_MAKEFLAGS% %1 %2 %3 %4 %5 %6 %7 %8 %9 %_HB_BUILD_LOG%
|
||
if errorlevel 1 echo Harbour GNU Make returned: %ERRORLEVEL%
|
||
goto MAKE_DONE
|
||
|
||
:DO_GCC_CYG
|
||
|
||
set HB_DYNLIB=no
|
||
sh make_gnu.sh clean install %HB_USER_MAKEFLAGS% %1 %2 %3 %4 %5 %6 %7 %8 %9
|
||
if errorlevel 1 echo Harbour GNU Make returned: %ERRORLEVEL%
|
||
goto MAKE_DONE
|
||
|
||
:SKIP_WINDLL
|
||
|
||
if "%HB_COMPILER%" == "cygwin" goto SKIP_WINDLL_CYG
|
||
|
||
%_HB_MAKE% %HB_USER_MAKEFLAGS% %1 %2 %3 %4 %5 %6 %7 %8 %9 %_HB_BUILD_LOG%
|
||
if errorlevel 1 echo Harbour GNU Make returned: %ERRORLEVEL%
|
||
goto MAKE_DONE
|
||
|
||
:SKIP_WINDLL_CYG
|
||
|
||
sh make_gnu.sh %HB_USER_MAKEFLAGS% %1 %2 %3 %4 %5 %6 %7 %8 %9 %_HB_BUILD_LOG%
|
||
if errorlevel 1 echo Harbour GNU Make returned: %ERRORLEVEL%
|
||
goto MAKE_DONE
|
||
|
||
:MAKE_DONE
|
||
|
||
set _HB_MAKE=
|
||
set HARBOUR=%_HB_HARBOUR_OLD%
|
||
set CLIPPER=%_HB_CLIPPER_OLD%
|
||
set _HB_BUILD_LOG=
|
||
set _HB_HARBOUR_OLD=
|
||
set _HB_CLIPPER_OLD=
|
||
goto END
|
||
|
||
:COMP_DET_ONE
|
||
|
||
if not "%HB_COMPILER%" == "" goto END
|
||
if exist "%1" ( set HB_COMPILER=%2&& set HB_ARCHITECTURE=%3&& set HB_CCPREFIX=%4&& goto _CDO_EXIT )
|
||
set _PATH=%PATH%
|
||
:_CDO_LOOP
|
||
for /F "delims=; tokens=1,2*" %%p in ("%_PATH%") do (
|
||
if exist "%%p\%1" ( set HB_COMPILER=%2&& set HB_ARCHITECTURE=%3&& set HB_CCPREFIX=%4&& goto _CDO_EXIT )
|
||
if exist "%%p%1" ( set HB_COMPILER=%2&& set HB_ARCHITECTURE=%3&& set HB_CCPREFIX=%4&& goto _CDO_EXIT )
|
||
set _PATH=%%~q;%%~r
|
||
)
|
||
if not "%_PATH%"==";" goto _CDO_LOOP
|
||
:_CDO_EXIT
|
||
set _PATH=
|
||
goto END
|
||
|
||
:END
|