2012-03-03 03:33 UTC+0100 Viktor Szakats (harbour syenar.net)

* utils/hbmk2/hbmk2.prg
    + support for HB_INSTALL_CONTRIB envvar to specify dir(s)
      of contribs/addons for .hbc autofind purposes. Accepts
      multiple dirs. F.e.:
         export HB_INSTALL_CONTRIB=/usr/local/share/harbour/contrib:/usr/local/share/harbour/addons
      Experimental.
This commit is contained in:
Viktor Szakats
2012-03-03 02:34:43 +00:00
parent b40f400352
commit b795fb6ac2
2 changed files with 22 additions and 0 deletions

View File

@@ -16,6 +16,14 @@
The license applies to all entries newer than 2009-04-28.
*/
2012-03-03 03:33 UTC+0100 Viktor Szakats (harbour syenar.net)
* utils/hbmk2/hbmk2.prg
+ support for HB_INSTALL_CONTRIB envvar to specify dir(s)
of contribs/addons for .hbc autofind purposes. Accepts
multiple dirs. F.e.:
export HB_INSTALL_CONTRIB=/usr/local/share/harbour/contrib:/usr/local/share/harbour/addons
Experimental.
2012-03-02 11:27 UTC+0100 Viktor Szakats (harbour syenar.net)
* utils/hbmk2/hbmk2.prg
* tuned Harbour root autodetection code to avoid corner

View File

@@ -1958,6 +1958,20 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel )
/* Add main Harbour header dir to header path list */
AAddNotEmpty( hbmk[ _HBMK_aINCPATH ], l_cHB_INSTALL_INC )
/* Add custom search paths for .hbc files */
IF ! Empty( l_cHB_INSTALL_ADD := GetEnv( "HB_INSTALL_CONTRIB" ) )
#if defined( __PLATFORM__WINDOWS ) .OR. ;
defined( __PLATFORM__DOS ) .OR. ;
defined( __PLATFORM__OS2 )
FOR EACH tmp IN hb_ATokens( l_cHB_INSTALL_ADD, hb_osPathListSeparator(), .T., .T. )
#else
FOR EACH tmp IN hb_ATokens( l_cHB_INSTALL_ADD, hb_osPathListSeparator() )
#endif
IF ! Empty( tmp )
AAdd( hbmk[ _HBMK_aLIBPATH ], hb_PathNormalize( hb_DirSepAdd( PathSepToSelf( tmp ) ) ) + "%{hb_name}" )
ENDIF
NEXT
ENDIF
/* Add default search paths for .hbc files */
l_cHB_INSTALL_ADD := hb_PathNormalize( hb_DirSepAdd( l_cHB_INSTALL_PREFIX ) )
AAdd( hbmk[ _HBMK_aLIBPATH ], l_cHB_INSTALL_ADD + "contrib" + hb_ps() + "%{hb_name}" )