From 7163bc7d1e1090d4919dec952dbe2b44e767e93f Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 28 Feb 2012 15:36:29 +0000 Subject: [PATCH] 2012-02-28 16:35 UTC+0100 Viktor Szakats (harbour syenar.net) * contrib/hbmysql/utils/hbmk.hbm * contrib/hbnetio/utils/hbnetio/hbnetio.hbp * contrib/hbnetio/utils/hbnetioq/hbnetioq.hbp * contrib/hbformat/utils/hbformat.hbp + removed relative path from .hbc references * utils/hbmk2/hbmk2.prg + show warning when referenced .hbc file could not be found --- harbour/ChangeLog | 12 ++- harbour/contrib/hbformat/utils/hbformat.hbp | 2 +- harbour/contrib/hbmysql/utils/hbmk.hbm | 2 +- .../contrib/hbnetio/utils/hbnetio/hbnetio.hbp | 2 +- .../hbnetio/utils/hbnetioq/hbnetioq.hbp | 4 +- harbour/utils/hbmk2/hbmk2.prg | 93 +++++++++++++------ 6 files changed, 81 insertions(+), 34 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 6f00b73aa1..c0d70bc62f 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,16 @@ The license applies to all entries newer than 2009-04-28. */ +2012-02-28 16:35 UTC+0100 Viktor Szakats (harbour syenar.net) + * contrib/hbmysql/utils/hbmk.hbm + * contrib/hbnetio/utils/hbnetio/hbnetio.hbp + * contrib/hbnetio/utils/hbnetioq/hbnetioq.hbp + * contrib/hbformat/utils/hbformat.hbp + + removed relative path from .hbc references + + * utils/hbmk2/hbmk2.prg + + show warning when referenced .hbc file could not be found + 2012-02-28 16:06 UTC+0100 Viktor Szakats (harbour syenar.net) * config/global.mk + detect rudix @@ -26,7 +36,7 @@ * examples/ps32/ps32.hbc * examples/rddado/rddado.hbc - + removed relative paths from .hbc references in examples area + + removed relative path from .hbc references in examples area 2012-02-28 15:46 UTC+0100 Viktor Szakats (harbour syenar.net) * examples/ps32/ps32.hbc diff --git a/harbour/contrib/hbformat/utils/hbformat.hbp b/harbour/contrib/hbformat/utils/hbformat.hbp index 93880435b4..31603cc2da 100644 --- a/harbour/contrib/hbformat/utils/hbformat.hbp +++ b/harbour/contrib/hbformat/utils/hbformat.hbp @@ -2,7 +2,7 @@ # $Id$ # -../hbformat.hbc +hbformat.hbc -w3 -es2 -l diff --git a/harbour/contrib/hbmysql/utils/hbmk.hbm b/harbour/contrib/hbmysql/utils/hbmk.hbm index 88006ad26e..6bd79dba2c 100644 --- a/harbour/contrib/hbmysql/utils/hbmk.hbm +++ b/harbour/contrib/hbmysql/utils/hbmk.hbm @@ -2,6 +2,6 @@ # $Id$ # -../hbmysql.hbc +hbmysql.hbc -w3 -es2 diff --git a/harbour/contrib/hbnetio/utils/hbnetio/hbnetio.hbp b/harbour/contrib/hbnetio/utils/hbnetio/hbnetio.hbp index 8cdd3416e4..09be86b46f 100644 --- a/harbour/contrib/hbnetio/utils/hbnetio/hbnetio.hbp +++ b/harbour/contrib/hbnetio/utils/hbnetio/hbnetio.hbp @@ -2,7 +2,7 @@ # $Id$ # -../../hbnetio.hbc +hbnetio.hbc -mt -w3 -es2 -l- diff --git a/harbour/contrib/hbnetio/utils/hbnetioq/hbnetioq.hbp b/harbour/contrib/hbnetio/utils/hbnetioq/hbnetioq.hbp index d0742f7ba4..1742928fc5 100644 --- a/harbour/contrib/hbnetio/utils/hbnetioq/hbnetioq.hbp +++ b/harbour/contrib/hbnetio/utils/hbnetioq/hbnetioq.hbp @@ -11,8 +11,8 @@ -icon={allwin}../../../../package/harb_win.ico -icon={os2}../../../package/harb_os2.ico -../../../hbxbp/hbxbp.hbc -../../../hbnetio/hbnetio.hbc +hbxbp.hbc +hbnetio.hbc netiosrq.prg netiosrq.qrc diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index 734fc2f3d8..9572560be8 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -902,6 +902,8 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel ) LOCAL aOBJLIST LOCAL cHarbourDyn + LOCAL lFound + LOCAL lSkipBuild := .F. LOCAL lStopAfterCComp := .F. LOCAL lAcceptCFlag := .F. @@ -2946,23 +2948,33 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel ) CASE hb_FNameExt( cParamL ) == ".hbc" cParam := PathMakeAbsolute( PathSepToSelf( MacroProc( hbmk, cParam, aParam[ _PAR_cFileName ] ) ), aParam[ _PAR_cFileName ] ) - IF ! hb_FileExists( cParam ) - FOR EACH tmp IN hbmk[ _HBMK_aLIBPATH ] - IF hb_FileExists( hb_DirSepAdd( PathSepToSelf( MacroProc( hbmk, tmp, cParam, _MACRO_LATE_PREFIX ) ) ) + hb_FNameNameExt( cParam ) ) - cParam := hb_DirSepAdd( PathSepToSelf( MacroProc( hbmk, tmp, cParam, _MACRO_LATE_PREFIX ) ) ) + hb_FNameNameExt( cParam ) - EXIT + IF ! Empty( cParam ) + lFound := .F. + IF hb_FileExists( cParam ) + lFound := .T. + ELSE + FOR EACH tmp IN hbmk[ _HBMK_aLIBPATH ] + IF hb_FileExists( hb_DirSepAdd( PathSepToSelf( MacroProc( hbmk, tmp, cParam, _MACRO_LATE_PREFIX ) ) ) + hb_FNameNameExt( cParam ) ) + cParam := hb_DirSepAdd( PathSepToSelf( MacroProc( hbmk, tmp, cParam, _MACRO_LATE_PREFIX ) ) ) + hb_FNameNameExt( cParam ) + lFound := .T. + EXIT + ENDIF + NEXT + ENDIF + + IF lFound + cParam := hb_PathNormalize( cParam ) + + IF hbmk[ _HBMK_lInfo ] + hbmk_OutStd( hbmk, hb_StrFormat( I_( "Processing: %1$s" ), cParam ) ) ENDIF - NEXT + + HBC_ProcessOne( hbmk, cParam, 1 ) + ELSE + hbmk_OutErr( hbmk, hb_StrFormat( I_( "Warning: Cannot find %1$s" ), cParam ) ) + ENDIF ENDIF - cParam := hb_PathNormalize( cParam ) - - IF hbmk[ _HBMK_lInfo ] - hbmk_OutStd( hbmk, hb_StrFormat( I_( "Processing: %1$s" ), cParam ) ) - ENDIF - - HBC_ProcessOne( hbmk, cParam, 1 ) - CASE hb_FNameExt( cParamL ) == ".hrb" cParam := PathMakeAbsolute( PathSepToSelf( MacroProc( hbmk, cParam, aParam[ _PAR_cFileName ] ) ), aParam[ _PAR_cFileName ] ) @@ -9138,6 +9150,7 @@ STATIC FUNCTION HBC_ProcessOne( hbmk, cFileName, nNestingLevel ) LOCAL cItem LOCAL cItemL LOCAL cName + LOCAL lFound LOCAL tmp #if defined( __PLATFORM__DOS ) @@ -9242,22 +9255,30 @@ STATIC FUNCTION HBC_ProcessOne( hbmk, cFileName, nNestingLevel ) IF hb_FNameExt( cItem ) == ".hbc" cItem := PathMakeAbsolute( PathSepToSelf( cItem ), hb_FNameDir( cFileName ) ) IF nNestingLevel < _HBMK_NEST_MAX - IF ! hb_FileExists( cItem ) + lFound := .F. + IF hb_FileExists( cItem ) + lFound := .T. + ELSE FOR EACH tmp IN hbmk[ _HBMK_aLIBPATH ] IF hb_FileExists( hb_DirSepAdd( PathSepToSelf( MacroProc( hbmk, tmp, cItem, _MACRO_LATE_PREFIX ) ) ) + hb_FNameNameExt( cItem ) ) cItem := hb_DirSepAdd( PathSepToSelf( MacroProc( hbmk, tmp, cItem, _MACRO_LATE_PREFIX ) ) ) + hb_FNameNameExt( cItem ) + lFound := .T. EXIT ENDIF NEXT ENDIF - cItem := hb_PathNormalize( cItem ) + IF lFound + cItem := hb_PathNormalize( cItem ) - IF hbmk[ _HBMK_lInfo ] - hbmk_OutStd( hbmk, hb_StrFormat( I_( "Processing: %1$s" ), cItem ) ) + IF hbmk[ _HBMK_lInfo ] + hbmk_OutStd( hbmk, hb_StrFormat( I_( "Processing: %1$s" ), cItem ) ) + ENDIF + + HBC_ProcessOne( hbmk, cItem, nNestingLevel + 1 ) + ELSE + hbmk_OutErr( hbmk, hb_StrFormat( I_( "Warning: Cannot find %1$s (referenced from %2$s)" ), cItem, cFileName ) ) ENDIF - - HBC_ProcessOne( hbmk, cItem, nNestingLevel + 1 ) ELSE hbmk_OutErr( hbmk, hb_StrFormat( I_( "Warning: Cannot nest deeper in %1$s" ), cFileName ) ) ENDIF @@ -9307,22 +9328,30 @@ STATIC FUNCTION HBC_ProcessOne( hbmk, cFileName, nNestingLevel ) cItem := hb_FNameExtSet( cItem, ".hbc" ) ENDIF - IF ! hb_FileExists( cItem ) + lFound := .F. + IF hb_FileExists( cItem ) + lFound := .T. + ELSE FOR EACH tmp IN hbmk[ _HBMK_aLIBPATH ] IF hb_FileExists( hb_DirSepAdd( PathSepToSelf( MacroProc( hbmk, tmp, cItem, _MACRO_LATE_PREFIX ) ) ) + hb_FNameNameExt( cItem ) ) cItem := hb_DirSepAdd( PathSepToSelf( MacroProc( hbmk, tmp, cItem, _MACRO_LATE_PREFIX ) ) ) + hb_FNameNameExt( cItem ) + lFound := .T. EXIT ENDIF NEXT ENDIF - cItem := hb_PathNormalize( cItem ) + IF lFound + cItem := hb_PathNormalize( cItem ) - IF hbmk[ _HBMK_lInfo ] - hbmk_OutStd( hbmk, hb_StrFormat( I_( "Processing: %1$s" ), cItem ) ) + IF hbmk[ _HBMK_lInfo ] + hbmk_OutStd( hbmk, hb_StrFormat( I_( "Processing: %1$s" ), cItem ) ) + ENDIF + + HBC_ProcessOne( hbmk, cItem, nNestingLevel + 1 ) + ELSE + hbmk_OutErr( hbmk, hb_StrFormat( I_( "Warning: Cannot find %1$s (referenced from %2$s)" ), cItem, cFileName ) ) ENDIF - - HBC_ProcessOne( hbmk, cItem, nNestingLevel + 1 ) ELSE hbmk_OutErr( hbmk, hb_StrFormat( I_( "Warning: Cannot nest deeper in %1$s" ), cFileName ) ) ENDIF @@ -9342,16 +9371,24 @@ STATIC FUNCTION HBC_ProcessOne( hbmk, cFileName, nNestingLevel ) cItem := hb_FNameExtSet( cItem, ".hbc" ) ENDIF - IF ! hb_FileExists( cItem ) + lFound := .F. + IF hb_FileExists( cItem ) + lFound := .T. + ELSE FOR EACH tmp IN hbmk[ _HBMK_aLIBPATH ] IF hb_FileExists( hb_DirSepAdd( PathSepToSelf( MacroProc( hbmk, tmp, cItem, _MACRO_LATE_PREFIX ) ) ) + hb_FNameNameExt( cItem ) ) cItem := hb_DirSepAdd( PathSepToSelf( MacroProc( hbmk, tmp, cItem, _MACRO_LATE_PREFIX ) ) ) + hb_FNameNameExt( cItem ) + lFound := .T. EXIT ENDIF NEXT ENDIF - hbmk[ _HBMK_hAUTOHBC ][ AllTrim( StrTran( cName, "\", "/" ) ) ] := cItem + IF lFound + hbmk[ _HBMK_hAUTOHBC ][ AllTrim( StrTran( cName, "\", "/" ) ) ] := cItem + ELSE + hbmk_OutErr( hbmk, hb_StrFormat( I_( "Warning: Cannot find %1$s (referenced from %2$s)" ), cItem, cFileName ) ) + ENDIF ENDIF NEXT