diff --git a/harbour/ChangeLog b/harbour/ChangeLog index d232bb50e4..a2dbeeb848 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,24 @@ 2009-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2009-02-18 10:34 UTC+0100 Viktor Szakats (harbour.01 syenar hu) + * bin/postinst.bat + + Added generation of hbcc[.bat|.cmd], hbcmp[.bat|.cmd] + and hblnk[.bat|.cmd]. + ; NOTE: Available only when using GNU-make to build Harbour. + + * utils/hbmk/hbmk2.prg + % Minor optimizations. + + HB_USER_LIBS now gets automatic path separator adjustment. + + * config/win/msvc.cf + ! Added missing system libs. + ! Tweaked C options to be like in non-GNU make. + + * make_gcc.sh + * make_gnu.sh + - Removed compatibility with HB_ARCHITECTURE = w32. + 2009-02-18 10:25 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/include/hbapi.h * harbour/source/vm/cmdarg.c @@ -1852,7 +1870,7 @@ * source/rdd/dbfcdx/dbfcdx1.c * source/rdd/dbf1.c % Using hb_spFileExists() instead of hb_spFile(). - This API also works for dirs where use doesn't have file listing + This API also works for dirs where user doesn't have file listing rights, which may create a slight incompatibility by finding files which weren't found by former method (and by Clipper). C:\WINDOWS\TEMP\*.* were such when logged in as non-admin user, diff --git a/harbour/bin/postinst.bat b/harbour/bin/postinst.bat index bec300d91f..84f61c9703 100644 --- a/harbour/bin/postinst.bat +++ b/harbour/bin/postinst.bat @@ -14,14 +14,32 @@ rem --------------------------------------------------------------- goto inst_%HB_ARCHITECTURE% -:inst_dos -rem DOS post install part +:inst_win +rem Windows post install part + +echo @"%%~dp0hbmk2.exe" -cc %%*> %HB_BIN_INSTALL%\hbcc.bat +echo @"%%~dp0hbmk2.exe" -cmp %%*> %HB_BIN_INSTALL%\hbcmp.bat +echo @"%%~dp0hbmk2.exe" %%*> %HB_BIN_INSTALL%\hblnk.bat goto end -:inst_win -rem Windows post install part +:inst_dos +rem DOS post install part + +echo @hbmk2.exe -cc %%1 %%2 %%3 %%4 %%5 %%6 %%7 %%8 %%9> %HB_BIN_INSTALL%\hbcc.bat +echo @hbmk2.exe -cmp %%1 %%2 %%3 %%4 %%5 %%6 %%7 %%8 %%9> %HB_BIN_INSTALL%\hbcmp.bat +echo @hbmk2.exe %%1 %%2 %%3 %%4 %%5 %%6 %%7 %%8 %%9> %HB_BIN_INSTALL%\hblnk.bat + +goto end + + +:inst_os2 +rem OS/2 post install part + +echo @hbmk2.exe -cc %%1 %%2 %%3 %%4 %%5 %%6 %%7 %%8 %%9> %HB_BIN_INSTALL%\hbcc.cmd +echo @hbmk2.exe -cmp %%1 %%2 %%3 %%4 %%5 %%6 %%7 %%8 %%9> %HB_BIN_INSTALL%\hbcmp.cmd +echo @hbmk2.exe %%1 %%2 %%3 %%4 %%5 %%6 %%7 %%8 %%9> %HB_BIN_INSTALL%\hblnk.cmd goto end diff --git a/harbour/config/win/msvc.cf b/harbour/config/win/msvc.cf index 78f86bfee7..50c146b6ba 100644 --- a/harbour/config/win/msvc.cf +++ b/harbour/config/win/msvc.cf @@ -13,7 +13,8 @@ CC = cl.exe CC_IN = -c CC_OUT = -Fo CPPFLAGS = -I. -I$(HB_INC_COMPILE) -CFLAGS = -nologo -W4 -Gs -Zi +CFLAGS = -nologo -W4 -wd4127 -Gs +# -Zi ifeq ($(HB_VISUALC_VER_PRE80),) CFLAGS += -Ot2b1 -EHs-c- @@ -43,7 +44,7 @@ ifeq ($(findstring rtl,$(LIBS)),rtl) LINKLIBS += $(foreach gt, $(HB_GT_LIBS), $(gt)$(LIB_EXT)) endif -LDFLAGS = $(LINKPATHS) +LDFLAGS = $(LINKPATHS) user32.lib wsock32.lib advapi32.lib gdi32.lib AR = lib.exe ARFLAGS = $(HB_USER_AFLAGS) diff --git a/harbour/make_gcc.sh b/harbour/make_gcc.sh index 78250e5369..5f86b0beb6 100755 --- a/harbour/make_gcc.sh +++ b/harbour/make_gcc.sh @@ -8,12 +8,6 @@ # See doc/license.txt for licensing terms. # --------------------------------------------------------------- -# Compatibility. Please use 'win'. -if [ "$HB_ARCHITECTURE" == "w32" ] -then - export HB_ARCHITECTURE=win -fi - if [ -z "$HB_ARCHITECTURE" ]; then if [ "$OSTYPE" = "msdosdjgpp" ]; then hb_arch="dos" diff --git a/harbour/make_gnu.sh b/harbour/make_gnu.sh index 098befc3bc..11dadb3c46 100755 --- a/harbour/make_gnu.sh +++ b/harbour/make_gnu.sh @@ -15,12 +15,6 @@ # See doc/license.txt for licensing terms. # --------------------------------------------------------------- -# Compatibility. Please use 'win'. -if [ "$HB_ARCHITECTURE" == "w32" ] -then - export HB_ARCHITECTURE=win -fi - if [ -z "$HB_ARCHITECTURE" ]; then if [ "$OSTYPE" = "msdosdjgpp" ]; then hb_arch="dos" diff --git a/harbour/utils/hbmk/hbmk2.prg b/harbour/utils/hbmk/hbmk2.prg index 4b96cda4e1..4a1fda98d8 100644 --- a/harbour/utils/hbmk/hbmk2.prg +++ b/harbour/utils/hbmk/hbmk2.prg @@ -218,7 +218,7 @@ FUNCTION Main( ... ) /* Autodetect architecture */ t_cARCH := Lower( GetEnv( "HB_ARCHITECTURE" ) ) - IF Empty( GetEnv( "HB_ARCHITECTURE" ) ) + IF Empty( t_cARCH ) #if defined( __PLATFORM__BSD ) t_cARCH := "bsd" #elif defined( __PLATFORM__DARWIN ) @@ -289,7 +289,7 @@ FUNCTION Main( ... ) /* Autodetect compiler */ t_cCOMP := Lower( GetEnv( "HB_COMPILER" ) ) - IF Empty( GetEnv( "HB_COMPILER" ) ) + IF Empty( t_cCOMP ) IF Len( aCOMPSUP ) == 1 t_cCOMP := aCOMPSUP[ 1 ] ELSEIF t_cARCH == "linux" @@ -338,7 +338,8 @@ FUNCTION Main( ... ) s_cHB_LIB_INSTALL := DirAdaptPathSep( GetEnv( "HB_LIB_INSTALL" ) ) s_cHB_INC_INSTALL := DirAdaptPathSep( GetEnv( "HB_INC_INSTALL" ) ) - IF Empty( GetEnv( "HB_INSTALL_PREFIX" ) ) + s_cHB_INSTALL_PREFIX := DirAdaptPathSep( GetEnv( "HB_INSTALL_PREFIX" ) ) + IF Empty( s_cHB_INSTALL_PREFIX ) DO CASE CASE hb_DirBase() == "/opt/harbour/" @@ -374,8 +375,6 @@ FUNCTION Main( ... ) PauseForKey() RETURN 3 ENDCASE - ELSE - s_cHB_INSTALL_PREFIX := DirAdaptPathSep( GetEnv( "HB_INSTALL_PREFIX" ) ) ENDIF IF Empty( s_cHB_INSTALL_PREFIX ) .AND. ; ( Empty( s_cHB_BIN_INSTALL ) .OR. Empty( s_cHB_LIB_INSTALL ) .OR. Empty( s_cHB_INC_INSTALL ) ) @@ -559,7 +558,7 @@ FUNCTION Main( ... ) ENDIF /* Merge user libs from command line and envvar. Command line has priority. */ - s_aLIBUSER := ArrayAJoin( { s_aLIBUSER, ListToArray( GetEnv( "HB_USER_LIBS" ) ) } ) + s_aLIBUSER := ArrayAJoin( { s_aLIBUSER, ListToArray( DirAdaptPathSep( GetEnv( "HB_USER_LIBS" ) ) ) } ) /* Strip extension from output name. */ s_cMAPNAME := FN_ExtSet( s_cPROGNAME, ".map" )