From a762831ec6d197ed7db4d14f27aa9105dc7b0e8a Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 27 Feb 2009 09:45:17 +0000 Subject: [PATCH] 2009-02-27 10:44 UTC+0100 Viktor Szakats (harbour.01 syenar hu) * INSTALL * make_gnu.bat + Added --install-with-dll option. This will build and install Harbour with .dlls. Some examples: --- for msvc: call "%ProgramFiles%\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" set PATH=C:\devl\make-3.81;%PATH% set HB_INSTALL_PREFIX=C:\devl\hbvc-1.1 call make_gnu.bat --install-with-dll > out.txt 2>&1 --- --- for bcc32: set PATH=C:\devl\bcc55\bin;%PATH% set PATH=C:\devl\make-3.81;%PATH% set HB_COMPILER=bcc32 set HB_INSTALL_PREFIX=C:\devl\hbb32-1.1 call make_gnu.bat --install-with-dll > out.txt 2>&1 --- * make_gnu.bat * make_gnu_os2.cmd + Will now automatically create the install destination dirs. ; TODO: Could someone please add this feature to make_gnu.sh? * bin/postinst.bat * bin/hb-mkdyn.bat * Moved building dll flavoured executables to postinst, so they will be rebuilt even if HB_DLL!=yes but .dlls are available. * contrib/Makefile + Added support for option: HB_CONTRIBLIBS=no. This will disable building any Harbour contribs. (no need to resort to hacks here anymore) * utils/hbmk2/hbmk2.prg * Minor on help screen. --- harbour/ChangeLog | 39 +++++++++++++++++++++++++++++++++++ harbour/INSTALL | 2 ++ harbour/bin/hb-mkdyn.bat | 15 ++------------ harbour/bin/postinst.bat | 14 ++++++++++++- harbour/contrib/Makefile | 2 ++ harbour/make_gnu.bat | 33 +++++++++++++++++++++++++++++ harbour/make_gnu_os2.cmd | 6 ++++++ harbour/utils/hbmk2/hbmk2.prg | 2 +- 8 files changed, 98 insertions(+), 15 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 0ffda3ce9d..6273ad6aac 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,45 @@ 2009-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2009-02-27 10:44 UTC+0100 Viktor Szakats (harbour.01 syenar hu) + * INSTALL + * make_gnu.bat + + Added --install-with-dll option. This will build + and install Harbour with .dlls. Some examples: + --- for msvc: + call "%ProgramFiles%\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" + set PATH=C:\devl\make-3.81;%PATH% + set HB_INSTALL_PREFIX=C:\devl\hbvc-1.1 + call make_gnu.bat --install-with-dll > out.txt 2>&1 + --- + --- for bcc32: + set PATH=C:\devl\bcc55\bin;%PATH% + set PATH=C:\devl\make-3.81;%PATH% + set HB_COMPILER=bcc32 + set HB_INSTALL_PREFIX=C:\devl\hbb32-1.1 + call make_gnu.bat --install-with-dll > out.txt 2>&1 + --- + + * make_gnu.bat + * make_gnu_os2.cmd + + Will now automatically create the install destination dirs. + + ; TODO: Could someone please add this feature to make_gnu.sh? + + * bin/postinst.bat + * bin/hb-mkdyn.bat + * Moved building dll flavoured executables to postinst, + so they will be rebuilt even if HB_DLL!=yes but .dlls + are available. + + * contrib/Makefile + + Added support for option: HB_CONTRIBLIBS=no. + This will disable building any Harbour contribs. + (no need to resort to hacks here anymore) + + * utils/hbmk2/hbmk2.prg + * Minor on help screen. + 2009-02-27 08:41 UTC+0100 Viktor Szakats (harbour.01 syenar hu) * utils/hbmk2/hbmk2.prg + Now all dirs of input files referred to through .hbm diff --git a/harbour/INSTALL b/harbour/INSTALL index 8355ddf4be..690e9bc521 100644 --- a/harbour/INSTALL +++ b/harbour/INSTALL @@ -46,6 +46,8 @@ Windows with other compilers > set HB_COMPILER= > set HB_INSTALL_PREFIX= > make_gnu.bat install + or + > make_gnu.bat --install-with-dll To test it, go to \bin directory and type: > hbmk2 ..\tests\hello.prg diff --git a/harbour/bin/hb-mkdyn.bat b/harbour/bin/hb-mkdyn.bat index 033e81551a..d93d453311 100644 --- a/harbour/bin/hb-mkdyn.bat +++ b/harbour/bin/hb-mkdyn.bat @@ -123,7 +123,7 @@ del _hboneut.txt cd .. rmdir _dll -goto MK_BIN_DLL +goto END :DO_BCC32 @@ -245,7 +245,7 @@ del _hboneut.txt cd .. rmdir _dll -goto MK_BIN_DLL +goto END :DO_OWATCOM @@ -284,17 +284,6 @@ del _hbsmt.txt cd .. rmdir _dll -goto MK_BIN_DLL - -:MK_BIN_DLL - -set _HB_BIN_INSTALL=%HB_BIN_INSTALL% -if not "%HB_BIN_COMPILE%" == "" set HB_BIN_INSTALL=%HB_BIN_COMPILE% -%HB_BIN_INSTALL%\hbmk2 -q0 -shared -o%_HB_BIN_INSTALL%\hbrun-dll %~dp0..\utils\hbrun\hbrun.hbm -lhbcplr -lhbpp -lhbcommon -%HB_BIN_INSTALL%\hbmk2 -q0 -shared -o%_HB_BIN_INSTALL%\hbtest-dll %~dp0..\utils\hbtest\hbtest.hbm -set HB_BIN_INSTALL=%_HB_BIN_INSTALL% -set _HB_BIN_INSTALL= - goto END :END diff --git a/harbour/bin/postinst.bat b/harbour/bin/postinst.bat index 75cdf76060..577c835e21 100644 --- a/harbour/bin/postinst.bat +++ b/harbour/bin/postinst.bat @@ -25,7 +25,19 @@ goto inst_%HB_ARCHITECTURE% :inst_win rem Windows post install part -if "%OS%" == "Windows_NT" if "%HB_DLL%" == "yes" call %~dp0hb-mkdyn.bat +if not "%OS%" == "Windows_NT" goto end + +if "%HB_DLL%" == "yes" call %~dp0hb-mkdyn.bat + +set _HB_BIN_INSTALL=%HB_BIN_INSTALL% +if not "%HB_BIN_COMPILE%" == "" set HB_BIN_INSTALL=%HB_BIN_COMPILE% +if exist "%HB_BIN_INSTALL%\*.dll" ( + %HB_BIN_INSTALL%\hbmk2 -q0 -shared -o%_HB_BIN_INSTALL%\hbrun-dll %~dp0..\utils\hbrun\hbrun.hbm -lhbcplr -lhbpp -lhbcommon + %HB_BIN_INSTALL%\hbmk2 -q0 -shared -o%_HB_BIN_INSTALL%\hbtest-dll %~dp0..\utils\hbtest\hbtest.hbm +) +set HB_BIN_INSTALL=%_HB_BIN_INSTALL% +set _HB_BIN_INSTALL= + goto end diff --git a/harbour/contrib/Makefile b/harbour/contrib/Makefile index 9353b5ee7f..db9ab78103 100644 --- a/harbour/contrib/Makefile +++ b/harbour/contrib/Makefile @@ -50,7 +50,9 @@ DIRS +=\ else +ifneq ($(HB_CONTRIBLIBS),no) DIRS = $(HB_CONTRIBLIBS) +endif endif diff --git a/harbour/make_gnu.bat b/harbour/make_gnu.bat index 98edeedc49..bd1ff3afba 100644 --- a/harbour/make_gnu.bat +++ b/harbour/make_gnu.bat @@ -35,6 +35,12 @@ if "%HB_BIN_INSTALL%" == "" set HB_BIN_INSTALL=%HB_INSTALL_PREFIX%\bin if "%HB_LIB_INSTALL%" == "" set HB_LIB_INSTALL=%HB_INSTALL_PREFIX%\lib if "%HB_INC_INSTALL%" == "" set HB_INC_INSTALL=%HB_INSTALL_PREFIX%\include +rem Try to 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% + :START if "%HB_ARCHITECTURE%" == "" goto BAD_ARCH @@ -99,6 +105,33 @@ if "%HB_INC_INSTALL%" == "" set HB_INC_INSTALL=%HB_INSTALL_PREFIX%\include rem --------------------------------------------------------------- rem Start the GNU make system + rem --------------------------------------------------------------- + rem Special build mode when HB_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_ARCHITECTURE%" == "win" goto _SKIP_WINDLL + if not "%1" == "--install-with-dll" goto _SKIP_WINDLL + + shift + set HB_DLL=yes + set _HB_CONTRIBLIBS=%HB_CONTRIBLIBS% + set _HB_CONTRIB_ADDONS=%HB_CONTRIB_ADDONS% + set HB_CONTRIBLIBS=no + set HB_CONTRIB_ADDONS= + make clean %HB_USER_MAKEFLAGS% %1 %2 %3 %4 %5 %6 %7 %8 %9 + make install %HB_USER_MAKEFLAGS% %1 %2 %3 %4 %5 %6 %7 %8 %9 + set HB_DLL= + set HB_CONTRIBLIBS=%_HB_CONTRIBLIBS% + set HB_CONTRIB_ADDONS=%_HB_CONTRIB_ADDONS% + set _HB_CONTRIBLIBS= + set _HB_CONTRIB_ADDONS= + make clean %HB_USER_MAKEFLAGS% %1 %2 %3 %4 %5 %6 %7 %8 %9 + make install %HB_USER_MAKEFLAGS% %1 %2 %3 %4 %5 %6 %7 %8 %9 + goto END + +:SKIP_WIN + make %HB_USER_MAKEFLAGS% %1 %2 %3 %4 %5 %6 %7 %8 %9 goto END diff --git a/harbour/make_gnu_os2.cmd b/harbour/make_gnu_os2.cmd index 57927dae46..d62d07d195 100644 --- a/harbour/make_gnu_os2.cmd +++ b/harbour/make_gnu_os2.cmd @@ -16,6 +16,12 @@ if "%HB_BIN_INSTALL%" == "" set HB_BIN_INSTALL=%HB_INSTALL_PREFIX%\bin if "%HB_LIB_INSTALL%" == "" set HB_LIB_INSTALL=%HB_INSTALL_PREFIX%\lib if "%HB_INC_INSTALL%" == "" set HB_INC_INSTALL=%HB_INSTALL_PREFIX%\include +rem Try to 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% + rem In GCC3.2.2 the TCP/IP headers and libraries scheme have been changed. rem The default is the current OS/2 tcpip toolkit (BSD 4.4 based). diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index 36233b9b5c..3e530c907a 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -2741,7 +2741,7 @@ STATIC PROCEDURE ShowHelp( lLong ) "" ,; "Notes:" ,; " -