From e44c660cb51d423d58741e13c93dc9edc836b680 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Thu, 13 Aug 2009 19:45:03 +0000 Subject: [PATCH] 2009-08-13 21:44 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * config/global.cf * Minor cosmetic. + Exporting OBJ_DIR as HB_OBJ_DIR. ! Fixed detecting 'clean install' on HB_BUILD_PKG=yes. * bin/hb-mkdyn.bat % Using HB_OBJ_DIR instead of replicating logic. * INSTALL * bin/postinst.sh * make_gnu.sh * utils/hbmk2/hbmk2.prg - config/linux/sunpro64.cf - config/sunos/sunpro64.cf + Patch by Tamas Tevesz. Deleted sunpro64 as a distinct compiler target. * utils/hbmk2/hbmk2.prg ! Fixed to not delete source file when using unimplemented arch/compiler combinations. (sunpro currently) Reported by Tamas Tevesz. * config/bsd/global.cf * config/wce/global.cf * config/hpux/global.cf * config/darwin/global.cf * config/dos/global.cf * config/win/global.cf * config/linux/global.cf * config/os2/global.cf * config/sunos/global.cf - Deleted DYN_EXT, DYN_PRE. Wasn't needed, can be added once it will be. --- harbour/ChangeLog | 35 ++++++++++++++++++++++++++++++++ harbour/INSTALL | 9 ++++---- harbour/bin/hb-mkdyn.bat | 7 +++---- harbour/bin/postinst.sh | 6 ++---- harbour/config/bsd/global.cf | 2 -- harbour/config/darwin/global.cf | 2 -- harbour/config/dos/global.cf | 2 -- harbour/config/global.cf | 16 ++++++++++----- harbour/config/hpux/global.cf | 2 -- harbour/config/linux/global.cf | 2 -- harbour/config/linux/sunpro64.cf | 7 ------- harbour/config/os2/global.cf | 2 -- harbour/config/sunos/global.cf | 2 -- harbour/config/sunos/sunpro64.cf | 7 ------- harbour/config/wce/global.cf | 2 -- harbour/config/win/global.cf | 2 -- harbour/make_gnu.sh | 3 +-- harbour/utils/hbmk2/hbmk2.prg | 22 +++++++++++++------- 18 files changed, 71 insertions(+), 59 deletions(-) delete mode 100644 harbour/config/linux/sunpro64.cf delete mode 100644 harbour/config/sunos/sunpro64.cf diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 69e10f0e9c..8274b2a832 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,41 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-08-13 21:44 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * config/global.cf + * Minor cosmetic. + + Exporting OBJ_DIR as HB_OBJ_DIR. + ! Fixed detecting 'clean install' on HB_BUILD_PKG=yes. + + * bin/hb-mkdyn.bat + % Using HB_OBJ_DIR instead of replicating logic. + + * INSTALL + * bin/postinst.sh + * make_gnu.sh + * utils/hbmk2/hbmk2.prg + - config/linux/sunpro64.cf + - config/sunos/sunpro64.cf + + Patch by Tamas Tevesz. + Deleted sunpro64 as a distinct compiler target. + + * utils/hbmk2/hbmk2.prg + ! Fixed to not delete source file when using unimplemented + arch/compiler combinations. (sunpro currently) + Reported by Tamas Tevesz. + + * config/bsd/global.cf + * config/wce/global.cf + * config/hpux/global.cf + * config/darwin/global.cf + * config/dos/global.cf + * config/win/global.cf + * config/linux/global.cf + * config/os2/global.cf + * config/sunos/global.cf + - Deleted DYN_EXT, DYN_PRE. Wasn't needed, can be added once + it will be. + 2009-08-13 19:26 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * INSTALL + Added HB_INSTALL_PREFIX description (this is now optional). diff --git a/harbour/INSTALL b/harbour/INSTALL index d2597a6aa7..c5267b8e58 100644 --- a/harbour/INSTALL +++ b/harbour/INSTALL @@ -27,7 +27,7 @@ HOW TO BUILD AND INSTALL HARBOUR FROM SOURCE Linux/Darwin/BSD/HP-UX/Solaris ------------------------------ - $ export HB_COMPILER=<[gcc]|watcom|icc|sunpro|sunpro64> + $ export HB_COMPILER=<[gcc]|watcom|icc|sunpro> $ export HB_INSTALL_PREFIX= $ ./make_gnu.sh $ sudo ./make_gnu.sh install @@ -37,8 +37,8 @@ HOW TO BUILD AND INSTALL HARBOUR FROM SOURCE $ ./hello You should see 'Hello world!' on screen. - NOTE for sunpro/sunpro64 on Solaris: - ------------------------------------ + NOTE for sunpro on Solaris: + --------------------------- If you have any GNU binutils stuff installed, do make sure /usr/ccs/bin (the location of the native Sun C compilation system tools) come *before* the GNU binutils components in @@ -201,8 +201,7 @@ SUPPORTED C COMPILERS UNDER DIFFERENT PLATFORMS Solaris ------- gcc - GNU C - sunpro - Sun Studio C/C++ (32-bit target) - sunpro64 - Sun Studio C/C++ (64-bit target) + sunpro - Sun Studio C/C++ Windows (recommended) ------- diff --git a/harbour/bin/hb-mkdyn.bat b/harbour/bin/hb-mkdyn.bat index 02c2830890..9fa25fd6d9 100644 --- a/harbour/bin/hb-mkdyn.bat +++ b/harbour/bin/hb-mkdyn.bat @@ -9,14 +9,14 @@ rem Copyright 2009 Viktor Szakats (harbour.01 syenar.hu) rem See COPYING for licensing terms. rem --------------------------------------------------------------- -rem NOTE: .prg files have to be compiled with -n1 -rem NOTE: .c files have to be compiled with -DHB_DYNLIB - if not "%OS%" == "Windows_NT" echo ! hb-mkdyn.bat Harbour build script requires Windows NT or upper. if not "%OS%" == "Windows_NT" goto :EOF setlocal +rem NOTE: .prg files have to be compiled with -n1 +rem NOTE: .c files have to be compiled with -DHB_DYNLIB + if "%HB_ARCHITECTURE%" == "" ( echo ! HB_ARCHITECTURE needs to be set. && goto END ) if "%HB_COMPILER%" == "" ( echo ! HB_COMPILER needs to be set. && goto END ) if "%HB_BIN_INSTALL%" == "" ( echo ! HB_BIN_INSTALL needs to be set. && goto END ) @@ -29,7 +29,6 @@ set HB_DLL_LIBS_ST=source\vm set HB_DLL_LIBS_MT=source\vm\vmmt set HB_DLL_LIBS_WATCOM=source\vm\maindllh set HB_OBJ_EXT=.obj -set HB_OBJ_DIR=obj\%HB_ARCHITECTURE%\%HB_COMPILER%%HB_BUILD_NAME% set HB_OBJ_PREF= set HB_OBJ_POST= diff --git a/harbour/bin/postinst.sh b/harbour/bin/postinst.sh index d63cc23b7d..d44f6727ef 100755 --- a/harbour/bin/postinst.sh +++ b/harbour/bin/postinst.sh @@ -47,8 +47,7 @@ if [ "$HB_COMPILER" = "gcc" ] || \ [ "$HB_COMPILER" = "cygwin" ] || \ [ "$HB_COMPILER" = "djgpp" ] || \ [ "$HB_COMPILER" = "icc" ] || \ - [ "$HB_COMPILER" = "sunpro" ] || \ - [ "$HB_COMPILER" = "sunpro64" ] + [ "$HB_COMPILER" = "sunpro" ] then if [ -n "${HB_TOOLS_PREF}" ]; then hb_mkdyn="${HB_BIN_INSTALL}/${HB_TOOLS_PREF}-mkdyn" @@ -62,8 +61,7 @@ then rm -f "${hb_mkdyn}" sed -e "s/gcc/icc/g" "${hb_root}/bin/hb-mkdyn.sh" > "${hb_mkdyn}" && \ chmod 755 "${hb_mkdyn}" - elif [ "$HB_COMPILER" = "sunpro" ] || \ - [ "$HB_COMPILER" = "sunpro64" ]; then + elif [ "$HB_COMPILER" = "sunpro" ]; then hb_mkdyn="${HB_BIN_INSTALL}/hb-mkdyn" rm -f "${hb_mkdyn}" if [ "$HB_ARCHITECTURE" = "sunos" ] && \ diff --git a/harbour/config/bsd/global.cf b/harbour/config/bsd/global.cf index 4ab1b25657..52c2891488 100644 --- a/harbour/config/bsd/global.cf +++ b/harbour/config/bsd/global.cf @@ -5,8 +5,6 @@ all : first BIN_EXT := -DYN_PRE := lib -DYN_EXT := .so HB_GT_LIBS += gttrm diff --git a/harbour/config/darwin/global.cf b/harbour/config/darwin/global.cf index 092d9d29bb..89c2250574 100644 --- a/harbour/config/darwin/global.cf +++ b/harbour/config/darwin/global.cf @@ -5,7 +5,5 @@ all : first BIN_EXT := -DYN_PRE := lib -DYN_EXT := .dylib HB_GT_LIBS += gttrm diff --git a/harbour/config/dos/global.cf b/harbour/config/dos/global.cf index fdb618be8d..b64f35cc62 100644 --- a/harbour/config/dos/global.cf +++ b/harbour/config/dos/global.cf @@ -5,7 +5,5 @@ all : first BIN_EXT := .exe -DYN_PRE := -DYN_EXT := HB_GT_LIBS += gtdos diff --git a/harbour/config/global.cf b/harbour/config/global.cf index da2d12c979..43676ed661 100644 --- a/harbour/config/global.cf +++ b/harbour/config/global.cf @@ -170,13 +170,18 @@ ifneq ($(HB_BUILD_NAME),) endif endif +ifeq ($(HB_CONFIG_SHOWN),) + # Store the original value + export HB_MAKECMDGOALS := $(MAKECMDGOALS) +endif + ifeq ($(HB_BUILD_PKG),yes) # 'clean' and 'install' are required when building a release package - ifeq ($(findstring clean,$(MAKECMDGOALS)),) + ifeq ($(findstring clean,$(HB_MAKECMDGOALS)),) export HB_BUILD_PKG := no else - ifeq ($(findstring install,$(MAKECMDGOALS)),) + ifeq ($(findstring install,$(HB_MAKECMDGOALS)),) export HB_BUILD_PKG := no endif endif @@ -203,7 +208,7 @@ ifeq ($(HB_CONFIG_SHOWN),) # Macros: # -DHB_PCRE_REGEX, -DHB_POSIX_REGEX, -DHB_EXT_ZLIB, -DHB_HAS_GPM - $(info ! MAKE: $(MAKE) $(MAKE_VERSION) $(MAKECMDGOALS)) + $(info ! MAKE: $(MAKE) $(MAKE_VERSION) $(HB_MAKECMDGOALS)) ifneq ($(HB_USER_PRGFLAGS),) $(info ! HB_USER_PRGFLAGS: $(HB_USER_PRGFLAGS)) endif @@ -364,8 +369,7 @@ endif ifeq ($(HB_CONFIG_SHOWN),) ifneq ($(MAKE_381),) - $(info ! HB_HOST_ARCH: $(HB_HOST_ARCH)) - $(info ! HB_SHELL: $(HB_SHELL)) + $(info ! HB_HOST_ARCH: $(HB_HOST_ARCH) HB_SHELL: $(HB_SHELL)) endif endif @@ -835,6 +839,8 @@ endif export HB_INSTALL_PREFIX +export HB_OBJ_DIR := $(subst /,$(DIRSEP),$(OBJ_DIR)) + ifeq ($(HB_BIN_COMPILE),) HB_HOST_BIN_DIR := $(BIN_DIR) else diff --git a/harbour/config/hpux/global.cf b/harbour/config/hpux/global.cf index 555643b1f9..89c2250574 100644 --- a/harbour/config/hpux/global.cf +++ b/harbour/config/hpux/global.cf @@ -5,7 +5,5 @@ all : first BIN_EXT := -DYN_PRE := lib -DYN_EXT := .sl HB_GT_LIBS += gttrm diff --git a/harbour/config/linux/global.cf b/harbour/config/linux/global.cf index dd0d1fdb57..89c2250574 100644 --- a/harbour/config/linux/global.cf +++ b/harbour/config/linux/global.cf @@ -5,7 +5,5 @@ all : first BIN_EXT := -DYN_PRE := lib -DYN_EXT := .so HB_GT_LIBS += gttrm diff --git a/harbour/config/linux/sunpro64.cf b/harbour/config/linux/sunpro64.cf deleted file mode 100644 index bc1f77b9bc..0000000000 --- a/harbour/config/linux/sunpro64.cf +++ /dev/null @@ -1,7 +0,0 @@ -# -# $Id$ -# - -HB_ISAOPT := -m64 - -include $(TOP)$(ROOT)config/linux/sunpro.cf diff --git a/harbour/config/os2/global.cf b/harbour/config/os2/global.cf index 459f3321bc..e9f824b57a 100644 --- a/harbour/config/os2/global.cf +++ b/harbour/config/os2/global.cf @@ -5,7 +5,5 @@ all : first BIN_EXT := .exe -DYN_PRE := -DYN_EXT := .dll HB_GT_LIBS += gtos2 diff --git a/harbour/config/sunos/global.cf b/harbour/config/sunos/global.cf index dd0d1fdb57..89c2250574 100644 --- a/harbour/config/sunos/global.cf +++ b/harbour/config/sunos/global.cf @@ -5,7 +5,5 @@ all : first BIN_EXT := -DYN_PRE := lib -DYN_EXT := .so HB_GT_LIBS += gttrm diff --git a/harbour/config/sunos/sunpro64.cf b/harbour/config/sunos/sunpro64.cf deleted file mode 100644 index f49a152d71..0000000000 --- a/harbour/config/sunos/sunpro64.cf +++ /dev/null @@ -1,7 +0,0 @@ -# -# $Id$ -# - -HB_ISAOPT := -m64 - -include $(TOP)$(ROOT)config/sunos/sunpro.cf diff --git a/harbour/config/wce/global.cf b/harbour/config/wce/global.cf index f33631c694..4102c4191b 100644 --- a/harbour/config/wce/global.cf +++ b/harbour/config/wce/global.cf @@ -5,8 +5,6 @@ all : first BIN_EXT := .exe -DYN_PRE := -DYN_EXT := .dll HB_GT_LIBS += gtwvt gtgui diff --git a/harbour/config/win/global.cf b/harbour/config/win/global.cf index 4cd3c8f1a2..950b0ec996 100644 --- a/harbour/config/win/global.cf +++ b/harbour/config/win/global.cf @@ -5,7 +5,5 @@ all : first BIN_EXT := .exe -DYN_PRE := -DYN_EXT := .dll HB_GT_LIBS += gtwvt gtgui gtwin diff --git a/harbour/make_gnu.sh b/harbour/make_gnu.sh index 9bf580e1fb..875109f961 100755 --- a/harbour/make_gnu.sh +++ b/harbour/make_gnu.sh @@ -62,8 +62,7 @@ if [ -z "$HB_GPM_MOUSE" ]; then fi if [ "$HB_ARCHITECTURE" = "linux" ] && \ - [ "$HB_COMPILER" != "sunpro" ] && \ - [ "$HB_COMPILER" != "sunpro64" ] + [ "$HB_COMPILER" != "sunpro" ] then if [ "${HB_USER_CFLAGS}" = "${HB_USER_CFLAGS//-fPIC/}" ] then diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index 3976122d91..caa787f314 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -854,9 +854,9 @@ FUNCTION hbmk( aArgs, /* @ */ lPause, /* @ */ lUTF8 ) CASE hbmk[ _HBMK_cARCH ] $ "bsd|hpux|sunos|linux" .OR. hbmk[ _HBMK_cARCH ] == "darwin" /* Separated to avoid match with 'win' */ DO CASE CASE hbmk[ _HBMK_cARCH ] == "linux" - aCOMPSUP := { "gcc", "watcom", "icc", "sunpro", "sunpro64" } + aCOMPSUP := { "gcc", "watcom", "icc", "sunpro" } CASE hbmk[ _HBMK_cARCH ] == "sunos" - aCOMPSUP := { "gcc", "sunpro", "sunpro64" } + aCOMPSUP := { "gcc", "sunpro" } OTHERWISE aCOMPSUP := { "gcc" } ENDCASE @@ -2782,8 +2782,8 @@ FUNCTION hbmk( aArgs, /* @ */ lPause, /* @ */ lUTF8 ) l_aLIBSHAREDPOST := { "hbmainstd", "hbmainwin" } - CASE ( hbmk[ _HBMK_cARCH ] == "sunos" .AND. hbmk[ _HBMK_cCOMP ] $ "sunpro|sunpro64" ) .OR. ; - ( hbmk[ _HBMK_cARCH ] == "linux" .AND. hbmk[ _HBMK_cCOMP ] $ "sunpro|sunpro64" ) + CASE ( hbmk[ _HBMK_cARCH ] == "sunos" .AND. hbmk[ _HBMK_cCOMP ] == "sunpro" ) .OR. ; + ( hbmk[ _HBMK_cARCH ] == "linux" .AND. hbmk[ _HBMK_cCOMP ] == "sunpro" ) /* TODO */ @@ -3263,7 +3263,15 @@ FUNCTION hbmk( aArgs, /* @ */ lPause, /* @ */ lUTF8 ) ListCookLib( hbmk, l_aLIB, l_aLIBA, l_aLIBSHARED, NIL ) ENDIF /* Dress obj names. */ - l_aOBJ := ListDirExt( ArrayJoin( hbmk[ _HBMK_aPRG ], hbmk[ _HBMK_aC ] ), cWorkDir, cObjExt ) + IF cObjExt == NIL + /* NOTE: May only happen if the arch/comp combination isn't supported. + Don't let the obj filelist be the exact same as the source list, + it would cause unwanted deletion of source at cleanup stage. + [vszakats] */ + l_aOBJ := {} + ELSE + l_aOBJ := ListDirExt( ArrayJoin( hbmk[ _HBMK_aPRG ], hbmk[ _HBMK_aC ] ), cWorkDir, cObjExt ) + ENDIF hbmk[ _HBMK_aOBJUSER ] := ListCook( hbmk[ _HBMK_aOBJUSER ], cObjExt ) IF hbmk[ _HBMK_lINC ] .AND. ! hbmk[ _HBMK_lREBUILD ] @@ -6584,7 +6592,7 @@ STATIC PROCEDURE ShowHelp( hbmk, lLong ) LOCAL aText_Supp := {; "",; I_( "Supported values for each supported value:" ),; - " - linux : gcc, watcom, icc, sunpro, sunpro64",; + " - linux : gcc, watcom, icc, sunpro",; " - darwin : gcc",; " - win : mingw, msvc, bcc, watcom, icc, pocc, cygwin, xcc,",; " - mingw64, msvc64, msvcia64, iccia64, pocc64",; @@ -6593,7 +6601,7 @@ STATIC PROCEDURE ShowHelp( hbmk, lLong ) " - dos : djgpp, watcom",; " - bsd : gcc",; " - hpux : gcc",; - " - sunos : gcc, sunpro, sunpro64" } + " - sunos : gcc, sunpro" } LOCAL aOpt_Basic := {; { "-o" , I_( "output file name" ) },;