2012-06-06 16:02 UTC+0200 Viktor Szakats (harbour syenar.net)

* contrib/make.hb
  * utils/hbmk2/hbmk2.es_PE.po
  * utils/hbmk2/hbmk2.hu_HU.po
  * utils/hbmk2/hbmk2.pt_BR.po
  * utils/hbmk2/hbmk2.prg
    + use JSON format instead of hand-rolled microformat for 
      --hbinfo output (used in Harbour SVN for communication 
      between contrib make.hb script and hbmk2)
      INCOMPATIBLE. Update your system in the unlikely event 
      you use --hbinfo output.
This commit is contained in:
Viktor Szakats
2012-06-06 14:03:50 +00:00
parent ee6129dd7d
commit 8a0e1e603d
6 changed files with 46 additions and 46 deletions

View File

@@ -16,6 +16,18 @@
The license applies to all entries newer than 2009-04-28.
*/
2012-06-06 16:02 UTC+0200 Viktor Szakats (harbour syenar.net)
* contrib/make.hb
* utils/hbmk2/hbmk2.es_PE.po
* utils/hbmk2/hbmk2.hu_HU.po
* utils/hbmk2/hbmk2.pt_BR.po
* utils/hbmk2/hbmk2.prg
+ use JSON format instead of hand-rolled microformat for
--hbinfo output (used in Harbour SVN for communication
between contrib make.hb script and hbmk2)
INCOMPATIBLE. Update your system in the unlikely event
you use --hbinfo output.
2012-06-06 15:17 UTC+0200 Viktor Szakats (harbour syenar.net)
* utils/hbmk2/hbmk2.prg
* marked hbmk2_* plugin API functions with HB_LEGACY_LEVEL4

View File

@@ -492,6 +492,7 @@ STATIC FUNCTION call_hbmk2_hbinfo( cProjectPath, hProject )
LOCAL cDir
LOCAL cName
LOCAL tmp
LOCAL hInfo
LOCAL nErrorLevel
@@ -501,12 +502,14 @@ STATIC FUNCTION call_hbmk2_hbinfo( cProjectPath, hProject )
IF ( nErrorLevel := call_hbmk2( cProjectPath, " --hbinfo", NIL,, @cStdOut ) ) == 0
hProject[ "cType" ] := hbmk2_hbinfo_getitem( cStdOut, "targettype" )
hProject[ "cOutputName" ] := hbmk2_hbinfo_getitem( cStdOut, "outputname" )
hProject[ "cDynSuffix" ] := hbmk2_hbinfo_getitem( cStdOut, "dynsuffix" )
hProject[ "cPlatform" ] := hbmk2_hbinfo_getitem( cStdOut, "platform" )
hb_jsonDecode( cStdOut, @hInfo )
FOR EACH tmp IN hb_ATokens( hbmk2_hbinfo_getitem( cStdOut, "hbctree", .T. ), Chr( 10 ) )
hProject[ "cType" ] := hbmk2_hbinfo_getitem( hInfo, "targettype" )
hProject[ "cOutputName" ] := hbmk2_hbinfo_getitem( hInfo, "outputname" )
hProject[ "cDynSuffix" ] := hbmk2_hbinfo_getitem( hInfo, "dynsuffix" )
hProject[ "cPlatform" ] := hbmk2_hbinfo_getitem( hInfo, "platform" )
FOR EACH tmp IN hb_ATokens( hbmk2_hbinfo_getitem( hInfo, "hbctree" ), Chr( 10 ) )
IF ! Empty( tmp )
hb_FNameSplit( LTrim( tmp ), @cDir, @cName )
#ifdef __PLATFORM__DOS
@@ -523,25 +526,8 @@ STATIC FUNCTION call_hbmk2_hbinfo( cProjectPath, hProject )
RETURN nErrorLevel
STATIC FUNCTION hbmk2_hbinfo_getitem( cString, cItem, lAll )
LOCAL cRetVal := ""
LOCAL nPos := 1
LOCAL tmp
DO WHILE ( tmp := hb_At( cItem + "{{", cString, nPos ) ) > 0
nPos := tmp + Len( cItem + "{{" )
IF ( tmp := hb_At( "}}", cString, nPos ) ) > 0
tmp := StrTran( SubStr( cString, nPos, tmp - nPos ), Chr( 13 ) )
IF lAll != NIL .AND. lAll
cRetVal += tmp
ELSE
/* Find the last occurrence, which is the root project */
cRetVal := tmp
ENDIF
ENDIF
ENDDO
RETURN cRetVal
STATIC FUNCTION hbmk2_hbinfo_getitem( hInfo, cItem )
RETURN iif( HB_ISHASH( hInfo ), hb_HGetDef( hInfo, cItem, "" ), "" )
STATIC FUNCTION call_hbmk2( cProjectPath, cOptionsPre, cDynSuffix, cStdErr, cStdOut )
LOCAL nErrorLevel

View File

@@ -1388,7 +1388,7 @@ msgstr ""
#: hbmk2.prg:11633 hbmk2.prg:13102
#, c-format
msgid "output Harbour build information. The data output comes in the format: '<name>{{<value>}}'. The included paths always contain forward slashes."
msgid "output Harbour build information. Output is in JSON format. The included paths always contain forward slashes."
msgstr ""
#: hbmk2.prg:11633 hbmk2.prg:13102

View File

