From 321554aa3afec8535e921e3da64d9305ff6fe912 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 29 May 2009 14:05:51 +0000 Subject: [PATCH] 2009-05-29 16:02 UTC+0200 Viktor Szakats (harbour.01 syenar hu) * utils/hbmk2/hbmk2.prg ! Fix to prev fix reported by Vailton. Could RTE when compiling .hrbs. + Added -hbraw switch which will make hbmk2 work like harbour compiler. + .hbp extension is also recognized when embedded. * tests/hbpptest/compare.bat ! Fixed long fn. * tests/bnch_win.bat ! Fix in comment. --- harbour/ChangeLog | 12 ++++++++++++ harbour/tests/bnch_win.bat | 2 +- harbour/tests/hbpptest/compare.bat | 4 ++-- harbour/utils/hbmk2/hbmk2.prg | 14 ++++++++++---- 4 files changed, 25 insertions(+), 7 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 1f80df476b..45c865707c 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,18 @@ past entries belonging to these authors: Viktor Szakats. */ +2009-05-29 16:02 UTC+0200 Viktor Szakats (harbour.01 syenar hu) + * utils/hbmk2/hbmk2.prg + ! Fix to prev fix reported by Vailton. Could RTE when compiling .hrbs. + + Added -hbraw switch which will make hbmk2 work like harbour compiler. + + .hbp extension is also recognized when embedded. + + * tests/hbpptest/compare.bat + ! Fixed long fn. + + * tests/bnch_win.bat + ! Fix in comment. + 2009-05-29 13:49 UTC+0200 Viktor Szakats (harbour.01 syenar hu) * utils/hbmk2/hbmk2.prg + Added macro ${hb_work} which returns the builtin name diff --git a/harbour/tests/bnch_win.bat b/harbour/tests/bnch_win.bat index cded189898..7a77db1e45 100644 --- a/harbour/tests/bnch_win.bat +++ b/harbour/tests/bnch_win.bat @@ -22,7 +22,7 @@ @rem - envvar HB_BENCH_RUNS set to number of times tests are run (default: 3) @rem - C compiler configured (just like you'd do for hbmk2) @rem - Running it using this command: -@rem 'hbbm_win.bat > results.txt 2>&1' +@rem 'bnch_win.bat > results.txt 2>&1' @rem --------------------------------------------------------------- @if not "%OS%" == "Windows_NT" goto END diff --git a/harbour/tests/hbpptest/compare.bat b/harbour/tests/hbpptest/compare.bat index a490fb865d..e871f93861 100644 --- a/harbour/tests/hbpptest/compare.bat +++ b/harbour/tests/hbpptest/compare.bat @@ -6,13 +6,13 @@ rem copy pp_test.prg _pp_hb.prg copy pp_test.prg _pp_c5x.prg -..\..\bin\harbour.exe -p -s -n _pp_hb.prg +..\..\bin\harbour -p -s -n _pp_hb.prg clipper.exe _pp_c5x.prg /p /s /n del _pp_hb.prg del _pp_c5x.prg -diff -u -w _pp_hb.ppo _pp_c5x.ppo > pp_test.diff +diff -u -w _pp_hb.ppo _pp_c5x.ppo > pp_test.dif del _pp_hb.ppo del _pp_c5x.ppo diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index 27bfa4c8cd..d078e5c94b 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -574,8 +574,9 @@ FUNCTION hbmk( aArgs, /* @ */ lPause, /* @ */ lUTF8 ) CASE Left( cParamL, 6 ) == "-arch=" ; hbmk[ _HBMK_cARCH ] := SubStr( cParam, 7 ) CASE Left( cParamL, 6 ) == "-lang=" ; hbmk[ _HBMK_cUILNG ] := SubStr( cParam, 7 ) ; SetUILang( hbmk ) CASE cParamL == "-hbrun" ; lSkipBuild := .T. ; hbmk[ _HBMK_lRUN ] := .T. + CASE cParamL == "-hbraw" ; hbmk[ _HBMK_lInfo ] := .F. ; lStopAfterHarbour := .T. ; lStopAfterCComp := .T. ; lCreateLib := .F. ; lCreateDyn := .F. ; lAcceptCFlag := .F. ; lAcceptLDFlag := .F. CASE cParamL == "-hbcmp" .OR. ; - cParamL == "-clipper" ; hbmk[ _HBMK_lInfo ] := .F. ; lStopAfterHarbour := .F. ; lStopAfterCComp := .T. ; lCreateLib := .F. ; lCreateDyn := .F. + cParamL == "-clipper" ; hbmk[ _HBMK_lInfo ] := .F. ; lStopAfterHarbour := .F. ; lStopAfterCComp := .T. ; lCreateLib := .F. ; lCreateDyn := .F. ; lAcceptCFlag := .F. ; lAcceptLDFlag := .F. CASE cParamL == "-hbcc" ; hbmk[ _HBMK_lInfo ] := .F. ; lStopAfterHarbour := .F. ; lStopAfterCComp := .F. ; lAcceptCFlag := .T. CASE cParamL == "-hblnk" ; hbmk[ _HBMK_lInfo ] := .F. ; lStopAfterHarbour := .F. ; lStopAfterCComp := .F. ; lAcceptLDFlag := .T. CASE cParamL == "-rtlink" .OR. ; @@ -1217,6 +1218,7 @@ FUNCTION hbmk( aArgs, /* @ */ lPause, /* @ */ lUTF8 ) CASE Left( cParamL, 6 ) == "-comp=" .OR. ; Left( cParamL, 6 ) == "-arch=" .OR. ; cParamL == "-hbrun" .OR. ; + cParamL == "-hbraw" .OR. ; cParamL == "-hbcmp" .OR. ; cParamL == "-hbcc" .OR. ; cParamL == "-hblnk" .OR. ; @@ -2746,8 +2748,10 @@ FUNCTION hbmk( aArgs, /* @ */ lPause, /* @ */ lUTF8 ) IF ! lSkipBuild .AND. ! lStopAfterInit FOR EACH tmp IN hbmk[ _HBMK_aINCPATH ] AAdd( hbmk[ _HBMK_aOPTPRG ], "-i" + tmp ) - AAdd( hbmk[ _HBMK_aOPTC ], StrTran( cOptIncMask, "{DI}", tmp ) ) - AAdd( hbmk[ _HBMK_aOPTRES ], StrTran( cOptIncMask, "{DI}", tmp ) ) + IF ! lStopAfterHarbour + AAdd( hbmk[ _HBMK_aOPTC ], StrTran( cOptIncMask, "{DI}", tmp ) ) + AAdd( hbmk[ _HBMK_aOPTRES ], StrTran( cOptIncMask, "{DI}", tmp ) ) + ENDIF NEXT ENDIF @@ -4830,7 +4834,8 @@ STATIC PROCEDURE HBM_Load( hbmk, aParams, cFileName, /* @ */ nEmbedLevel ) nEmbedLevel++ HBM_Load( hbmk, aParams, PathProc( cParam, cFileName ), @nEmbedLevel ) /* Load parameters from script file */ ENDIF - CASE Lower( FN_ExtGet( cParam ) ) == ".hbm" + CASE Lower( FN_ExtGet( cParam ) ) == ".hbm" .OR. ; + Lower( FN_ExtGet( cParam ) ) == ".hbp" IF nEmbedLevel < 10 nEmbedLevel++ HBM_Load( hbmk, aParams, PathProc( cParam, cFileName ), @nEmbedLevel ) /* Load parameters from script file */ @@ -5888,6 +5893,7 @@ STATIC PROCEDURE ShowHelp( hbmk, lLong ) { "-alltarget" , I_( "marks beginning of common options belonging to all targets (available on command line only)" ) },; NIL,; { "-hbrun" , I_( "run target" ) },; + { "-hbraw" , I_( "stop after running Harbour compiler" ) },; { "-hbcmp|-clipper" , I_( "stop after creating the object files\ncreate link/copy hbmk to hbcmp/clipper for the same effect" ) },; { "-hbcc" , I_( "stop after creating the object files and accept raw C flags\ncreate link/copy hbmk to hbcc for the same effect" ) },; { "-hblnk" , I_( "accept raw linker flags" ) },;