From 7b901edeb619f6bdf3cc1aafd5b2204f2b35e8b6 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 26 Mar 2010 14:44:54 +0000 Subject: [PATCH] 2010-03-26 15:44 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * utils/hbmk2/hbmk2.prg ! Fixed decorating implib name in -mkimplib option if the name contained dir component. --- harbour/ChangeLog | 5 +++++ harbour/utils/hbmk2/hbmk2.prg | 42 ++++++++++------------------------- 2 files changed, 17 insertions(+), 30 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 5eddcb9b52..f5af0f9c2d 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,11 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-03-26 15:44 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * utils/hbmk2/hbmk2.prg + ! Fixed decorating implib name in -mkimplib option if the name + contained dir component. + 2010-03-26 15:04 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * utils/hbmk2/hbmk2.prg * Minor cleanup to use native pathseps in hb_FileExists() call. diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index 2bfea2d4ac..39ca2cef28 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -3611,7 +3611,7 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause ) IF ISBLOCK( bBlk_ImpLib ) IF ! Empty( cMakeImpLibDLL ) .AND. ! Empty( cMakeImpLibLib ) IF hb_FileExists( PathSepToSelf( cMakeImpLibDLL ) ) - tmp := FN_CookLib( hbmk, cMakeImpLibLib, cLibLibPrefix, cLibLibExt ) + tmp := FN_CookLib( cMakeImpLibLib, cLibLibPrefix, cLibLibExt ) IF Eval( bBlk_ImpLib, cMakeImpLibDLL, tmp, cOpt_ImpLib ) hbmk_OutStd( hbmk, hb_StrFormat( I_( "Created import library: %1$s <= %2$s" ), tmp, cMakeImpLibDLL ) ) ELSE @@ -5833,39 +5833,21 @@ STATIC FUNCTION ListCookLib( hbmk, aLIB, aLIBA, array, cPrefix, cExtNew ) RETURN array -STATIC FUNCTION FN_CookLib( hbmk, cLibName, cPrefix, cExtNew ) +STATIC FUNCTION FN_CookLib( cLibName, cPrefix, cExtNew ) LOCAL cDir - LOCAL cLibNameCooked + LOCAL cName + LOCAL cExt - IF hbmk[ _HBMK_cCOMP ] $ "gcc|mingw|mingw64|mingwarm|djgpp|cygwin|gccomf|clang|open64" - hb_FNameSplit( cLibName, @cDir ) - IF Empty( cDir ) - cLibNameCooked := cLibName -#if 0 - /* Don't attempt to strip this as it can be valid for libs which have double lib prefixes (f.e. libpng) */ - IF Left( cLibNameCooked, 3 ) == "lib" - cLibNameCooked := SubStr( cLibNameCooked, 4 ) - ENDIF -#endif - IF cPrefix != NIL - cLibNameCooked := cPrefix + cLibNameCooked - ENDIF - IF cExtNew != NIL - cLibNameCooked := FN_ExtSet( cLibNameCooked, cExtNew ) - ENDIF - RETURN cLibNameCooked - ELSE - RETURN cLibName - ENDIF - ELSE - IF cExtNew != NIL - RETURN FN_ExtSet( cLibName, cExtNew ) - ELSE - RETURN cLibName - ENDIF + hb_FNameSplit( cLibName, @cDir, @cName, @cExt ) + + IF cPrefix != NIL + cName := cPrefix + cName + ENDIF + IF cExtNew != NIL + cExt := cExtNew ENDIF - RETURN NIL + RETURN hb_FNameMerge( cDir, cName, cExt ) /* Append optional prefix and optional extension to all members */ STATIC FUNCTION ListCook( arraySrc, cExtNew )