From 05634bebdceefebad383f4ad7fa950d92c2c3c3a Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 26 Mar 2013 16:31:37 +0100 Subject: [PATCH] 2013-03-26 16:32 UTC+0100 Viktor Szakats (harbour syenar.net) * utils/hbmk2/hbmk2.prg ! fixed to use 'hbshell' prefix in output messages when running in hbrun mode ! do not display double warning about missing .hbc files % use _hbmk_OutErr() in hbshell code * config/global.mk * README.md + enabled HB_BUILD_CONTRIB_DYN on all platforms (regressions possible) (untested on platforms that do not support dynamic libs, like MS-DOS) * README.md % deleted redundant link + added no-BOM requirement --- ChangeLog.txt | 17 ++++++++++++++++ README.md | 11 ++++------- config/global.mk | 6 ++---- utils/hbmk2/hbmk2.prg | 45 ++++++++++++++++++++++++------------------- 4 files changed, 48 insertions(+), 31 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index a490439c8a..c8dbb27e3b 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -10,6 +10,23 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2013-03-26 16:32 UTC+0100 Viktor Szakats (harbour syenar.net) + * utils/hbmk2/hbmk2.prg + ! fixed to use 'hbshell' prefix in output messages + when running in hbrun mode + ! do not display double warning about missing .hbc files + % use _hbmk_OutErr() in hbshell code + + * config/global.mk + * README.md + + enabled HB_BUILD_CONTRIB_DYN on all platforms + (regressions possible) (untested on platforms that + do not support dynamic libs, like MS-DOS) + + * README.md + % deleted redundant link + + added no-BOM requirement + 2013-03-26 11:07 UTC+0100 Viktor Szakats (harbour syenar.net) * contrib/hbssl/hbssl.hbx ! fixed casing inconsistencies diff --git a/README.md b/README.md index cf0e3de729..c35b468fa3 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,6 @@ a compiler and runtime libraries with multiple UI and database backends, its own make system and a large collection of libraries and interfaces to many popular APIs. - - # Table of Content 1. [Guarantees and Liability](#guarantees-and-liability) @@ -66,7 +64,7 @@ There are several ways to help making Harbour better: $ /bin/hbformat - Text editor setting for Harbour files - - Encoding is either 7-bit ASCII or UTF-8. + - Encoding is either 7-bit ASCII or UTF-8 (no BOM) - Always use spaces, never tabs - Remove trailing spaces from lines - Always keep one (not zero or multiple) newline at the end of file @@ -309,7 +307,7 @@ You should see 'Hello world!' on screen. ## on Minix hosts -Install GNU make from the Minix pkgsrc repository; for details see [here](http://wiki.minix3.org/en/UsersGuide/InstallingBinaryPackages) +Install GNU make from the Minix pkgsrc repository; for details see [here](http://wiki.minix3.org/en/UsersGuide/InstallingBinaryPackages). Optionally, GCC may also be installed if you wish to use that instead of Clang, the Minix system compiler. @@ -693,10 +691,9 @@ sensitive. Create Harbour dynamic libraries. Default: `yes` - - `HB_BUILD_CONTRIB_DYN=yes` + - `HB_BUILD_CONTRIB_DYN=no` - Create contrib dynamic libraries. Default: `no`, - except Windows platform, where it's `yes`. + Create contrib dynamic libraries. Default: `yes` - `HB_BUILD_SHARED=yes` diff --git a/config/global.mk b/config/global.mk index 1e1dc3b084..10fa698b7d 100644 --- a/config/global.mk +++ b/config/global.mk @@ -387,10 +387,8 @@ ifeq ($(HB_HOST_PLAT),) endif endif -ifneq ($(filter $(HB_HOST_PLAT),win),) - ifeq ($(HB_BUILD_CONTRIB_DYN),) - export HB_BUILD_CONTRIB_DYN := yes - endif +ifeq ($(HB_BUILD_CONTRIB_DYN),) + export HB_BUILD_CONTRIB_DYN := yes endif ifneq ($(filter $(HB_HOST_PLAT),win wce dos os2),) diff --git a/utils/hbmk2/hbmk2.prg b/utils/hbmk2/hbmk2.prg index b6e10066ce..5972663903 100644 --- a/utils/hbmk2/hbmk2.prg +++ b/utils/hbmk2/hbmk2.prg @@ -13723,7 +13723,6 @@ STATIC PROCEDURE __hbshell( cFile, ... ) LOCAL aExtension := {} LOCAL hbmk - LOCAL cHBC LOCAL cExt LOCAL tmp, tmp1 LOCAL aOPTPRG @@ -13812,7 +13811,7 @@ STATIC PROCEDURE __hbshell( cFile, ... ) hbmk_init_stage2( hbmk ) IF ! hbmk_harbour_dirlayout_detect( hbmk, .T. ) IF __hbshell_CanLoadDyn() - OutErr( StrTran( I_( e"hbshell: Warning: Failed to detect Harbour.\nRun this tool from its original location inside the Harbour installation." ), e"\n", hb_eol() ) + _OUT_EOL ) + _hbmk_OutErr( I_( e"Warning: Failed to detect Harbour.\nRun this tool from its original location inside the Harbour installation." ) ) ENDIF ENDIF hbmk[ _HBMK_cCOMP ] := hb_Version( HB_VERSION_BUILD_COMP ) @@ -13897,9 +13896,7 @@ STATIC PROCEDURE __hbshell( cFile, ... ) ENDIF FOR EACH tmp IN aExtension - IF Empty( cVersion := HBC_Find( hbmk, cHBC := hb_FNameExtSet( tmp, ".hbc" ) ) ) - OutErr( hb_StrFormat( I_( "hbshell: Warning: Cannot find %1$s" ), cHBC ) + _OUT_EOL ) - ELSE + IF ! Empty( cVersion := HBC_Find( hbmk, hb_FNameExtSet( tmp, ".hbc" ) ) ) AAddNew( aOPTPRG, "-D" + hb_StrFormat( _HBMK_HAS_TPL_HBC, StrToDefine( tmp ) ) + "=" + cVersion ) ENDIF NEXT @@ -13934,7 +13931,7 @@ STATIC PROCEDURE __hbshell( cFile, ... ) EXIT ENDSWITCH ELSE - OutErr( hb_StrFormat( I_( "hbshell: Cannot find script '%1$s'" ), cFileOri ) + _OUT_EOL ) + _hbmk_OutErr( hbmk, hb_StrFormat( I_( "Cannot find script '%1$s'" ), cFileOri ) ) ENDIF RETURN @@ -14092,7 +14089,7 @@ FUNCTION hbshell_ext_load( cName ) hbsh[ _HBSH_hOPTPRG ][ cName ] := {} IF Empty( cVersion := HBC_Find( hbsh[ _HBSH_hbmk ], cHBC := hb_FNameExtSet( cName, ".hbc" ) ) ) - OutErr( hb_StrFormat( I_( "hbshell: Warning: Cannot find %1$s" ), cHBC ) + _OUT_EOL ) + _hbmk_OutErr( hbsh[ _HBSH_hbmk ], hb_StrFormat( I_( "Warning: Cannot find %1$s" ), cHBC ) ) ELSE AEval( hbsh[ _HBSH_hbmk ][ _HBMK_aINCPATH ], {| tmp | AAdd( hbsh[ _HBSH_hINCPATH ][ cName ], tmp ) } ) AEval( hbsh[ _HBSH_hbmk ][ _HBMK_aCH ], {| tmp | AAdd( hbsh[ _HBSH_hCH ][ cName ], tmp ) } ) @@ -14107,11 +14104,11 @@ FUNCTION hbshell_ext_load( cName ) cFileName := FindInPath( tmp := hb_libName( cName + hb_libPostfix() ), ; iif( hb_Version( HB_VERSION_UNIX_COMPAT ), GetEnv( "LD_LIBRARY_PATH" ), GetEnv( "PATH" ) ) ) IF Empty( cFileName ) - OutErr( hb_StrFormat( I_( "hbshell: '%1$s' (%2$s) not found." ), cName, tmp ) + _OUT_EOL ) + _hbmk_OutErr( hbsh[ _HBSH_hbmk ], hb_StrFormat( I_( "'%1$s' (%2$s) not found." ), cName, tmp ) ) ELSE hLib := hb_libLoad( cFileName ) IF Empty( hLib ) - OutErr( hb_StrFormat( I_( "hbshell: Error loading '%1$s' (%2$s)." ), cName, cFileName ) + _OUT_EOL ) + _hbmk_OutErr( hbsh[ _HBSH_hbmk ], hb_StrFormat( I_( "Error loading '%1$s' (%2$s)." ), cName, cFileName ) ) ELSE hbsh[ _HBSH_hLibExt ][ cName ] := hLib RETURN .T. @@ -14121,7 +14118,7 @@ FUNCTION hbshell_ext_load( cName ) ENDIF ENDIF ELSE - OutErr( hb_StrFormat( I_( "hbshell: Cannot load '%1$s'. Requires -shared %2$s build." ), cName, hb_FNameName( hbshell_ProgName() ) ) + _OUT_EOL ) + _hbmk_OutErr( hbsh[ _HBSH_hbmk ], hb_StrFormat( I_( "Cannot load '%1$s'. Requires -shared %2$s build." ), cName, hb_FNameName( hbshell_ProgName() ) ) ) ENDIF ENDIF @@ -14269,6 +14266,8 @@ STATIC FUNCTION __hbshell_plugins() STATIC FUNCTION __hbshell_plugins_load( hPlugins, aParams ) + LOCAL hbsh := hbsh() + LOCAL hConIO := { ; "displine" => {| c | __hbshell_ToConsole( c ) }, ; "gethidden" => {|| __hbshell_GetHidden() } } @@ -14297,7 +14296,7 @@ STATIC FUNCTION __hbshell_plugins_load( hPlugins, aParams ) ENDIF RECOVER USING oError plugin[ _PLUGIN_hHRB ] := NIL - OutErr( StrTran( hb_StrFormat( I_( e"hbshell: Error: Loading shell plugin: %1$s\n'%2$s'" ), cFile:__enumKey(), hbmk_ErrorMessage( oError ) ), e"\n", hb_eol() ) + _OUT_EOL ) + _hbmk_OutErr( hbsh[ _HBSH_hbmk ], hb_StrFormat( I_( e"Error: Loading shell plugin: %1$s\n'%2$s'" ), cFile:__enumKey(), hbmk_ErrorMessage( oError ) ) ) END /* SEQUENCE */ ENDIF @@ -14409,7 +14408,7 @@ STATIC PROCEDURE __hbshell_prompt( aParams, aCommand ) hbshell_gtSelect() IF ! hb_gtInfo( HB_GTI_ISSCREENPOS ) - OutErr( hb_StrFormat( I_( "hbshell: Error: Interactive session not possible with %1$s terminal driver" ), hb_gtVersion() ) + _OUT_EOL ) + _hbmk_OutErr( hbsh[ _HBSH_hbmk ], hb_StrFormat( I_( "Error: Interactive session not possible with %1$s terminal driver" ), hb_gtVersion() ) ) RETURN ENDIF @@ -16667,18 +16666,21 @@ STATIC PROCEDURE _hbmk_OutStd( hbmk, cText ) LOCAL nLines LOCAL nWidth LOCAL cPrefix + LOCAL cSelf LOCAL tmp IF hbmk[ _HBMK_lDumpInfo ] RETURN ENDIF + cSelf := iif( hbmk[ _HBMK_lShellMode ], "hbshell", _SELF_NAME_ ) + IF hbmk[ _HBMK_lShowLevel ] - nWidth := Len( _SELF_NAME_ ) + 5 - cPrefix := hb_StrFormat( _SELF_NAME_ + " #%1$d:", hbmk[ _HBMK_nLevel ] ) + nWidth := Len( cSelf ) + 5 + cPrefix := hb_StrFormat( cSelf + " #%1$d:", hbmk[ _HBMK_nLevel ] ) ELSE - nWidth := Len( _SELF_NAME_ ) + 2 - cPrefix := _SELF_NAME_ + ":" + nWidth := Len( cSelf ) + 2 + cPrefix := cSelf + ":" ENDIF cText := StrTran( cText, e"\n", hb_eol() ) @@ -16697,18 +16699,21 @@ STATIC PROCEDURE _hbmk_OutErr( hbmk, cText ) LOCAL nLines LOCAL nWidth LOCAL cPrefix + LOCAL cSelf LOCAL tmp IF hbmk[ _HBMK_lDumpInfo ] RETURN ENDIF + cSelf := iif( hbmk[ _HBMK_lShellMode ], "hbshell", _SELF_NAME_ ) + IF hbmk[ _HBMK_lShowLevel ] - nWidth := Len( _SELF_NAME_ ) + 5 - cPrefix := hb_StrFormat( _SELF_NAME_ + " #%1$d:", hbmk[ _HBMK_nLevel ] ) + nWidth := Len( cSelf ) + 5 + cPrefix := hb_StrFormat( cSelf + " #%1$d:", hbmk[ _HBMK_nLevel ] ) ELSE - nWidth := Len( _SELF_NAME_ ) + 2 - cPrefix := _SELF_NAME_ + ":" + nWidth := Len( cSelf ) + 2 + cPrefix := cSelf + ":" ENDIF cText := StrTran( cText, e"\n", hb_eol() )