@@ -1384,7 +1384,7 @@ msgstr ""
#: hbmk2.prg:11633 hbmk2.prg:13102
#, c-format
msgid "output Harbour build information. The data output comes in the format: '<name>{{<value>}}'. The included paths always contain forward slashes."
msgid "output Harbour build information. Output is in JSON format. The included paths always contain forward slashes."
msgstr ""
#: hbmk2.prg:11633 hbmk2.prg:13102

View File

@@ -527,6 +527,8 @@ REQUEST HB_MD5
REQUEST HB_CRC32
REQUEST HB_BLOWFISHKEY
REQUEST HB_BLOWFISHENCRYPT
REQUEST HB_JSONENCODE
REQUEST HB_JSONDECODE
REQUEST HB_LIBEXT
REQUEST HB_HKEYAT
REQUEST HB_HDELAT
@@ -5303,26 +5305,26 @@ FUNCTION hbmk( aArgs, nArgTarget, /* @ */ lPause, nLevel )
IF lDumpInfo
OutStd( "{{{" + hb_eol() )
OutStd( "platform{{" + hbmk[ _HBMK_cPLAT ] + "}}" + hb_eol() )
OutStd( "compiler{{" + hbmk[ _HBMK_cCOMP ] + "}}" + hb_eol() )
OutStd( "cpu{{" + hbmk[ _HBMK_cCPU ] + "}}" + hb_eol() )
OutStd( "buildname{{" + hbmk[ _HBMK_cBUILD ] + "}}" + hb_eol() )
IF ! Empty( hbmk[ _HBMK_cPROGNAME ] )
OutStd( "outputname{{" + PathSepToForward( hbmk[ _HBMK_cPROGNAME ] ) + "}}" + hb_eol() )
ENDIF
OutStd( "targetname{{" + hbmk_TARGETNAME( hbmk ) + "}}" + hb_eol() )
OutStd( "targettype{{" + hbmk_TARGETTYPE( hbmk ) + "}}" + hb_eol() )
OutStd( "dynprefix{{" + iif( Empty( l_cDynLibDir ), "", l_cDynLibDir + hbmk[ _HBMK_cDynLibPrefix ] ) + "}}" + hb_eol() )
OutStd( "dynsuffix{{" + hbmk_DYNSUFFIX( hbmk ) + "}}" + hb_eol() )
OutStd( "inc{{" + iif( hbmk[ _HBMK_lINC ], "yes", "no" ) + "}}" + hb_eol() )
tmp := { "platform" => hbmk[ _HBMK_cPLAT ],;
"compiler" => hbmk[ _HBMK_cCOMP ],;
"cpu" => hbmk[ _HBMK_cCPU ],;
"buildname" => hbmk[ _HBMK_cBUILD ],;
"targetname" => hbmk_TARGETNAME( hbmk ),;
"targettype" => hbmk_TARGETTYPE( hbmk ),;
"dynprefix" => iif( Empty( l_cDynLibDir ), "", l_cDynLibDir + hbmk[ _HBMK_cDynLibPrefix ] ),;
"dynsuffix" => hbmk_DYNSUFFIX( hbmk ),;
"inc" => iif( hbmk[ _HBMK_lINC ], "yes", "no" ) }
OutStd( "hbctree{{" + hb_eol() )
FOR EACH tmp IN hbmk[ _HBMK_aDEPTHBC ]
OutStd( Replicate( Chr( 9 ), tmp[ 2 ] ) + PathSepToForward( hb_PathNormalize( tmp[ 1 ] ) ) + hb_eol() )
IF ! Empty( hbmk[ _HBMK_cPROGNAME ] )
tmp[ "outputname" ] := PathSepToForward( hbmk[ _HBMK_cPROGNAME ] )
ENDIF
tmp[ "hbctree" ] := ""
FOR EACH tmp1 IN hbmk[ _HBMK_aDEPTHBC ]
tmp[ "hbctree" ] += Replicate( Chr( 9 ), tmp1[ 2 ] ) + PathSepToForward( hb_PathNormalize( tmp1[ 1 ] ) ) + Chr( 10 )
NEXT
OutStd( "}}" + hb_eol() )
OutStd( "}}}" + hb_eol() )
OutStd( hb_jsonEncode( tmp ) )
RETURN _ERRLEV_OK
ENDIF
@@ -13159,7 +13161,7 @@ STATIC PROCEDURE ShowHelp( hbmk, lLong )
{ "--hbdirdyn" , I_( "output Harbour dynamic library directory" ) },;
{ "--hbdirlib" , I_( "output Harbour static library directory" ) },;
{ "--hbdirinc" , I_( "output Harbour header directory" ) },;
{ "--hbinfo" , I_( "output Harbour build information. The data output comes in the format: '<name>{{<value>}}'. The included paths always contain forward slashes." ) },;
{ "--hbinfo" , I_( "output Harbour build information. Output is in JSON format. The included paths always contain forward slashes." ) },;
NIL,;
{ "-plat[form]=<plat>" , I_( "select target platform." ) },;
{ "-comp[iler]=<comp>" , I_( "select C compiler.\nSpecial value:\n - bld: use original build settings (default on *nix)" ) },;

View File

@@ -1388,7 +1388,7 @@ msgstr ""
#: hbmk2.prg:11633 hbmk2.prg:13102
#, c-format
msgid "output Harbour build information. The data output comes in the format: '<name>{{<value>}}'. The included paths always contain forward slashes."
msgid "output Harbour build information. Output is in JSON format. The included paths always contain forward slashes."
msgstr ""
#: hbmk2.prg:11633 hbmk2.prg:13102