2009-05-02 22:09 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* utils/hbmk2/hbmk2.prg
* Cleanup: Added few internal constants.
* Cleanup: Some debug strings marked as non-translatable.
+ Help screen forming changed to be friendly to translators.
Please update .pot files.
This commit is contained in:
@@ -17,6 +17,13 @@
|
||||
past entries belonging to these authors: Viktor Szakats.
|
||||
*/
|
||||
|
||||
2009-05-02 22:09 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
|
||||
* utils/hbmk2/hbmk2.prg
|
||||
* Cleanup: Added few internal constants.
|
||||
* Cleanup: Some debug strings marked as non-translatable.
|
||||
+ Help screen forming changed to be friendly to translators.
|
||||
Please update .pot files.
|
||||
|
||||
2009-05-02 12:10 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
|
||||
* utils/hbmk2/hbmk2.prg
|
||||
* Minor cleanups. (func/proc scopes)
|
||||
|
||||
@@ -115,6 +115,16 @@
|
||||
#define _HEAD_PARTIAL 1
|
||||
#define _HEAD_FULL 2
|
||||
|
||||
#define _COMPDET_bBlock 1
|
||||
#define _COMPDET_cCOMP 2
|
||||
|
||||
#define _COMPDETE_bBlock 1
|
||||
#define _COMPDETE_cARCH 2
|
||||
#define _COMPDETE_cCOMP 3
|
||||
#define _COMPDETE_cCCPREFIX 4
|
||||
|
||||
#define _WORKDIR_DEF_ ".hbmk"
|
||||
|
||||
ANNOUNCE HB_GTSYS
|
||||
REQUEST HB_GT_CGI_DEFAULT
|
||||
|
||||
@@ -436,8 +446,7 @@ FUNCTION hbmk( aArgs )
|
||||
tmp := "${hb_root}hbmk2.${lng}.hbl"
|
||||
tmp := StrTran( tmp, "${hb_root}", PathSepToSelf( DirAddPathSep( hb_DirBase() ) ) )
|
||||
tmp := StrTran( tmp, "${lng}", s_cUILNG )
|
||||
tmp := hb_MemoRead( tmp )
|
||||
IF hb_i18n_check( tmp )
|
||||
IF hb_i18n_check( tmp := hb_MemoRead( tmp ) )
|
||||
hb_i18n_set( hb_i18n_restoretable( tmp ) )
|
||||
ENDIF
|
||||
ENDIF
|
||||
@@ -712,16 +721,16 @@ FUNCTION hbmk( aArgs )
|
||||
IF Empty( s_cCOMP ) .AND. ! Empty( aCOMPDET )
|
||||
/* Look for this compiler first */
|
||||
FOR tmp := 1 TO Len( aCOMPDET )
|
||||
IF aCOMPDET[ tmp ][ 2 ] == cSelfCOMP .AND. Eval( aCOMPDET[ tmp ][ 1 ] )
|
||||
s_cCOMP := aCOMPDET[ tmp ][ 2 ]
|
||||
IF aCOMPDET[ tmp ][ _COMPDET_cCOMP ] == cSelfCOMP .AND. Eval( aCOMPDET[ tmp ][ _COMPDET_bBlock ] )
|
||||
s_cCOMP := aCOMPDET[ tmp ][ _COMPDET_cCOMP ]
|
||||
EXIT
|
||||
ENDIF
|
||||
NEXT
|
||||
IF Empty( s_cCOMP )
|
||||
/* Check the rest of compilers */
|
||||
FOR tmp := 1 TO Len( aCOMPDET )
|
||||
IF !( aCOMPDET[ tmp ][ 2 ] == cSelfCOMP ) .AND. Eval( aCOMPDET[ tmp ][ 1 ] )
|
||||
s_cCOMP := aCOMPDET[ tmp ][ 2 ]
|
||||
IF !( aCOMPDET[ tmp ][ _COMPDET_cCOMP ] == cSelfCOMP ) .AND. Eval( aCOMPDET[ tmp ][ _COMPDET_bBlock ] )
|
||||
s_cCOMP := aCOMPDET[ tmp ][ _COMPDET_cCOMP ]
|
||||
EXIT
|
||||
ENDIF
|
||||
NEXT
|
||||
@@ -730,10 +739,10 @@ FUNCTION hbmk( aArgs )
|
||||
IF Empty( s_cCOMP ) .AND. s_cARCH $ "win|wce"
|
||||
/* Autodetect embedded MinGW installation */
|
||||
FOR tmp := 1 TO Len( aCOMPDET_LOCAL )
|
||||
IF s_cARCH == aCOMPDET_LOCAL[ tmp ][ 2 ] .AND. ;
|
||||
! Empty( tmp1 := Eval( aCOMPDET_LOCAL[ tmp ][ 1 ], aCOMPDET_LOCAL[ tmp ][ 4 ] ) )
|
||||
s_cCOMP := aCOMPDET_LOCAL[ tmp ][ 3 ]
|
||||
s_cCCPREFIX := aCOMPDET_LOCAL[ tmp ][ 4 ]
|
||||
IF s_cARCH == aCOMPDET_LOCAL[ tmp ][ _COMPDETE_cARCH ] .AND. ;
|
||||
! Empty( tmp1 := Eval( aCOMPDET_LOCAL[ tmp ][ _COMPDETE_bBlock ], aCOMPDET_LOCAL[ tmp ][ _COMPDETE_cCCPREFIX ] ) )
|
||||
s_cCOMP := aCOMPDET_LOCAL[ tmp ][ _COMPDETE_cCOMP ]
|
||||
s_cCCPREFIX := aCOMPDET_LOCAL[ tmp ][ _COMPDETE_cCCPREFIX ]
|
||||
s_cCCPATH := tmp1
|
||||
EXIT
|
||||
ENDIF
|
||||
@@ -765,12 +774,12 @@ FUNCTION hbmk( aArgs )
|
||||
IF s_cARCH $ "win|wce"
|
||||
/* Detect cross platform CCPREFIX and CCPATH if embedded MinGW installation is detected */
|
||||
FOR tmp := 1 TO Len( aCOMPDET_LOCAL )
|
||||
IF aCOMPDET_LOCAL[ tmp ][ 2 ] == s_cARCH .AND. ;
|
||||
aCOMPDET_LOCAL[ tmp ][ 3 ] == s_cCOMP
|
||||
IF ! Empty( tmp1 := Eval( aCOMPDET_LOCAL[ tmp ][ 1 ], aCOMPDET_LOCAL[ tmp ][ 4 ] ) )
|
||||
IF aCOMPDET_LOCAL[ tmp ][ _COMPDETE_cARCH ] == s_cARCH .AND. ;
|
||||
aCOMPDET_LOCAL[ tmp ][ _COMPDETE_cCOMP ] == s_cCOMP
|
||||
IF ! Empty( tmp1 := Eval( aCOMPDET_LOCAL[ tmp ][ _COMPDETE_bBlock ], aCOMPDET_LOCAL[ tmp ][ _COMPDETE_cCCPREFIX ] ) )
|
||||
s_cCCPATH := tmp1
|
||||
ENDIF
|
||||
s_cCCPREFIX := aCOMPDET_LOCAL[ tmp ][ 4 ]
|
||||
s_cCCPREFIX := aCOMPDET_LOCAL[ tmp ][ _COMPDETE_cCCPREFIX ]
|
||||
EXIT
|
||||
ENDIF
|
||||
NEXT
|
||||
@@ -1391,7 +1400,7 @@ FUNCTION hbmk( aArgs )
|
||||
IF ! lStopAfterInit
|
||||
IF s_lINC
|
||||
IF cWorkDir == NIL
|
||||
cWorkDir := ".hbmk" + hb_osPathSeparator() + s_cARCH + hb_osPathSeparator() + s_cCOMP
|
||||
cWorkDir := _WORKDIR_DEF_ + hb_osPathSeparator() + s_cARCH + hb_osPathSeparator() + s_cCOMP
|
||||
ENDIF
|
||||
AAdd( s_aOPTPRG, "-o" + cWorkDir + hb_osPathSeparator() ) /* NOTE: Ending path sep is important. */
|
||||
IF ! DirBuild( cWorkDir )
|
||||
@@ -2377,7 +2386,7 @@ FUNCTION hbmk( aArgs )
|
||||
tmp := "/* Automatically generated by hbmk. Do not edit. */" + Chr( 10 ) +;
|
||||
"#define _HBMK_VCS_TYPE_ " + Chr( 34 ) + tmp2 + Chr( 34 ) + Chr( 10 ) +;
|
||||
"#define _HBMK_VCS_ID_ " + Chr( 34 ) + tmp1 + Chr( 34 ) + Chr( 10 )
|
||||
/* Update only if necessary to trigger rebuild only if really needed */
|
||||
/* Update only if something changed to trigger rebuild only if really needed */
|
||||
IF !( hb_MemoRead( s_cVCSHEAD ) == tmp )
|
||||
IF s_lInfo
|
||||
OutStd( hb_StrFormat( I_( "hbmk: Generating VCS header: %1$s" ), s_cVCSHEAD ), hb_osNewLine() )
|
||||
@@ -2408,7 +2417,7 @@ FUNCTION hbmk( aArgs )
|
||||
s_aC_DONE := {}
|
||||
FOR EACH tmp IN s_aC
|
||||
IF s_lDEBUGINC
|
||||
OutStd( hb_StrFormat( I_( "hbmk: debuginc: C %1$s %2$s" ), tmp, FN_DirExtSet( tmp, cWorkDir, cObjExt ) ), hb_osNewLine() )
|
||||
OutStd( hb_StrFormat( "hbmk: debuginc: C %1$s %2$s", tmp, FN_DirExtSet( tmp, cWorkDir, cObjExt ) ), hb_osNewLine() )
|
||||
ENDIF
|
||||
IF ! hb_FGetDateTime( FN_DirExtSet( tmp, cWorkDir, cObjExt ), @tmp2 ) .OR. ;
|
||||
! hb_FGetDateTime( tmp, @tmp1 ) .OR. ;
|
||||
@@ -2442,7 +2451,7 @@ FUNCTION hbmk( aArgs )
|
||||
s_aPRG_TODO := {}
|
||||
FOR EACH tmp IN s_aPRG
|
||||
IF s_lDEBUGINC
|
||||
OutStd( hb_StrFormat( I_( "hbmk: debuginc: PRG %1$s %2$s" ),;
|
||||
OutStd( hb_StrFormat( "hbmk: debuginc: PRG %1$s %2$s",;
|
||||
FN_ExtSet( tmp, ".prg" ),;
|
||||
FN_DirExtSet( tmp, cWorkDir, ".c" ) ), hb_osNewLine() )
|
||||
ENDIF
|
||||
@@ -2682,7 +2691,7 @@ FUNCTION hbmk( aArgs )
|
||||
s_aRESSRC_TODO := {}
|
||||
FOR EACH tmp IN s_aRESSRC
|
||||
IF s_lDEBUGINC
|
||||
OutStd( hb_StrFormat( I_( "hbmk: debuginc: RESSRC %1$s %2$s" ), tmp, FN_DirExtSet( tmp, cWorkDir, cResExt ) ), hb_osNewLine() )
|
||||
OutStd( hb_StrFormat( "hbmk: debuginc: RESSRC %1$s %2$s", tmp, FN_DirExtSet( tmp, cWorkDir, cResExt ) ), hb_osNewLine() )
|
||||
ENDIF
|
||||
IF ! hb_FGetDateTime( FN_DirExtSet( tmp, cWorkDir, cResExt ), @tmp2 ) .OR. ;
|
||||
! hb_FGetDateTime( tmp, @tmp1 ) .OR. ;
|
||||
@@ -2787,7 +2796,7 @@ FUNCTION hbmk( aArgs )
|
||||
s_aPRG_DONE := {}
|
||||
FOR EACH tmp IN s_aPRG
|
||||
IF s_lDEBUGINC
|
||||
OutStd( hb_StrFormat( I_( "hbmk: debuginc: CPRG %1$s %2$s" ),;
|
||||
OutStd( hb_StrFormat( "hbmk: debuginc: CPRG %1$s %2$s",;
|
||||
FN_DirExtSet( tmp, cWorkDir, ".c" ),;
|
||||
FN_DirExtSet( tmp, cWorkDir, cObjExt ) ), hb_osNewLine() )
|
||||
ENDIF
|
||||
@@ -2936,7 +2945,7 @@ FUNCTION hbmk( aArgs )
|
||||
IF s_lINC .AND. ! s_lREBUILD
|
||||
|
||||
IF s_lDEBUGINC
|
||||
OutStd( hb_StrFormat( I_( "hbmk: debuginc: target %1$s" ), s_cPROGNAME ), hb_osNewLine() )
|
||||
OutStd( hb_StrFormat( "hbmk: debuginc: target %1$s", s_cPROGNAME ), hb_osNewLine() )
|
||||
ENDIF
|
||||
|
||||
IF hb_FGetDateTime( s_cPROGNAME, @tTarget )
|
||||
@@ -2945,7 +2954,7 @@ FUNCTION hbmk( aArgs )
|
||||
IF lTargetUpToDate
|
||||
FOR EACH tmp IN ArrayAJoin( { s_aOBJ, s_aOBJUSER, s_aOBJA, s_aRESSRC, s_aRESCMP } )
|
||||
IF s_lDEBUGINC
|
||||
OutStd( hb_StrFormat( I_( "hbmk: debuginc: EXEDEP %1$s" ), tmp ), hb_osNewLine() )
|
||||
OutStd( hb_StrFormat( "hbmk: debuginc: EXEDEP %1$s", tmp ), hb_osNewLine() )
|
||||
ENDIF
|
||||
IF ! hb_FGetDateTime( tmp, @tmp1 ) .OR. tmp1 > tTarget
|
||||
lTargetUpToDate := .F.
|
||||
@@ -2958,7 +2967,7 @@ FUNCTION hbmk( aArgs )
|
||||
FOR EACH tmp IN s_aLIBRAW
|
||||
IF ! Empty( tmp2 := FindLib( tmp, s_aLIBPATH, cLibExt ) )
|
||||
IF s_lDEBUGINC
|
||||
OutStd( hb_StrFormat( I_( "hbmk: debuginc: EXEDEPLIB %1$s" ), tmp2 ), hb_osNewLine() )
|
||||
OutStd( hb_StrFormat( "hbmk: debuginc: EXEDEPLIB %1$s", tmp2 ), hb_osNewLine() )
|
||||
ENDIF
|
||||
IF ! hb_FGetDateTime( tmp2, @tmp1 ) .OR. tmp1 > tTarget
|
||||
lTargetUpToDate := .F.
|
||||
@@ -3384,7 +3393,7 @@ STATIC FUNCTION FindNewerHeaders( cFileName, cParentDir, tTimeParent, lIncTry, l
|
||||
hb_HSet( headstate[ _HEADSTATE_hFiles ], cFileName, .T. )
|
||||
|
||||
IF s_lDEBUGINC
|
||||
OutStd( hb_StrFormat( I_( "hbmk: debuginc: HEADER %1$s" ), cFileName ), hb_osNewLine() )
|
||||
OutStd( hb_StrFormat( "hbmk: debuginc: HEADER %1$s", cFileName ), hb_osNewLine() )
|
||||
ENDIF
|
||||
|
||||
IF ! hb_FGetDateTime( cFileName, @tTimeSelf )
|
||||
@@ -3469,8 +3478,8 @@ STATIC FUNCTION FindHeader( cFileName, cParentDir, aINCTRYPATH )
|
||||
/* Add these dir to include paths */
|
||||
IF AScan( s_aINCPATH, { |tmp| tmp == cDir } ) == 0
|
||||
AAdd( s_aINCPATH, cDir )
|
||||
IF s_lDEBUGINC
|
||||
OutStd( hb_StrFormat( I_( "hbmk: debuginc: Autodetected header dir for %1$s: %2$s" ), cFileName, cDir ), hb_osNewLine() )
|
||||
IF s_lINFO
|
||||
OutStd( hb_StrFormat( I_( "hbmk: Autodetected header dir for %1$s: %2$s" ), cFileName, cDir ), hb_osNewLine() )
|
||||
ENDIF
|
||||
ENDIF
|
||||
RETURN DirAddPathSep( PathSepToSelf( cDir ) ) + cFileName
|
||||
@@ -3891,7 +3900,7 @@ STATIC FUNCTION DirBuild( cDir )
|
||||
IF hb_DirCreate( cDirTemp ) != 0
|
||||
RETURN .F.
|
||||
ENDIF
|
||||
IF Lower( cDirItem ) == ".hbmk"
|
||||
IF Lower( cDirItem ) == _WORKDIR_DEF_
|
||||
hb_FSetAttr( cDirTemp, FC_HIDDEN )
|
||||
ENDIF
|
||||
ENDIF
|
||||
@@ -5188,133 +5197,156 @@ STATIC PROCEDURE ShowHelp( lLong )
|
||||
I_( " " ),;
|
||||
I_( " hbmk [options] [<script[s]>] <src[s][.prg|.c|.obj|.o|.rc|.res|.pot|.hbl]>" ),;
|
||||
I_( " " ),;
|
||||
I_( "Options:" ),;
|
||||
I_( " -o<outname> output file name" ),;
|
||||
I_( " -l<libname> link with <libname> library" ),;
|
||||
I_( " -L<libpath> additional path to search for libraries" ),;
|
||||
I_( " -i<p>|-incpath=<p> additional path to search for headers" ),;
|
||||
I_( " -static|-shared link with static/shared libs" ),;
|
||||
I_( " -mt|-st link with multi/single-thread VM" ),;
|
||||
I_( " -gt<name> link with GT<name> GT driver, can be repeated to link" ),;
|
||||
I_( " with more GTs. First one will be the default at runtime" ) }
|
||||
I_( "Options:" ) }
|
||||
|
||||
LOCAL aText_Help := {;
|
||||
I_( " -help|--help long help" ) }
|
||||
LOCAL aText_Notes := {;
|
||||
I_( " " ),;
|
||||
I_( "Notes:" ) }
|
||||
|
||||
LOCAL aText_Long := {;
|
||||
LOCAL aText_Supp := {;
|
||||
I_( " " ),;
|
||||
I_( " -gui|-std create GUI/console executable" ),;
|
||||
I_( " -main=<mainfunc> override the name of starting function/procedure" ),;
|
||||
I_( " -fullstatic link with all static libs" ),;
|
||||
I_( " -nulrdd[-] link with nulrdd" ),;
|
||||
I_( " -[no]debug add/exclude C compiler debug info" ),;
|
||||
I_( " -[no]opt toggle C compiler optimizations (default: on)" ),;
|
||||
I_( " -[no]map create (or not) a map file" ),;
|
||||
I_( " -[no]strip strip (no strip) binaries" ),;
|
||||
I_( " -[no]trace show commands executed" ),;
|
||||
I_( " -traceonly show commands to be executed, but don't execute them" ),;
|
||||
I_( " -[no]compr[=lev] compress executable/dynamic lib (needs UPX)" ),;
|
||||
I_( " <lev> can be: min, max, def" ),;
|
||||
I_( " -[no]run run/don't run output executable" ),;
|
||||
I_( " -vcshead=<file> generate .ch header file with local repository information" ),;
|
||||
I_( " SVN, Git and Mercurial are currently supported. Generated" ),;
|
||||
I_( " header will define macro _HBMK_VCS_TYPE_ with the name of" ),;
|
||||
I_( " detected VCS and _HBMK_VCS_ID_ with the unique ID of local" ),;
|
||||
I_( " repository" ),;
|
||||
I_( " -nohbp do not process .hbp files in current directory" ),;
|
||||
I_( " -stop stop without doing anything" ),;
|
||||
I_( " " ),;
|
||||
I_( " -bldf[-] inherit all/no (default) flags from Harbour build" ),;
|
||||
I_( " -bldf=[p][c][l] inherit .prg/.c/linker flags (or none) from Harbour build" ),;
|
||||
I_( " -inctrypath=<p> additional path to autodetect .c header locations" ),;
|
||||
I_( " -prgflag=<f> pass flag to Harbour" ),;
|
||||
I_( " -cflag=<f> pass flag to C compiler" ),;
|
||||
I_( " -resflag=<f> pass flag to resource compiler (Windows only)" ),;
|
||||
I_( " -ldflag=<f> pass flag to linker (executable)" ),;
|
||||
I_( " -aflag=<f> pass flag to linker (static library)" ),;
|
||||
I_( " -dflag=<f> pass flag to linker (dynamic library)" ),;
|
||||
I_( " -runflag=<f> pass flag to output executable when -run option is used" ),;
|
||||
I_( " -jobs=<n> start n compilation threads (MT platforms/builds only)" ),;
|
||||
I_( " -inc enable incremental build mode" ),;
|
||||
I_( " -[no]head[=<m>] control source header parsing (in incremental build mode)" ),;
|
||||
I_( " <m> can be: full, partial (default), off" ),;
|
||||
I_( " -rebuild rebuild all (in incremental build mode)" ),;
|
||||
I_( " -clean clean (in incremental build mode)" ),;
|
||||
I_( " -workdir=<dir> working directory for incremental build mode" ),;
|
||||
I_( " (default: arch/comp)" ),;
|
||||
I_( " " ),;
|
||||
I_( " -hbl[=<output>] output .hbl filename. ${lng} macro is accepted in filename" ),;
|
||||
I_( " -lng=<languages> list of languages to be replaced in ${lng} macros in .pot" ),;
|
||||
I_( " filenames and output .hbl filenames. Comma separared list:" ),;
|
||||
I_( " -lng=en-EN,hu-HU,de" ),;
|
||||
I_( " " ),;
|
||||
I_( " -hbcmp|-clipper stop after creating the object files" ),;
|
||||
I_( " create link/copy hbmk to hbcmp/clipper for the same effect" ),;
|
||||
I_( " -hbcc stop after creating the object files and accept raw C flags" ),;
|
||||
I_( " create link/copy hbmk to hbcc for the same effect" ),;
|
||||
I_( " -hblnk accept raw linker flags" ),;
|
||||
I_( " -hblib create static library" ),;
|
||||
I_( " -hbdyn create dynamic library" ),;
|
||||
I_( " -rtlink " ),;
|
||||
I_( " -blinker " ),;
|
||||
I_( " -exospace emulate Clipper compatible linker behavior" ),;
|
||||
I_( " create link/copy hbmk to rtlink/blinker/exospace for the" ),;
|
||||
I_( " same effect" ),;
|
||||
I_( " --hbdirbin output Harbour binary directory" ),;
|
||||
I_( " --hbdirdyn output Harbour dynamic library directory" ),;
|
||||
I_( " --hbdirlib output Harbour static library directory" ),;
|
||||
I_( " --hbdirinc output Harbour header directory" ),;
|
||||
I_( " " ),;
|
||||
I_( " -arch=<arch> assume specific architecure. Same as HB_ARCHITECTURE envvar" ),;
|
||||
I_( " -comp=<comp> use specific compiler. Same as HB_COMPILER envvar" ),;
|
||||
I_( " Special value:" ),;
|
||||
I_( " - bld: use original build settings (default on *nix)" ),;
|
||||
I_( " --version display version header only" ),;
|
||||
I_( " -info turn on informational messages" ),;
|
||||
I_( " -quiet suppress all screen messages" ),;
|
||||
I_( " " ),;
|
||||
I_( "Notes:" ),;
|
||||
I_( " - <script> can be <@script> (.hbm file), <script.hbm> or <script.hbp>." ),;
|
||||
I_( " - Regular Harbour compiler options are also accepted." ),;
|
||||
I_( " - Multiple -l, -L and <script> parameters are accepted." ),;
|
||||
I_( " - " + HBMK_CFG_NAME + " option file in hbmk directory is always processed if it" ),;
|
||||
I_( " exists. On *nix platforms ~/.harbour, /etc/harbour, <base>/etc/harbour," ),;
|
||||
I_( " <base>/etc are checked (in that order) before the hbmk directory." ),;
|
||||
I_( " The file format is the same as .hbp." ),;
|
||||
I_( " - .hbp option files in current dir are automatically processed." ),;
|
||||
I_( " - .hbp options (they should come in separate lines):" ),;
|
||||
I_( " libs=[<libname[s]>], gt=[gtname], prgflags=[Harbour flags]," ),;
|
||||
I_( " cflags=[C compiler flags], resflags=[resource compiler flags]," ),;
|
||||
I_( " ldflags=[Linker flags], libpaths=[paths], pots=[.pot files]," ),;
|
||||
I_( " incpaths=[paths], inctrypaths=[paths]" ),;
|
||||
I_( " gui|mt|shared|nulrdd|debug|opt|map|strip|run|inc=[yes|no]" ),;
|
||||
I_( " compr=[yes|no|def|min|max], head=[off|partial|full], echo=<text>" ),;
|
||||
I_( " Lines starting with '#' char are ignored" ),;
|
||||
I_( " - Platform filters are accepted in each .hbp line and with several options." ),;
|
||||
I_( " Filter format: {[!][<arch>|<comp>|<keyword>]}. Filters can be combined " ),;
|
||||
I_( " using '&', '|' operators and grouped by parantheses." ),;
|
||||
I_( " Ex.: {win}, {gcc}, {linux|darwin}, {win&!pocc}, {(win|linux)&!owatcom}," ),;
|
||||
I_( " {unix&mt&gui}, -cflag={win}-DMYDEF, -stop{dos}, -stop{!allwin}," ),;
|
||||
I_( " {allpocc}, {allgcc}, {allmingw}, {allmsvc}, {x86|x86_64|ia64|arm}" ),;
|
||||
I_( " - Certain .hbp lines (prgflags=, cflags=, ldflags=, libpaths=, inctrypaths=," ),;
|
||||
I_( " echo=) and corresponding command line parameters will accept macros:" ),;
|
||||
I_( " ${hb_root}, ${hb_self}, ${hb_arch}, ${hb_comp}, ${hb_cpu}, ${<envvar>}" ),;
|
||||
I_( " - Defaults and feature support vary by architecture/compiler." ),;
|
||||
I_( " - Supported <comp> values for each supported <arch> value:" ),;
|
||||
I_( " linux : gcc, owatcom, icc" ),;
|
||||
I_( " darwin : gcc" ),;
|
||||
I_( " win : mingw, msvc, bcc, owatcom, icc, pocc, cygwin," ),;
|
||||
I_( " mingw64, msvc64, msvcia64, iccia64, pocc64, xcc" ),;
|
||||
I_( " wce : mingwarm, msvcarm, poccarm" ),;
|
||||
I_( " os2 : gcc, owatcom" ),;
|
||||
I_( " dos : djgpp, owatcom" ),;
|
||||
I_( " bsd : gcc" ),;
|
||||
I_( " hpux : gcc" ),;
|
||||
I_( " sunos : gcc" ) }
|
||||
I_( "Supported <comp> values for each supported <arch> value:" ),;
|
||||
" - linux : gcc, owatcom, icc",;
|
||||
" - darwin : gcc",;
|
||||
" - win : mingw, msvc, bcc, owatcom, icc, pocc, cygwin,",;
|
||||
" - mingw64, msvc64, msvcia64, iccia64, pocc64, xcc",;
|
||||
" - wce : mingwarm, msvcarm, poccarm",;
|
||||
" - os2 : gcc, owatcom",;
|
||||
" - dos : djgpp, owatcom",;
|
||||
" - bsd : gcc",;
|
||||
" - hpux : gcc",;
|
||||
" - sunos : gcc" }
|
||||
|
||||
LOCAL aOpt_Basic := {;
|
||||
{ "-o<outname>" , I_( "output file name" ) },;
|
||||
{ "-l<libname>" , I_( "link with <libname> library" ) },;
|
||||
{ "-L<libpath>" , I_( "additional path to search for libraries" ) },;
|
||||
{ "-i<p>|-incpath=<p>", I_( "additional path to search for headers" ) },;
|
||||
{ "-static|-shared" , I_( "link with static/shared libs" ) },;
|
||||
{ "-mt|-st" , I_( "link with multi/single-thread VM" ) },;
|
||||
{ "-gt<name>" , I_( "link with GT<name> GT driver, can be repeated to link with more GTs. First one will be the default at runtime" ) } }
|
||||
|
||||
LOCAL aOpt_Help := {;
|
||||
{ "-help|--help" , I_( "long help" ) } }
|
||||
|
||||
LOCAL aOpt_Long := {;
|
||||
{},;
|
||||
{ "-gui|-std" , I_( "create GUI/console executable" ) },;
|
||||
{ "-main=<mainfunc>" , I_( "override the name of starting function/procedure" ) },;
|
||||
{ "-fullstatic" , I_( "link with all static libs" ) },;
|
||||
{ "-nulrdd[-]" , I_( "link with nulrdd" ) },;
|
||||
{ "-[no]debug" , I_( "add/exclude C compiler debug info" ) },;
|
||||
{ "-[no]opt" , I_( "toggle C compiler optimizations (default: on)" ) },;
|
||||
{ "-[no]map" , I_( "create (or not) a map file" ) },;
|
||||
{ "-[no]strip" , I_( "strip (no strip) binaries" ) },;
|
||||
{ "-[no]trace" , I_( "show commands executed" ) },;
|
||||
{ "-traceonly" , I_( "show commands to be executed, but don't execute them" ) },;
|
||||
{ "-[no]compr[=lev]" , I_( "compress executable/dynamic lib (needs UPX)\n<lev> can be: min, max, def" ) },;
|
||||
{ "-[no]run" , I_( "run/don't run output executable" ) },;
|
||||
{ "-vcshead=<file>" , I_( "generate .ch header file with local repository information SVN, Git and Mercurial are currently supported. Generated header will define macro _HBMK_VCS_TYPE_ with the name of detected VCS and _HBMK_VCS_ID_ with the unique ID of local repository" ) },;
|
||||
{ "-nohbp" , I_( "do not process .hbp files in current directory" ) },;
|
||||
{ "-stop" , I_( "stop without doing anything" ) },;
|
||||
{},;
|
||||
{ "-bldf[-]" , I_( "inherit all/no (default) flags from Harbour build" ) },;
|
||||
{ "-bldf=[p][c][l]" , I_( "inherit .prg/.c/linker flags (or none) from Harbour build" ) },;
|
||||
{ "-inctrypath=<p>" , I_( "additional path to autodetect .c header locations" ) },;
|
||||
{ "-prgflag=<f>" , I_( "pass flag to Harbour" ) },;
|
||||
{ "-cflag=<f>" , I_( "pass flag to C compiler" ) },;
|
||||
{ "-resflag=<f>" , I_( "pass flag to resource compiler (Windows only)" ) },;
|
||||
{ "-ldflag=<f>" , I_( "pass flag to linker (executable)" ) },;
|
||||
{ "-aflag=<f>" , I_( "pass flag to linker (static library)" ) },;
|
||||
{ "-dflag=<f>" , I_( "pass flag to linker (dynamic library)" ) },;
|
||||
{ "-runflag=<f>" , I_( "pass flag to output executable when -run option is used" ) },;
|
||||
{ "-jobs=<n>" , I_( "start n compilation threads (MT platforms/builds only)" ) },;
|
||||
{ "-inc" , I_( "enable incremental build mode" ) },;
|
||||
{ "-[no]head[=<m>]" , I_( "control source header parsing (in incremental build mode)\n<m> can be: full, partial (default), off" ) },;
|
||||
{ "-rebuild" , I_( "rebuild all (in incremental build mode)" ) },;
|
||||
{ "-clean" , I_( "clean (in incremental build mode)" ) },;
|
||||
{ "-workdir=<dir>" , I_( "working directory for incremental build mode\n(default: arch/comp)" ) },;
|
||||
{},;
|
||||
{ "-hbl[=<output>]" , I_( "output .hbl filename. ${lng} macro is accepted in filename" ) },;
|
||||
{ "-lng=<languages>" , I_( "list of languages to be replaced in ${lng} macros in .pot filenames and output .hbl filenames. Comma separared list:\n-lng=en-EN,hu-HU,de" ) },;
|
||||
{},;
|
||||
{ "-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" ) },;
|
||||
{ "-hblib" , I_( "create static library" ) },;
|
||||
{ "-hbdyn" , I_( "create dynamic library" ) },;
|
||||
{ "-rtlink" , I_( " " ) },;
|
||||
{ "-blinker" , I_( " " ) },;
|
||||
{ "-exospace" , I_( "emulate Clipper compatible linker behavior\ncreate link/copy hbmk to rtlink/blinker/exospace for the same effect" ) },;
|
||||
{ "--hbdirbin" , I_( "output Harbour binary directory" ) },;
|
||||
{ "--hbdirdyn" , I_( "output Harbour dynamic library directory" ) },;
|
||||
{ "--hbdirlib" , I_( "output Harbour static library directory" ) },;
|
||||
{ "--hbdirinc" , I_( "output Harbour header directory" ) },;
|
||||
{},;
|
||||
{ "-arch=<arch>" , I_( "assume specific architecure. Same as HB_ARCHITECTURE envvar" ) },;
|
||||
{ "-comp=<comp>" , I_( "use specific compiler. Same as HB_COMPILER envvar\nSpecial value:\n - bld: use original build settings (default on *nix)" ) },;
|
||||
{ "--version" , I_( "display version header only" ) },;
|
||||
{ "-info" , I_( "turn on informational messages" ) },;
|
||||
{ "-quiet" , I_( "suppress all screen messages" ) } }
|
||||
|
||||
LOCAL aNotes := {;
|
||||
I_( "<script> can be <@script> (.hbm file), <script.hbm> or <script.hbp>." ),;
|
||||
I_( "Regular Harbour compiler options are also accepted." ),;
|
||||
I_( "Multiple -l, -L and <script> parameters are accepted." ),;
|
||||
hb_StrFormat( I_( "%1$s option file in hbmk directory is always processed if it exists. On *nix platforms ~/.harbour, /etc/harbour, <base>/etc/harbour, <base>/etc are checked (in that order) before the hbmk directory. The file format is the same as .hbp." ), HBMK_CFG_NAME ),;
|
||||
I_( ".hbp option files in current dir are automatically processed." ),;
|
||||
I_( ".hbp options (they should come in separate lines): libs=[<libname[s]>], gt=[gtname], prgflags=[Harbour flags], cflags=[C compiler flags], resflags=[resource compiler flags], ldflags=[Linker flags], libpaths=[paths], pots=[.pot files], incpaths=[paths], inctrypaths=[paths], gui|mt|shared|nulrdd|debug|opt|map|strip|run|inc=[yes|no], compr=[yes|no|def|min|max], head=[off|partial|full], echo=<text>\nLines starting with '#' char are ignored" ),;
|
||||
I_( "Platform filters are accepted in each .hbp line and with several options.\nFilter format: {[!][<arch>|<comp>|<keyword>]}. Filters can be combined using '&', '|' operators and grouped by parantheses. Ex.: {win}, {gcc}, {linux|darwin}, {win&!pocc}, {(win|linux)&!owatcom}, {unix&mt&gui}, -cflag={win}-DMYDEF, -stop{dos}, -stop{!allwin}, {allpocc}, {allgcc}, {allmingw}, {allmsvc}, {x86|x86_64|ia64|arm}" ),;
|
||||
I_( "Certain .hbp lines (prgflags=, cflags=, ldflags=, libpaths=, inctrypaths=,echo=) and corresponding command line parameters will accept macros: ${hb_root}, ${hb_self}, ${hb_arch}, ${hb_comp}, ${hb_cpu}, ${<envvar>}" ),;
|
||||
I_( "Defaults and feature support vary by architecture/compiler." ) }
|
||||
|
||||
DEFAULT lLong TO .F.
|
||||
|
||||
AEval( aText_Basic, {|tmp| OutStd( tmp + hb_osNewLine() ) } )
|
||||
AEval( iif( lLong, aText_Long, aText_Help ), {|tmp| OutStd( tmp + hb_osNewLine() ) } )
|
||||
AEval( aOpt_Basic, {|tmp| OutOpt( tmp ) } )
|
||||
IF lLong
|
||||
AEval( aOpt_Long, {|tmp| OutOpt( tmp ) } )
|
||||
AEval( aText_Notes, {|tmp| OutStd( tmp + hb_osNewLine() ) } )
|
||||
AEval( aNotes, {|tmp| OutNote( tmp ) } )
|
||||
AEval( aText_Supp, {|tmp| OutStd( tmp + hb_osNewLine() ) } )
|
||||
ELSE
|
||||
AEval( aOpt_Help, {|tmp| OutOpt( tmp ) } )
|
||||
ENDIF
|
||||
|
||||
RETURN
|
||||
|
||||
STATIC PROCEDURE OutOpt( aOpt )
|
||||
LOCAL nLine
|
||||
LOCAL nLines
|
||||
|
||||
IF Empty( aOpt )
|
||||
OutStd( hb_osNewLine() )
|
||||
ELSE
|
||||
aOpt[ 2 ] := StrTran( aOpt[ 2 ], "\n", hb_osNewLine() )
|
||||
nLines := MLCount( aOpt[ 2 ], MaxCol() - 21 )
|
||||
FOR nLine := 1 TO nLines
|
||||
OutStd( " " )
|
||||
IF nLine == 1
|
||||
OutStd( PadR( aOpt[ 1 ], 19 ) )
|
||||
ELSE
|
||||
OutStd( Space( 19 ) )
|
||||
ENDIF
|
||||
OutStd( MemoLine( aOpt[ 2 ], MaxCol() - 21, nLine ) + hb_osNewLine() )
|
||||
NEXT
|
||||
ENDIF
|
||||
|
||||
RETURN
|
||||
|
||||
STATIC PROCEDURE OutNote( cText )
|
||||
LOCAL nLine
|
||||
LOCAL nLines
|
||||
|
||||
cText := StrTran( cText, "\n", hb_osNewLine() )
|
||||
nLines := MLCount( cText, MaxCol() - 4 )
|
||||
FOR nLine := 1 TO nLines
|
||||
IF nLine == 1
|
||||
OutStd( " - " )
|
||||
ELSE
|
||||
OutStd( " " )
|
||||
ENDIF
|
||||
OutStd( MemoLine( cText, MaxCol() - 4, nLine ) + hb_osNewLine() )
|
||||
NEXT
|
||||
|
||||
RETURN
|
||||
|
||||
Reference in New Issue
Block a user