diff --git a/harbour/ChangeLog b/harbour/ChangeLog index f44495a60d..63df068613 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,20 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-08-01 19:49 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * config/global.cf + * Changed HB_BUILD_SUBDIR to HB_BUILD_NAME. + ! HB_BUILD_NAME fixes after initial testing. Should be okay now. + + * INSTALL + + Documented new HB_BUILD_NAME setting. + + * utils/hbmk2/hbmk2.prg + * utils/hbmk2/hbmk2.pt_BR.po + * utils/hbmk2/hbmk2.hu_HU.po + + Added support for -build= option. This is similar to HB_BUILD_NAME + when building Harbour. Also added ${hb_build} macro. + 2009-08-01 17:48 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * contrib/xhb/hblog.prg + Added HB_LogConsole:Out() method from xhb. diff --git a/harbour/INSTALL b/harbour/INSTALL index 2ae27d17ad..c5d0ef4b96 100644 --- a/harbour/INSTALL +++ b/harbour/INSTALL @@ -261,6 +261,13 @@ OPTIONS AVAILABLE WHEN BUILDING HARBOUR full clean + install cycles will automatically be executed, so you don't have to explicitly pass them to make_gnu.bat. + - HB_BUILD_NAME= Create named build. This allows to keep + multiple builds in parallel for any given + architecture/compiler. F.e. debug / release. + NOTE: In current implementation it's + a directory name, so all filesystem/platform + name rules apply, best to keep it 8 lowercase + ASCII chars max. - HB_BUILD_DEBUG=yes Create a debug build. - HB_BUILD_OPTIM=no Disable C compiler optimizations. - HB_BUILD_MODE=[cpp|c] Changes default build mode to C++ or C. diff --git a/harbour/config/global.cf b/harbour/config/global.cf index 4298bdba01..d73a9fdddf 100644 --- a/harbour/config/global.cf +++ b/harbour/config/global.cf @@ -332,10 +332,11 @@ endif export HB_ARCHITECTURE export HB_COMPILER -GRANDP = ../../../ +GRANDP := ../../../ ARCH_COMP := $(HB_ARCHITECTURE)/$(HB_COMPILER) -ifneq ($(HB_BUILD_SUBDIR),) - ARCH_COMP += /$(subst \,/,$(HB_BUILD_SUBDIR)) +ifneq ($(HB_BUILD_NAME),) + GRANDP := $(GRANDP)../ + ARCH_COMP := $(ARCH_COMP)/$(subst \,/,$(HB_BUILD_NAME)) endif OBJ_DIR := obj/$(ARCH_COMP) EXE_DIR := $(TOP)$(ROOT)bin/$(ARCH_COMP) @@ -534,6 +535,6 @@ export HB_HOST_BIN_DIR include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/global.cf include $(TOP)$(ROOT)config/globsh.cf -include $(TOP)$(ROOT)config/$(ARCH_COMP).cf +include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/$(HB_COMPILER).cf endif diff --git a/harbour/utils/hbmk2/hbmk2.hu_HU.po b/harbour/utils/hbmk2/hbmk2.hu_HU.po index 5902188593..8f6ba46b2e 100644 --- a/harbour/utils/hbmk2/hbmk2.hu_HU.po +++ b/harbour/utils/hbmk2/hbmk2.hu_HU.po @@ -559,8 +559,8 @@ msgstr "visszat #: hbmk2.prg:5769 #, c-format -msgid "Certain .hbc lines (libs=, hbcs=, prgflags=, cflags=, ldflags=, libpaths=, inctrypaths=, instpaths=, echo=) and corresponding command line parameters will accept macros: ${hb_root}, ${hb_dir}, ${hb_name}, ${hb_arch}, ${hb_comp}, ${hb_cpu}, ${hb_bin}, ${hb_lib}, ${hb_dyn}, ${hb_inc}, ${}. libpaths= also accepts %{hb_name} which translates to the name of the .hbc file under search." -msgstr "Számos .hbc opcióban és parancssori megfelelőikben (prgflags=, cflags=, ldflags=, libpaths=, inctrypaths=,echo=) használhatók makrók: ${hb_root}, ${hb_self}, ${hb_arch}, ${hb_comp}, ${hb_cpu}, ${}. libpaths= also accepts %{hb_name} which translates to the name of the .hbc file under search." +msgid "Certain .hbc lines (libs=, hbcs=, prgflags=, cflags=, ldflags=, libpaths=, inctrypaths=, instpaths=, echo=) and corresponding command line parameters will accept macros: ${hb_root}, ${hb_dir}, ${hb_name}, ${hb_arch}, ${hb_comp}, ${hb_build}, ${hb_cpu}, ${hb_bin}, ${hb_lib}, ${hb_dyn}, ${hb_inc}, ${}. libpaths= also accepts %{hb_name} which translates to the name of the .hbc file under search." +msgstr "Számos .hbc opcióban és parancssori megfelelőikben (prgflags=, cflags=, ldflags=, libpaths=, inctrypaths=,echo=) használhatók makrók: ${hb_root}, ${hb_self}, ${hb_arch}, ${hb_comp}, ${hb_build}, ${hb_cpu}, ${}. libpaths= also accepts %{hb_name} which translates to the name of the .hbc file under search." #: hbmk2.prg:5758 hbmk2.prg:6471 #, c-format diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index e0ab6cae95..f5b352a482 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -201,81 +201,82 @@ REQUEST hbmk_KEYW #define _HBMK_lInfo 2 #define _HBMK_cARCH 3 #define _HBMK_cCOMP 4 -#define _HBMK_cGTDEFAULT 5 -#define _HBMK_aLIBCOREGT 6 -#define _HBMK_cGT 7 +#define _HBMK_cBUILD 5 +#define _HBMK_cGTDEFAULT 6 +#define _HBMK_aLIBCOREGT 7 +#define _HBMK_cGT 8 -#define _HBMK_cHB_BIN_INSTALL 8 -#define _HBMK_cHB_LIB_INSTALL 9 -#define _HBMK_cHB_DYN_INSTALL 10 -#define _HBMK_cHB_INC_INSTALL 11 +#define _HBMK_cHB_BIN_INSTALL 9 +#define _HBMK_cHB_LIB_INSTALL 10 +#define _HBMK_cHB_DYN_INSTALL 11 +#define _HBMK_cHB_INC_INSTALL 12 -#define _HBMK_lGUI 12 -#define _HBMK_lMT 13 -#define _HBMK_lDEBUG 14 -#define _HBMK_nHEAD 15 -#define _HBMK_aINCPATH 16 -#define _HBMK_aINCTRYPATH 17 -#define _HBMK_lREBUILD 18 -#define _HBMK_lTRACE 19 -#define _HBMK_lDONTEXEC 20 -#define _HBMK_nHBMODE 21 -#define _HBMK_cUILNG 22 -#define _HBMK_cUICDP 23 -#define _HBMK_aLIBUSER 24 -#define _HBMK_aLIBUSERGT 25 -#define _HBMK_aLIBPATH 26 -#define _HBMK_aINSTPATH 27 -#define _HBMK_aOPTC 28 -#define _HBMK_aOPTPRG 29 -#define _HBMK_aOPTRES 30 -#define _HBMK_aOPTL 31 -#define _HBMK_aOPTA 32 -#define _HBMK_aOPTD 33 -#define _HBMK_lCPP 34 -#define _HBMK_lSHARED 35 -#define _HBMK_lSTATICFULL 36 -#define _HBMK_lSHAREDDIST 37 -#define _HBMK_lNULRDD 38 -#define _HBMK_lMAP 39 -#define _HBMK_lBEEP 40 -#define _HBMK_lSTRIP 41 -#define _HBMK_lOPTIM 42 -#define _HBMK_nCOMPR 43 -#define _HBMK_lRUN 44 -#define _HBMK_lINC 45 -#define _HBMK_lREBUILDPO 46 -#define _HBMK_lMINIPO 47 -#define _HBMK_lUNICODE 48 -#define _HBMK_nCONF 49 -#define _HBMK_lIGNOREERROR 50 +#define _HBMK_lGUI 13 +#define _HBMK_lMT 14 +#define _HBMK_lDEBUG 15 +#define _HBMK_nHEAD 16 +#define _HBMK_aINCPATH 17 +#define _HBMK_aINCTRYPATH 18 +#define _HBMK_lREBUILD 19 +#define _HBMK_lTRACE 20 +#define _HBMK_lDONTEXEC 21 +#define _HBMK_nHBMODE 22 +#define _HBMK_cUILNG 23 +#define _HBMK_cUICDP 24 +#define _HBMK_aLIBUSER 25 +#define _HBMK_aLIBUSERGT 26 +#define _HBMK_aLIBPATH 27 +#define _HBMK_aINSTPATH 28 +#define _HBMK_aOPTC 29 +#define _HBMK_aOPTPRG 30 +#define _HBMK_aOPTRES 31 +#define _HBMK_aOPTL 32 +#define _HBMK_aOPTA 33 +#define _HBMK_aOPTD 34 +#define _HBMK_lCPP 35 +#define _HBMK_lSHARED 36 +#define _HBMK_lSTATICFULL 37 +#define _HBMK_lSHAREDDIST 38 +#define _HBMK_lNULRDD 39 +#define _HBMK_lMAP 40 +#define _HBMK_lBEEP 41 +#define _HBMK_lSTRIP 42 +#define _HBMK_lOPTIM 43 +#define _HBMK_nCOMPR 44 +#define _HBMK_lRUN 45 +#define _HBMK_lINC 46 +#define _HBMK_lREBUILDPO 47 +#define _HBMK_lMINIPO 48 +#define _HBMK_lUNICODE 49 +#define _HBMK_nCONF 50 +#define _HBMK_lIGNOREERROR 51 -#define _HBMK_cFIRST 51 -#define _HBMK_aPRG 52 -#define _HBMK_aC 53 -#define _HBMK_aRESSRC 54 -#define _HBMK_aRESCMP 55 -#define _HBMK_aOBJUSER 56 -#define _HBMK_aICON 57 +#define _HBMK_cFIRST 52 +#define _HBMK_aPRG 53 +#define _HBMK_aC 54 +#define _HBMK_aRESSRC 55 +#define _HBMK_aRESCMP 56 +#define _HBMK_aOBJUSER 57 +#define _HBMK_aICON 58 -#define _HBMK_aPO 58 -#define _HBMK_cHBL 59 -#define _HBMK_cHBLDir 60 -#define _HBMK_aLNG 61 -#define _HBMK_cPO 62 +#define _HBMK_aPO 59 +#define _HBMK_cHBL 60 +#define _HBMK_cHBLDir 61 +#define _HBMK_aLNG 62 +#define _HBMK_cPO 63 -#define _HBMK_lDEBUGTIME 63 -#define _HBMK_lDEBUGINC 64 -#define _HBMK_lDEBUGSTUB 65 -#define _HBMK_lDEBUGI18N 66 +#define _HBMK_lDEBUGTIME 64 +#define _HBMK_lDEBUGINC 65 +#define _HBMK_lDEBUGSTUB 66 +#define _HBMK_lDEBUGI18N 67 -#define _HBMK_cCCPATH 67 -#define _HBMK_cCCPREFIX 68 -#define _HBMK_cCCPOSTFIX 69 +#define _HBMK_cCCPATH 68 +#define _HBMK_cCCPREFIX 69 +#define _HBMK_cCCPOSTFIX 70 -#define _HBMK_lUTF8 70 +#define _HBMK_lUTF8 71 -#define _HBMK_MAX_ 70 +#define _HBMK_MAX_ 71 #ifndef _HBMK_EMBEDDED_ @@ -684,6 +685,7 @@ FUNCTION hbmk( aArgs, /* @ */ lPause, /* @ */ lUTF8 ) CASE cParamL == "-quiet" ; hbmk[ _HBMK_lQuiet ] := .T. ; hbmk[ _HBMK_lInfo ] := .F. CASE Left( cParamL, 6 ) == "-comp=" ; hbmk[ _HBMK_cCOMP ] := SubStr( cParam, 7 ) CASE Left( cParamL, 6 ) == "-arch=" ; hbmk[ _HBMK_cARCH ] := SubStr( cParam, 7 ) + CASE Left( cParamL, 6 ) == "-build=" ; hbmk[ _HBMK_cBUILD ] := SubStr( cParam, 8 ) 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. @@ -1233,7 +1235,8 @@ FUNCTION hbmk( aArgs, /* @ */ lPause, /* @ */ lUTF8 ) /* Autodetect multi-compiler/platform lib structure */ IF hb_DirExists( tmp := PathNormalize( DirAddPathSep( l_cHB_INSTALL_PREFIX ) ) + "lib" +; hb_osPathSeparator() + hbmk[ _HBMK_cARCH ] +; - hb_osPathSeparator() + hbmk[ _HBMK_cCOMP ] ) + hb_osPathSeparator() + hbmk[ _HBMK_cCOMP ] +; + iif( Empty( hbmk[ _HBMK_cBUILD ] ), "", hb_osPathSeparator() + PathSepToTarget( hbmk, hbmk[ _HBMK_cBUILD ] ) ) ) l_cHB_DYN_INSTALL := PathNormalize( DirAddPathSep( l_cHB_INSTALL_PREFIX ) + "lib" ) l_cHB_LIB_INSTALL := tmp ELSE @@ -5681,6 +5684,8 @@ STATIC FUNCTION MacroProc( hbmk, cString, cFileName, lLateMode ) CASE "HB_COMP" CASE "HB_COMPILER" /* Compatibility */ cMacro := hbmk[ _HBMK_cCOMP ] ; EXIT + CASE "HB_BUILD" + cMacro := hbmk[ _HBMK_cBUILD ] ; EXIT CASE "HB_CPU" cMacro := hbmk_CPU( hbmk ) ; EXIT CASE "HB_WORK" @@ -6808,6 +6813,7 @@ STATIC PROCEDURE ShowHelp( hbmk, lLong ) NIL,; { "-arch=" , I_( "assume specific architecure. Same as HB_ARCHITECTURE envvar" ) },; { "-comp=" , I_( "use specific C compiler. Same as HB_COMPILER envvar\nSpecial value:\n - bld: use original build settings (default on *nix)" ) },; + { "-build=" , I_( "use a specific build name" ) },; { "-lang=" , I_( "override default language. Similar to HB_LANG envvar." ) },; { "--version" , I_( "display version header only" ) },; { "-pause" , I_( "force waiting for a key on exit in case of failure (with alternate GTs only)" ) },; @@ -6827,7 +6833,7 @@ STATIC PROCEDURE ShowHelp( hbmk, lLong ) I_( ".hbc config files in current dir are automatically processed." ),; I_( ".hbc options (they should come in separate lines): libs=[], hbcs=[<.hbc file[s]>], gt=[gtname], prgflags=[Harbour flags], cflags=[C compiler flags], resflags=[resource compiler flags], ldflags=[linker flags], libpaths=[paths], sources=[source files], incpaths=[paths], inctrypaths=[paths], instpaths=[paths], gui|mt|shared|nulrdd|debug|opt|map|strip|run|inc=[yes|no], cpp=[yes|no|def], compr=[yes|no|def|min|max], head=[off|partial|full], skip=[yes|no], echo=\nLines starting with '#' char are ignored" ),; I_( "Platform filters are accepted in each .hbc line and with several options.\nFilter format: {[!][||]}. Filters can be combined using '&', '|' operators and grouped by parantheses. Ex.: {win}, {gcc}, {linux|darwin}, {win&!pocc}, {(win|linux)&!watcom}, {unix&mt&gui}, -cflag={win}-DMYDEF, -stop{dos}, -stop{!allwin}, {allpocc|allgcc|allmingw|unix}, {allmsvc}, {x86|x86_64|ia64|arm}, {debug|nodebug|gui|std|mt|st|xhb}" ),; - I_( "Certain .hbc lines (libs=, hbcs=, prgflags=, cflags=, ldflags=, libpaths=, inctrypaths=, instpaths=, echo=) and corresponding command line parameters will accept macros: ${hb_root}, ${hb_dir}, ${hb_name}, ${hb_arch}, ${hb_comp}, ${hb_cpu}, ${hb_bin}, ${hb_lib}, ${hb_dyn}, ${hb_inc}, ${}. libpaths= also accepts %{hb_name} which translates to the name of the .hbc file under search." ),; + I_( "Certain .hbc lines (libs=, hbcs=, prgflags=, cflags=, ldflags=, libpaths=, inctrypaths=, instpaths=, echo=) and corresponding command line parameters will accept macros: ${hb_root}, ${hb_dir}, ${hb_name}, ${hb_arch}, ${hb_comp}, ${hb_build}, ${hb_cpu}, ${hb_bin}, ${hb_lib}, ${hb_dyn}, ${hb_inc}, ${}. libpaths= also accepts %{hb_name} which translates to the name of the .hbc file under search." ),; I_( 'Options accepting macros also support command substitution. Enclose command inside ``, and, if the command contains space, also enclose in double quotes. F.e. "-cflag=`wx-config --cflags`", or ldflags={unix&gcc}"`wx-config --libs`".' ),; I_( "Defaults and feature support vary by architecture/compiler." ) } diff --git a/harbour/utils/hbmk2/hbmk2.pt_BR.po b/harbour/utils/hbmk2/hbmk2.pt_BR.po index 34d9d98b70..b0e31ce3f2 100644 --- a/harbour/utils/hbmk2/hbmk2.pt_BR.po +++ b/harbour/utils/hbmk2/hbmk2.pt_BR.po @@ -837,8 +837,8 @@ msgstr "Valores suportados para conforme a dispon #: hbmk2.prg:6704 #, c-format -msgid "Certain .hbc lines (libs=, hbcs=, prgflags=, cflags=, ldflags=, libpaths=, inctrypaths=, instpaths=, echo=) and corresponding command line parameters will accept macros: ${hb_root}, ${hb_dir}, ${hb_name}, ${hb_arch}, ${hb_comp}, ${hb_cpu}, ${hb_bin}, ${hb_lib}, ${hb_dyn}, ${hb_inc}, ${}. libpaths= also accepts %{hb_name} which translates to the name of the .hbc file under search." -msgstr "Algumas op‡äes do .hbc (libs=, hbcs=, prgflags=, cflags=, ldflags=, libpaths=, inctrypaths=, instpaths=, echo=) e seus correspondentes parƒmetros de linha-de-comando aceitam as seguintes macros: ${hb_root}, ${hb_dir}, ${hb_name}, ${hb_arch}, ${hb_comp}, ${hb_cpu}, ${hb_bin}, ${hb_lib}, ${hb_dyn}, ${hb_inc}, ${}. libpaths= tamb‚m aceitam %{hb_name} que se traduz como o nome do arquivo .hbc sob pesquisa." +msgid "Certain .hbc lines (libs=, hbcs=, prgflags=, cflags=, ldflags=, libpaths=, inctrypaths=, instpaths=, echo=) and corresponding command line parameters will accept macros: ${hb_root}, ${hb_dir}, ${hb_name}, ${hb_arch}, ${hb_comp}, ${hb_build}, ${hb_cpu}, ${hb_bin}, ${hb_lib}, ${hb_dyn}, ${hb_inc}, ${}. libpaths= also accepts %{hb_name} which translates to the name of the .hbc file under search." +msgstr "Algumas op‡äes do .hbc (libs=, hbcs=, prgflags=, cflags=, ldflags=, libpaths=, inctrypaths=, instpaths=, echo=) e seus correspondentes parƒmetros de linha-de-comando aceitam as seguintes macros: ${hb_root}, ${hb_dir}, ${hb_name}, ${hb_arch}, ${hb_comp}, ${hb_build}, ${hb_cpu}, ${hb_bin}, ${hb_lib}, ${hb_dyn}, ${hb_inc}, ${}. libpaths= tamb‚m aceitam %{hb_name} que se traduz como o nome do arquivo .hbc sob pesquisa." #: hbmk2.prg:6607 #, c-format