From 7ad75f95434f7cf5e8d6a7dea852f643ccfc7c58 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 27 Mar 2013 16:31:11 +0100 Subject: [PATCH] 2013-03-27 16:29 UTC+0100 Viktor Szakats (harbour syenar.net) * utils/hbmk2/hbmk2.prg ! fixed to suppress remaining remaining double outputs at startup in hbrun mode, when processing .hbc files * contrib/hbexpat/hbexpat.hbc ! added usage time detection of locally hosted 3rd party dependency to avoid warnings when the locally hosted dependency is not present (f.e. because the system hosted copy was used at build/install time) Experimental. If it works fine, should be applied to other similar contribs: hbbz2, hbhpdf, hblzf, hbmlzo, hbmxml, hbmzip, hbsqlit3, hbtinymt, hbxdiff, sddsqlt3 * README.md * typographic and misc improvements * config/global.mk + detect qnx cross-compile tool (via Francesco Perillo) * include/hbsetup.h * src/common/hbtrace.c + added macro HB_OS_QNX_BB10 for BlackBerry 10 subplatform + guard some stuff that's not present in BB10 (via Francesco Perillo) * contrib/hbtinymt/3rd/tinymt/tinymt.hbc ! deleted $Id$ --- ChangeLog.txt | 28 +++++++++++++ README.md | 54 +++++++++++++------------- config/global.mk | 8 ++++ contrib/hbexpat/hbexpat.hbc | 8 +++- contrib/hbtinymt/3rd/tinymt/tinymt.hbc | 3 -- include/hbsetup.h | 5 ++- src/common/hbtrace.c | 6 ++- utils/hbmk2/hbmk2.prg | 2 + 8 files changed, 80 insertions(+), 34 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 0340058943..8caeb1e79b 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -10,6 +10,34 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2013-03-27 16:29 UTC+0100 Viktor Szakats (harbour syenar.net) + * utils/hbmk2/hbmk2.prg + ! fixed to suppress remaining remaining double outputs at + startup in hbrun mode, when processing .hbc files + + * contrib/hbexpat/hbexpat.hbc + ! added usage time detection of locally hosted 3rd party + dependency to avoid warnings when the locally hosted + dependency is not present (f.e. because the system + hosted copy was used at build/install time) + Experimental. If it works fine, should be applied to + other similar contribs: + hbbz2, hbhpdf, hblzf, hbmlzo, hbmxml, hbmzip, hbsqlit3, hbtinymt, hbxdiff, sddsqlt3 + + * README.md + * typographic and misc improvements + + * config/global.mk + + detect qnx cross-compile tool (via Francesco Perillo) + + * include/hbsetup.h + * src/common/hbtrace.c + + added macro HB_OS_QNX_BB10 for BlackBerry 10 subplatform + + guard some stuff that's not present in BB10 (via Francesco Perillo) + + * contrib/hbtinymt/3rd/tinymt/tinymt.hbc + ! deleted $Id$ + 2013-03-27 03:54 UTC+0100 Viktor Szakats (harbour syenar.net) * utils/hbmk2/hbmk2.prg + changed the way script debugging is invoked, now diff --git a/README.md b/README.md index c4cd736e13..69dcff2f0c 100644 --- a/README.md +++ b/README.md @@ -98,9 +98,10 @@ Download source archive from this page and unpack: ## Unstable versions -> WARNING: Recommended for users contributing to Harbour development, -> following the development mailing list, commits and reading -> [ChangeLog.txt](ChangeLog.txt?raw=true). +> WARNING: +> Recommended for users contributing to Harbour development, +> following the development mailing list, commits and reading +> [ChangeLog.txt](ChangeLog.txt?raw=true). ### Harbour live source repository @@ -433,10 +434,10 @@ See: [How to Build](#how-to-build) # How to Enable Optional Components -Certain Harbour parts – typically contrib packages – -depend on 3rd party components. To make these Harbour parts built, -you need to tell Harbour where to find the headers for these 3rd -party components. +Certain Harbour parts—typically contrib packages—depend +on 3rd party components. To make these Harbour parts built,you need +to tell Harbour where to find the headers for these 3rd party +components. On *nix systems most of these 3rd party components will automatically be picked up if installed on well-known standard @@ -450,7 +451,7 @@ on *nix which aren't available through official package managers (f.e. ADS Client). Note that Harbour is tuned to use 3rd party binary packages in their -default, unmodified – *vanilla* – install layout created by their +default, unmodified—"vanilla"—install layout created by their official/mainstream install kits. If you manually move, rename, delete or add files under the 3rd party packages' root directory, the default Harbour build process (especially Windows implib @@ -504,8 +505,8 @@ locally hosted copy (inside Harbour source repository) of these packages, where applicable. `nolocal` will explicitly disable using locally hosted copy. -Certain contribs can be instructed – when using .hbc files – -to link against static build of their 3rd party lib dependencies (for +Certain contribs can be instructed—when using .hbc files—to +link against static build of their 3rd party lib dependencies (for advanced users only): HB_STATIC_ALLEGRO=yes @@ -516,7 +517,7 @@ advanced users only): > > * You need to use native path format to your shell/OS. > * Spaces in directory names aren't currently supported. -> You can use 8.3 name alias on Windows platform, though. +> You *can* use 8.3 name alias on Windows platform, though. > * Don't put directory names inside double quotes. > * Use absolute paths. @@ -741,8 +742,8 @@ sensitive. Don't build any, or space separated `` list of, contrib packages. Please note it won't prevent - building packages which are dependencies of other - – enabled – packages. + building packages which are dependencies of + other—enabled—packages. - `HB_BUILD_CONTRIBS=[]` @@ -827,8 +828,8 @@ sensitive. - `HB_CCSUFFIX=[]` Used with gcc compiler family to specify - compiler/linker tool name suffix - – usually version number. + compiler/linker tool name suffix—usually + version number. ## Cross-building @@ -1302,7 +1303,6 @@ make ## on *nix hosts in general ```bash -# GCC [g]make ``` @@ -1329,8 +1329,8 @@ For all platforms you'll need two things: * Supported ANSI C compiler - Your compiler of choice has to be placed in the PATH - – and configured appropriately according to instructions. + Your compiler of choice has to be placed in the PATH—and + configured appropriately according to instructions. If you use official Harbour binary distribution on Windows, you already have MinGW compiler embedded in the installation, which will automatically be used, so you don't have to @@ -1422,10 +1422,10 @@ mailing list. versions when building Harbour. The surest way to achieve this is to leave only C compiler directory in PATH: - set PATH=C:\ + set PATH=C:\ - If you use Harbour official binary distro on Windows, even above is - unnecessary and not recommended. + > If you use Harbour official binary distro on Windows, even above is + > unnecessary and not recommended. 6. Remove all old, unnecessary environment variables (for both Harbour and C compiler) from your environment. Also remove any custom settings for your C compiler. @@ -1435,11 +1435,11 @@ mailing list. not even used by Harbour build process and hbmk2. You should delete them: - set HB_DIR= - set HB_PATH= - set HRB_DIR= - set INCLUDE= - set LIB= + set HB_DIR= + set HB_PATH= + set HRB_DIR= + set INCLUDE= + set LIB= set HB_GT_LIB= set HB_*_INSTALL= set HB_INSTALL_???= @@ -1469,7 +1469,7 @@ mailing list. 11. If you are to report a build problem with a Harbour application, all of the above points apply, plus make sure to use ``-trace`` command line option when running hbmk2 and redirect the result to - a file – see above how. + a file (see above how). It's good idea to first remove all manual references to Harbour core components from makefiles and custom environment. F.e. it's commom mistake to add C compiler header and/or lib dirs, Harbour core diff --git a/config/global.mk b/config/global.mk index 10fa698b7d..38a2a336a4 100644 --- a/config/global.mk +++ b/config/global.mk @@ -943,6 +943,14 @@ ifeq ($(HB_COMPILER),) HB_COMPILER := gcc endif endif + else + ifeq ($(HB_PLATFORM),qnx) + HB_COMP_PATH := $(call find_in_path,ntox86-gcc) + ifneq ($(HB_COMP_PATH),) + HB_COMPILER := gcc + HB_CCPREFIX := ntox86- + endif + endif endif endif endif diff --git a/contrib/hbexpat/hbexpat.hbc b/contrib/hbexpat/hbexpat.hbc index b5d3e758b4..b3d3738cdb 100644 --- a/contrib/hbexpat/hbexpat.hbc +++ b/contrib/hbexpat/hbexpat.hbc @@ -6,4 +6,10 @@ incpaths=. headers=${hb_name}.ch libs=${_HB_DYNPREF}${hb_name}${_HB_DYNSUFF} -libs=3rd/expat/expat.hbc + +depkeyhead=inst_expat:expat.h +depcontrol=inst_expat:local{HB_BUILD_3RDEXT='no'} +depincpathlocal=inst_expat:3rd/expat +depfinish=inst_expat + +libs=3rd/expat/expat.hbc{HBMK_HAS_INST_EXPAT_LOCAL} diff --git a/contrib/hbtinymt/3rd/tinymt/tinymt.hbc b/contrib/hbtinymt/3rd/tinymt/tinymt.hbc index 240e427f53..1b9404bcb1 100644 --- a/contrib/hbtinymt/3rd/tinymt/tinymt.hbc +++ b/contrib/hbtinymt/3rd/tinymt/tinymt.hbc @@ -1,5 +1,2 @@ -# -# $Id: expat.hbc 16154 2011-01-30 23:09:11Z vszakats $ -# libs=${hb_name} diff --git a/include/hbsetup.h b/include/hbsetup.h index 12d7f274b6..f6cd06f0b7 100644 --- a/include/hbsetup.h +++ b/include/hbsetup.h @@ -388,8 +388,11 @@ #endif #ifndef HB_OS_QNX - #if defined( __QNX__ ) + #if defined( __QNX__ ) || defined( __QNXNTO__ ) #define HB_OS_QNX + #if defined( __QNXNTO__ ) /* TOFIX */ + #define HB_OS_QNX_BB10 + #endif #endif #endif diff --git a/src/common/hbtrace.c b/src/common/hbtrace.c index 2cec012188..e45d96c762 100644 --- a/src/common/hbtrace.c +++ b/src/common/hbtrace.c @@ -62,7 +62,8 @@ #elif defined( HB_OS_UNIX ) && \ ! defined( __WATCOMC__ ) && \ ! defined( HB_OS_VXWORKS ) && \ - ! defined( HB_OS_SYMBIAN ) + ! defined( HB_OS_SYMBIAN ) && \ + ! defined( HB_OS_QNX_BB10 ) #include #endif @@ -275,7 +276,8 @@ static void hb_tracelog_( int level, const char * file, int line, const char * p ( defined( HB_OS_UNIX ) && \ ! defined( __WATCOMC__ ) && \ ! defined( HB_OS_VXWORKS ) && \ - ! defined( HB_OS_SYMBIAN ) ) + ! defined( HB_OS_SYMBIAN ) && \ + ! defined( HB_OS_QNX_BB10 ) ) char message[ 1024 ]; diff --git a/utils/hbmk2/hbmk2.prg b/utils/hbmk2/hbmk2.prg index 400a155dc2..7994e9fba7 100644 --- a/utils/hbmk2/hbmk2.prg +++ b/utils/hbmk2/hbmk2.prg @@ -13893,11 +13893,13 @@ STATIC PROCEDURE __hbshell( cFile, ... ) AAdd( aOPTPRG, "-b" ) ENDIF + hbmk[ _HBMK_lDumpInfo ] := .T. /* trick to suppress output from HBC_Find() call */ FOR EACH tmp IN aExtension IF ! Empty( cVersion := HBC_Find( hbmk, hb_FNameExtSet( tmp, ".hbc" ) ) ) AAddNew( aOPTPRG, "-D" + hb_StrFormat( _HBMK_HAS_TPL_HBC, StrToDefine( tmp ) ) + "=" + cVersion ) ENDIF NEXT + hbmk[ _HBMK_lDumpInfo ] := .F. FOR EACH tmp IN hbmk[ _HBMK_aINCPATH ] AAdd( aOPTPRG, "-i" + tmp )