From f5f7f12fd964d7dd534b732349074d12b8ca303d Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sat, 16 Jun 2012 23:44:08 +0000 Subject: [PATCH] 2012-06-17 01:39 UTC+0200 Viktor Szakats (harbour syenar.net) * contrib/hbblat/hbblat.hbp * contrib/hbcurl/hbcurl.hbp * contrib/hbssl/hbssl.hbp ! fix to prev * contrib/hbpost.hbm * contrib/hbqt/hbqt_common.hbm * deleted extra pathsep * contrib/hbfbird/hbfbird.hbp * contrib/hbgd/hbgd.hbp * contrib/sddfb/sddfb.hbp ! fixed to use .dll imp lib source in -hbdyn mode. it's a fix for experimental HB_INSTALL_3RDDYN option. * contrib/make.hb * minor cleanups in errorlevel descriptions * utils/hbmk2/hbmk2.prg ! fixed finding scripts in path and without extensions in runner mode ! fixed to not execute '.' when runner mode is started with 'hbmk2 .' command --- harbour/ChangeLog | 25 +++++++++++ harbour/contrib/hbblat/hbblat.hbp | 1 - harbour/contrib/hbcurl/hbcurl.hbp | 1 - harbour/contrib/hbfbird/hbfbird.hbp | 4 +- harbour/contrib/hbgd/hbgd.hbp | 4 +- harbour/contrib/hbpost.hbm | 12 +++--- harbour/contrib/hbqt/hbqt_common.hbm | 4 +- harbour/contrib/hbssl/hbssl.hbp | 1 - harbour/contrib/make.hb | 6 +-- harbour/contrib/sddfb/sddfb.hbp | 4 +- harbour/utils/hbmk2/hbmk2.prg | 64 +++++++++++++++++++++++++++- 11 files changed, 104 insertions(+), 22 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 1124e881bb..c18b0de592 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,31 @@ The license applies to all entries newer than 2009-04-28. */ +2012-06-17 01:39 UTC+0200 Viktor Szakats (harbour syenar.net) + * contrib/hbblat/hbblat.hbp + * contrib/hbcurl/hbcurl.hbp + * contrib/hbssl/hbssl.hbp + ! fix to prev + + * contrib/hbpost.hbm + * contrib/hbqt/hbqt_common.hbm + * deleted extra pathsep + + * contrib/hbfbird/hbfbird.hbp + * contrib/hbgd/hbgd.hbp + * contrib/sddfb/sddfb.hbp + ! fixed to use .dll imp lib source in -hbdyn mode. + it's a fix for experimental HB_INSTALL_3RDDYN option. + + * contrib/make.hb + * minor cleanups in errorlevel descriptions + + * utils/hbmk2/hbmk2.prg + ! fixed finding scripts in path and without extensions + in runner mode + ! fixed to not execute '.' when runner mode is started + with 'hbmk2 .' command + 2012-06-17 00:18 UTC+0200 Viktor Szakats (harbour syenar.net) * utils/hbmk2/hbmk2.prg + will now gather a list of existing 3rd party dll dependencies diff --git a/harbour/contrib/hbblat/hbblat.hbp b/harbour/contrib/hbblat/hbblat.hbp index c9c003f6cc..43fa0fdd05 100644 --- a/harbour/contrib/hbblat/hbblat.hbp +++ b/harbour/contrib/hbblat/hbblat.hbp @@ -15,7 +15,6 @@ -depkeyhead=blat:blat.h -depcontrol=blat:${HB_WITH_BLAT} -depimplibs=blat:../blat.dll --depfinish=blat -iflag={bcc}-a diff --git a/harbour/contrib/hbcurl/hbcurl.hbp b/harbour/contrib/hbcurl/hbcurl.hbp index 3b158a6b2b..ba1d0ad9f5 100644 --- a/harbour/contrib/hbcurl/hbcurl.hbp +++ b/harbour/contrib/hbcurl/hbcurl.hbp @@ -6,7 +6,6 @@ hbcurl.hbm -depimplibs=curl:../libcurl.dll -depimplibs=curl:../bin/libcurl.dll --depfinish=curl -iflag={bcc}-a diff --git a/harbour/contrib/hbfbird/hbfbird.hbp b/harbour/contrib/hbfbird/hbfbird.hbp index e1c4d1611e..3449e4a026 100644 --- a/harbour/contrib/hbfbird/hbfbird.hbp +++ b/harbour/contrib/hbfbird/hbfbird.hbp @@ -17,8 +17,8 @@ -depincpath=firebird:/usr/include -depincpath=firebird:/opt/firebird/include -depincpath=firebird:/Library/Frameworks/Firebird.framework/Headers --depimplibs=firebird:../bin/fbclient.dll{!(allgcc|allmsvc|allpocc)} --depimplibs=firebird:../lib/fbclient_ms.lib{allgcc|allmsvc|allpocc} +-depimplibs=firebird:../bin/fbclient.dll{!(allgcc|allmsvc|allpocc)|hbdyn} +-depimplibs=firebird:../lib/fbclient_ms.lib{(allgcc|allmsvc|allpocc)&!hbdyn} -depimplibd=firebird:fbclient -instfile=inc:hbfbird.hbx diff --git a/harbour/contrib/hbgd/hbgd.hbp b/harbour/contrib/hbgd/hbgd.hbp index 05fcd4de63..da1c885bca 100644 --- a/harbour/contrib/hbgd/hbgd.hbp +++ b/harbour/contrib/hbgd/hbgd.hbp @@ -18,8 +18,8 @@ hbct.hbc -depincpath=gd:/usr/include -depincpath=gd:/usr/local/include -depincpath=gd:/opt/local/include --depimplibs=gd:../bin/bgd.dll{!(msvc|pocc|mingw)} --depimplibs=gd:../lib/bgd.lib{msvc|pocc|mingw} +-depimplibs=gd:../bin/bgd.dll{!(msvc|pocc|mingw)|hbdyn} +-depimplibs=gd:../lib/bgd.lib{(msvc|pocc|mingw)&!hbdyn} -instfile=inc:gd.ch -instfile=inc:gdextern.ch diff --git a/harbour/contrib/hbpost.hbm b/harbour/contrib/hbpost.hbm index 50266e3a2f..70e2ed2ca3 100644 --- a/harbour/contrib/hbpost.hbm +++ b/harbour/contrib/hbpost.hbm @@ -79,12 +79,12 @@ {hbdyn&(cygwin|!unix)}-workdir=../bin/${hb_plat}/${hb_comp}${hb_build}/${hb_work}/${hb_outputname}${hb_workdynsub} # copy contrib-specific public files --instfile=contrib:${_HB_CONTRIB_SUBDIR}/*.hb --instfile=contrib:${_HB_CONTRIB_SUBDIR}/*.hbc --instfile=contrib:${_HB_CONTRIB_SUBDIR}/*.hbx --instfile=contrib:${_HB_CONTRIB_SUBDIR}/*.ch --instfile=contrib:${_HB_CONTRIB_SUBDIR}/*.txt --instfile=contrib_tests:${_HB_CONTRIB_SUBDIR}/tests/*.* +-instfile=contrib:${_HB_CONTRIB_SUBDIR}*.hb +-instfile=contrib:${_HB_CONTRIB_SUBDIR}*.hbc +-instfile=contrib:${_HB_CONTRIB_SUBDIR}*.hbx +-instfile=contrib:${_HB_CONTRIB_SUBDIR}*.ch +-instfile=contrib:${_HB_CONTRIB_SUBDIR}*.txt +-instfile=contrib_tests:${_HB_CONTRIB_SUBDIR}tests/*.* # install {_HB_BUILD_INSTALL&_HB_INSTALL_LIB&hblib}-instpath=${_HB_INSTALL_LIB}/ diff --git a/harbour/contrib/hbqt/hbqt_common.hbm b/harbour/contrib/hbqt/hbqt_common.hbm index 133f532f00..b71689b957 100644 --- a/harbour/contrib/hbqt/hbqt_common.hbm +++ b/harbour/contrib/hbqt/hbqt_common.hbm @@ -41,5 +41,5 @@ -instfile=contrib_qt:*.txt -instfile=contrib_qt_tests:tests/*.* -{_HB_BUILD_INSTALL&_HB_INSTALL_CONTRIB&hblib}-instpath=contrib_qt:${_HB_INSTALL_CONTRIB}/${_HB_CONTRIB_SUBDIR}/../ -{_HB_BUILD_INSTALL&_HB_INSTALL_CONTRIB&hblib}-instpath=contrib_qt_tests:${_HB_INSTALL_CONTRIB}/${_HB_CONTRIB_SUBDIR}/../tests/ +{_HB_BUILD_INSTALL&_HB_INSTALL_CONTRIB&hblib}-instpath=contrib_qt:${_HB_INSTALL_CONTRIB}/${_HB_CONTRIB_SUBDIR}../ +{_HB_BUILD_INSTALL&_HB_INSTALL_CONTRIB&hblib}-instpath=contrib_qt_tests:${_HB_INSTALL_CONTRIB}/${_HB_CONTRIB_SUBDIR}../tests/ diff --git a/harbour/contrib/hbssl/hbssl.hbp b/harbour/contrib/hbssl/hbssl.hbp index 1294d1a5fa..ac4b3e9738 100644 --- a/harbour/contrib/hbssl/hbssl.hbp +++ b/harbour/contrib/hbssl/hbssl.hbp @@ -9,7 +9,6 @@ -depimplibs=openssl:../dll/ssleay32.dll -depimplibs=openssl:../libeay32.dll -depimplibs=openssl:../ssleay32.dll --depfinish=openssl hbssl.hbm diff --git a/harbour/contrib/make.hb b/harbour/contrib/make.hb index b757013336..53b6481453 100755 --- a/harbour/contrib/make.hb +++ b/harbour/contrib/make.hb @@ -584,15 +584,15 @@ STATIC FUNCTION hbmk2_errorstr( nErrorLevel ) CASE 2 ; RETURN "unknown compiler" CASE 3 ; RETURN "failed Harbour detection" CASE 5 ; RETURN "failed stub creation" - CASE 6 ; RETURN "failed in compilation phase" - CASE 7 ; RETURN "failed in final assembly phase" + CASE 6 ; RETURN "failed in compilation" + CASE 7 ; RETURN "failed in final assembly" CASE 8 ; RETURN "unsupported" CASE 9 ; RETURN "failed to create working directory" CASE 19 ; RETURN "help" CASE 10 ; RETURN "dependency missing or disabled" CASE 20 ; RETURN "plugin initialization" CASE 30 ; RETURN "too deep nesting" - CASE 50 ; RETURN "stop requested by makefile" + CASE 50 ; RETURN "stop requested" ENDSWITCH RETURN "unknown" diff --git a/harbour/contrib/sddfb/sddfb.hbp b/harbour/contrib/sddfb/sddfb.hbp index 30101d6fa8..a4756326bd 100644 --- a/harbour/contrib/sddfb/sddfb.hbp +++ b/harbour/contrib/sddfb/sddfb.hbp @@ -19,8 +19,8 @@ rddsql.hbc -depincpath=firebird:/usr/include -depincpath=firebird:/opt/firebird/include -depincpath=firebird:/Library/Frameworks/Firebird.framework/Headers --depimplibs=firebird:../bin/fbclient.dll{!(allgcc|allmsvc|allpocc)} --depimplibs=firebird:../lib/fbclient_ms.lib{allgcc|allmsvc|allpocc} +-depimplibs=firebird:../bin/fbclient.dll{!(allgcc|allmsvc|allpocc)|hbdyn} +-depimplibs=firebird:../lib/fbclient_ms.lib{(allgcc|allmsvc|allpocc)&!hbdyn} -depimplibd=firebird:fbclient # For FireBird headers diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index d9740258e9..a5f4f517cc 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -12248,8 +12248,9 @@ STATIC PROCEDURE __hbshell( cFile, ... ) /* Do the thing */ - IF ! Empty( hb_FNameName( cFile ) ) .AND. ; - ! Empty( cFile := FindInPath( cFile ) ) + IF !( cFile == "." ) .AND. ; + ! Empty( hb_FNameName( cFile ) ) .AND. ; + ! Empty( cFile := __hbshell_FindInPath( cFile ) ) cExt := Lower( hb_FNameExt( cFile ) ) @@ -12322,6 +12323,65 @@ STATIC PROCEDURE __hbshell( cFile, ... ) RETURN +STATIC FUNCTION __hbshell_FindInPath( cFileName, xPath ) + LOCAL cDir + LOCAL cName + LOCAL cExt + LOCAL cFullName + LOCAL aExt + + hb_FNameSplit( cFileName, @cDir, @cName, @cExt ) + aExt := iif( Empty( cExt ), { ".hb", ".hrb" }, { cExt } ) + + FOR EACH cExt IN aExt + /* Check original filename (in supplied path or current dir) */ + IF hb_FileExists( cFullName := hb_FNameMerge( cDir, cName, cExt ) ) + RETURN cFullName + ENDIF + NEXT + + IF Empty( cDir ) + IF ! Empty( cDir := hb_DirBase() ) + /* Check in the dir of this executable. */ + FOR EACH cExt IN aExt + IF hb_FileExists( cFullName := hb_FNameMerge( cDir, cName, cExt ) ) + RETURN cFullName + ENDIF + NEXT + ENDIF + + IF ! HB_ISSTRING( xPath ) .AND. ; + ! HB_ISARRAY( xPath ) + xPath := GetEnv( "PATH" ) + ENDIF + + IF HB_ISSTRING( xPath ) + #if defined( __PLATFORM__WINDOWS ) .OR. ; + defined( __PLATFORM__DOS ) .OR. ; + defined( __PLATFORM__OS2 ) + xPath := hb_ATokens( xPath, hb_osPathListSeparator(), .T., .T. ) + #else + xPath := hb_ATokens( xPath, hb_osPathListSeparator() ) + #endif + ENDIF + + FOR EACH cExt IN aExt + /* Check in the PATH. */ + FOR EACH cDir IN xPath + IF Left( cDir, 1 ) == '"' .AND. Right( cDir, 1 ) == '"' + cDir := SubStr( cDir, 2, Len( cDir ) - 2 ) + ENDIF + IF ! Empty( cDir ) + IF hb_FileExists( cFullName := hb_FNameMerge( cDir, cName, cExt ) ) + RETURN cFullName + ENDIF + ENDIF + NEXT + NEXT + ENDIF + + RETURN NIL + STATIC FUNCTION __hbshell_FileSig( cFile ) LOCAL hFile LOCAL cBuff, cSig, cExt