From 08efbcb882abd9204d7bd89291a538f89f17b28b Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 21 Jul 2010 22:58:42 +0000 Subject: [PATCH] 2010-07-22 00:54 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * utils/hbmk2/hbmk2.prg ! Fixed stupid error not allowing to add the same install path for multiple groups. ! Fixed to not create workdir in --hbinfo mode. % Do not install twice the implibs defined in dependencies. * contrib/make.hbs + Make sure to disable envvars influencing build options also in stdalone mode. --- harbour/ChangeLog | 11 +++++++++++ harbour/contrib/make.hbs | 20 ++++++++++++++------ harbour/utils/hbmk2/hbmk2.prg | 15 +++++++++------ 3 files changed, 34 insertions(+), 12 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index ec4f36d94d..b51bd8b91b 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,17 @@ The license applies to all entries newer than 2009-04-28. */ +2010-07-22 00:54 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * utils/hbmk2/hbmk2.prg + ! Fixed stupid error not allowing to add the same install + path for multiple groups. + ! Fixed to not create workdir in --hbinfo mode. + % Do not install twice the implibs defined in dependencies. + + * contrib/make.hbs + + Make sure to disable envvars influencing build options + also in stdalone mode. + 2010-07-21 20:37 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * src/rtl/stuff.c ! Fixed GPF in STUFF() when HB_SIZE is signed value. diff --git a/harbour/contrib/make.hbs b/harbour/contrib/make.hbs index c06aafc44d..74c4e37d4e 100755 --- a/harbour/contrib/make.hbs +++ b/harbour/contrib/make.hbs @@ -496,6 +496,17 @@ PROCEDURE GNUMake( ... ) RETURN +STATIC PROCEDURE clear_hbmk2_envvars() + + /* Making sure that user settings do not interfere with the std build process. */ + hb_setenv( "HBMK_OPTIONS" ) + hb_setenv( "HARBOUR" ) + hb_setenv( "HARBOURCMD" ) + hb_setenv( "CLIPPER" ) + hb_setenv( "CLIPPERCMD" ) + + RETURN + STATIC FUNCTION call_hbmk2_hbinfo( cBinDir, cProject, hProject ) LOCAL cStdOut LOCAL cDir @@ -506,6 +517,8 @@ STATIC FUNCTION call_hbmk2_hbinfo( cBinDir, cProject, hProject ) hProject[ "aDept" ] := {} hProject[ "lInc" ] := .F. + clear_hbmk2_envvars() + IF hb_processRun( PathSepToSelf( cBinDir ) + "hbmk2 --hbinfo " + StrTran( cProject, "\", "/" ),, @cStdOut ) == 0 hProject[ "cType" ] := hbmk2_hbinfo_getitem( cStdOut, "targettype" ) @@ -540,12 +553,7 @@ STATIC FUNCTION hbmk2_hbinfo_getitem( cString, cItem ) STATIC FUNCTION call_hbmk2( cBinDir, cProject, cOptionsPre, cOptionsPost ) LOCAL nErrorLevel - /* Making sure that user settings do not interfere with the std build process. */ - hb_setenv( "HBMK_OPTIONS" ) - hb_setenv( "HARBOUR" ) - hb_setenv( "HARBOURCMD" ) - hb_setenv( "CLIPPER" ) - hb_setenv( "CLIPPERCMD" ) + clear_hbmk2_envvars() nErrorLevel := mk_hb_processRun( PathSepToSelf( cBinDir ) + "hbmk2" +; " -quiet -lang=en -width=0" +; diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index 16facf974a..57b40c8c21 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -2609,7 +2609,7 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause ) ENDIF /* Decide about working dir */ - IF ! hbmk[ _HBMK_lStopAfterInit ] .AND. ! hbmk[ _HBMK_lCreateImpLib ] + IF ! hbmk[ _HBMK_lStopAfterInit ] .AND. ! hbmk[ _HBMK_lCreateImpLib ] .AND. ! lDumpInfo IF hbmk[ _HBMK_lINC ] /* NOTE: We store -hbdyn objects in different dirs by default as - for Windows platforms - they're always built using different compilation options @@ -4256,7 +4256,9 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause ) /* ; */ IF ! hbmk[ _HBMK_lStopAfterInit ] .AND. hbmk[ _HBMK_lCreateImpLib ] .AND. ! lDumpInfo - DoIMPLIB( hbmk, bBlk_ImpLib, cLibLibPrefix, cLibLibExt, hbmk[ _HBMK_aIMPLIBSRC ], hbmk[ _HBMK_cPROGNAME ], "" ) + IF DoIMPLIB( hbmk, bBlk_ImpLib, cLibLibPrefix, cLibLibExt, hbmk[ _HBMK_aIMPLIBSRC ], hbmk[ _HBMK_cPROGNAME ], "" ) + DoInstCopy( hbmk ) + ENDIF hbmk[ _HBMK_lStopAfterInit ] := .T. ENDIF @@ -5905,12 +5907,13 @@ STATIC PROCEDURE vxworks_env_init( hbmk ) RETURN -STATIC PROCEDURE DoIMPLIB( hbmk, bBlk_ImpLib, cLibLibPrefix, cLibLibExt, aIMPLIBSRC, cPROGNAME, cInstCat ) +STATIC FUNCTION DoIMPLIB( hbmk, bBlk_ImpLib, cLibLibPrefix, cLibLibExt, aIMPLIBSRC, cPROGNAME, cInstCat ) LOCAL cMakeImpLibDLL LOCAL tmp, tmp1 LOCAL nNotFound LOCAL aToDelete + LOCAL lRetVal := .F. IF ISBLOCK( bBlk_ImpLib ) IF ! Empty( aIMPLIBSRC ) @@ -5947,7 +5950,7 @@ STATIC PROCEDURE DoIMPLIB( hbmk, bBlk_ImpLib, cLibLibPrefix, cLibLibExt, aIMPLIB IF hbmk[ _HBMK_lCLEAN ] AEval( aToDelete, {| tmp | FErase( tmp ) } ) ELSE - DoInstCopy( hbmk ) + lRetVal := .T. ENDIF ENDIF ELSE @@ -5959,7 +5962,7 @@ STATIC PROCEDURE DoIMPLIB( hbmk, bBlk_ImpLib, cLibLibPrefix, cLibLibExt, aIMPLIB hbmk_OutErr( hbmk, I_( "Error: Creating import libraries is not supported for this platform or compiler." ) ) ENDIF - RETURN + RETURN lRetVal #define _INST_cGroup 1 #define _INST_cData 2 @@ -7510,7 +7513,7 @@ STATIC FUNCTION AAddNew( array, xItem ) STATIC FUNCTION AAddNewINST( array, xItem, lToTop ) - IF AScan( array, {| tmp | tmp[ 2 ] == xItem[ 2 ] } ) == 0 + IF AScan( array, {| tmp | tmp[ 1 ] == xItem[ 1 ] .AND. tmp[ 2 ] == xItem[ 2 ] } ) == 0 IF lToTop != NIL .AND. lToTop hb_AIns( array, 1, xItem, .T. ) ELSE