diff --git a/harbour/ChangeLog b/harbour/ChangeLog index c0e714c95b..ae582c4acd 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,11 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-05-22 10:57 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * utils/hbmk2/hbmk2.prg + ! -hbimplib extended for pocc to first look for any existing + .lib file with the same name as the .dll. + 2010-05-21 21:15 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * utils/hbmk2/hbmk2.prg ! -hbimplib extended for msvc to first look for any existing diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index c4bf8fa834..5ace03a5a6 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -3513,7 +3513,7 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause ) ENDIF cOptIncMask := "-I{DI}" cOpt_Dyn := "{FD} {IM} -dll -out:{OD} {DL} {LO} {LL} {LB} {LS}" - bBlk_ImpLib := {| cSourceDLL, cTargetLib, cFlags | win_implib_command( hbmk, cBin_Lib + " {ID} -out:{OL}", nCmd_Esc, cSourceDLL, cTargetLib, cFlags ) } + bBlk_ImpLib := {| cSourceDLL, cTargetLib, cFlags | win_implib_command_pocc( hbmk, cBin_Lib + " {ID} -out:{OL}", nCmd_Esc, cSourceDLL, cTargetLib, cFlags ) } IF hbmk[ _HBMK_cPLAT ] == "wce" AAdd( hbmk[ _HBMK_aOPTC ], "-DUNICODE" ) AAdd( hbmk[ _HBMK_aOPTC ], "-D_WINCE" ) /* Required by pocc Windows headers */ @@ -7961,14 +7961,8 @@ STATIC FUNCTION win_implib_command_gcc( hbmk, cCommand, nCmd_Esc, cSourceDLL, cT ordinary .dlls, like with every other compiler. [vszakats] */ - /* Try to find COFF .lib with the same name */ - IF hb_FileExists( tmp := FN_ExtSet( cSourceDLL, ".lib" ) ) - IF IsCOFFLib( tmp ) - IF ! hbmk[ _HBMK_lQuiet ] - hbmk_OutStd( hbmk, I_( "Found COFF .lib with the same name, falling back to using it instead of the .dll." ) ) - ENDIF - RETURN hb_FCopy( tmp, cTargetLib ) != F_ERROR - ENDIF + IF win_implib_coff( hbmk, cSourceDLL, cTargetLib ) + RETURN .T. ENDIF /* Try to find .def file with the same name */ @@ -7996,14 +7990,8 @@ STATIC FUNCTION win_implib_command_msvc( hbmk, cCommand, nCmd_Esc, cSourceDLL, c LOCAL cCommandDump - /* Try to find COFF .lib with the same name */ - IF hb_FileExists( tmp := FN_ExtSet( cSourceDLL, ".lib" ) ) - IF IsCOFFLib( tmp ) - IF ! hbmk[ _HBMK_lQuiet ] - hbmk_OutStd( hbmk, I_( "Found COFF .lib with the same name, falling back to using it instead of the .dll." ) ) - ENDIF - RETURN hb_FCopy( tmp, cTargetLib ) != F_ERROR - ENDIF + IF win_implib_coff( hbmk, cSourceDLL, cTargetLib ) + RETURN .T. ENDIF cCommandDump := "dumpbin.exe -exports {ID}" @@ -8050,6 +8038,29 @@ STATIC FUNCTION win_implib_command_msvc( hbmk, cCommand, nCmd_Esc, cSourceDLL, c RETURN lSuccess +STATIC FUNCTION win_implib_command_pocc( hbmk, cCommand, nCmd_Esc, cSourceDLL, cTargetLib, cFlags ) + + IF win_implib_coff( hbmk, cSourceDLL, cTargetLib ) + RETURN .T. + ENDIF + + RETURN win_implib_command( hbmk, cCommand, nCmd_Esc, cSourceDLL, cTargetLib, cFlags ) + +STATIC FUNCTION win_implib_coff( hbmk, cSourceDLL, cTargetLib ) + LOCAL tmp + + /* Try to find COFF .lib with the same name */ + IF hb_FileExists( tmp := FN_ExtSet( cSourceDLL, ".lib" ) ) + IF IsCOFFLib( tmp ) + IF ! hbmk[ _HBMK_lQuiet ] + hbmk_OutStd( hbmk, I_( "Found COFF .lib with the same name, falling back to using it instead of the .dll." ) ) + ENDIF + RETURN hb_FCopy( tmp, cTargetLib ) != F_ERROR + ENDIF + ENDIF + + RETURN .F. + #define _VCS_UNKNOWN 0 #define _VCS_SVN 1 #define _VCS_GIT 2