From a772083c9fd4fea75f8a7e0e22fc4c71efe57038 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Thu, 10 Jan 2013 23:44:43 +0000 Subject: [PATCH] 2013-01-11 00:43 UTC+0100 Viktor Szakats (harbour syenar.net) * utils/hbmk2/hbmk2.prg + show warning if user -I/-L parameters explicitly specify the core header/lib dirs of Harbour. This is wrong/unnecessary depending on context, and for sure never does any good. --- harbour/ChangeLog.txt | 7 +++++++ harbour/utils/hbmk2/hbmk2.prg | 8 ++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/harbour/ChangeLog.txt b/harbour/ChangeLog.txt index 0da6d29319..9efd508df1 100644 --- a/harbour/ChangeLog.txt +++ b/harbour/ChangeLog.txt @@ -10,6 +10,13 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2013-01-11 00:43 UTC+0100 Viktor Szakats (harbour syenar.net) + * utils/hbmk2/hbmk2.prg + + show warning if user -I/-L parameters explicitly + specify the core header/lib dirs of Harbour. This + is wrong/unnecessary depending on context, and for + sure never does any good. + 2013-01-10 23:25 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * harbour/include/hbapicls.h * harbour/src/vm/classes.c diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index b69416021b..01f719330f 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -2816,7 +2816,9 @@ FUNCTION hbmk( aArgs, nArgTarget, /* @ */ lPause, nLevel ) cParam := MacroProc( hbmk, SubStr( cParam, 3 ), aParam[ _PAR_cFileName ] ) IF ! Empty( cParam ) FOR EACH tmp IN hb_ATokens( cParam, ";" ) /* intentionally not using hb_osPathListSeparator() to keep value portable */ - IF ! Empty( tmp ) + IF hb_FileMatch( tmp, hbmk[ _HBMK_cHB_INSTALL_LIB ] ) + _hbmk_OutStd( hbmk, hb_StrFormat( I_( "Warning: Ignoring explicitly specified core library directory: %1$s" ), tmp ) ) + ELSEIF ! Empty( tmp ) tmp := hb_DirSepDel( PathMakeAbsolute( PathSepToSelf( tmp ), aParam[ _PAR_cFileName ] ) ) IF ( _MACRO_LATE_PREFIX + _MACRO_OPEN ) $ tmp .OR. hb_DirExists( tmp ) AAdd( hbmk[ _HBMK_aLIBPATH ], tmp ) @@ -2884,7 +2886,9 @@ FUNCTION hbmk( aArgs, nArgTarget, /* @ */ lPause, nLevel ) cParam := MacroProc( hbmk, SubStr( cParam, 3 ), aParam[ _PAR_cFileName ] ) IF ! Empty( cParam ) FOR EACH tmp IN hb_ATokens( cParam, ";" ) /* intentionally not using hb_osPathListSeparator() to keep value portable */ - IF ! Empty( tmp ) + IF hb_FileMatch( tmp, hbmk[ _HBMK_cHB_INSTALL_INC ] ) + _hbmk_OutStd( hbmk, hb_StrFormat( I_( "Warning: Ignoring explicitly specified core header directory: %1$s" ), tmp ) ) + ELSEIF ! Empty( tmp ) AAddNew( hbmk[ _HBMK_aINCPATH ], hb_DirSepDel( hb_PathNormalize( PathMakeAbsolute( PathSepToSelf( tmp ), aParam[ _PAR_cFileName ] ) ) ) ) ENDIF NEXT