2010-08-06 09:56 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)

* config/global.mk
    ! Fixed setting LD_LIBRARY_PATH under pre-3.81 GNU Makes.
    + Will now set HB_SYSLOC=yes when creating .tgz packages which
      are meant to be installed to system locations. (didn't test 
      this one)
    + Will now set HB_INSTALL_DOC to /share/doc/harbour on *nix systems.
    ! Fixed to set HB_INSTALL_MAN to /share/man (instead of /man) on
      *nix systems.
    ; Please test/review these.

  * config/postinst.hbs
    + Create directory for "root documents". They are now stored
      in /share/doc/harbour for *nix.
    ! Fixed to store proper directory in ld.so.conf.d setting by
      removing HB_INSTALL_PKG_TOP from the beginning of full dynlib
      path.

  * debian/rules
  * package/harbour.spec
  * package/harbour-win.spec.in
  * package/harbour-wce.spec.in
    ! Use HB_INSTALL_PKG_TOP to denote the root of package dir structure.
    ; TODO: Change the name to HB_INSTALL_PKG_ROOT
    ; TODO: Optimize variable usage.
    ; TOFIX: Use HB_INSTALL_DYN instead HB_INSTALL_LIB in context of 
             dynamic libs in postinst.hbs and package scripts.

  * package/harbour.spec
    ! Fixed to honor HB_BUILD_NAME in local LD_LIBRARY_PATH setting.
      (is it needed?)

  * INSTALL
    - Deleted note about GNU Make 3.81.90
      3.82 is out and the bug was fixed.
    ! Updated mpkg_src.sh location.

  * contrib/make.hbs
    * Do not create dynlib, .hbd, .hbx if the main build process
      returned with non-zero errorlevel.

  * utils/hbmk2/hbmk2.prg
    + Return errorlevel when -stop is used in project.
    + Use manifest constants for errorlevels.

  * config/hbextern.hbs
    * Local function renamed.

  * contrib/xhb/xhb.hbx
  * contrib/hbxpp/hbxpp.hbx
    * Regenerated.

  * src/vm/pvaluehb.c
    ! Typo in comment.
This commit is contained in:
Viktor Szakats
2010-08-06 08:01:09 +00:00
parent c6fb8242a4
commit a1a8bcd8d4
14 changed files with 188 additions and 97 deletions

View File

@@ -16,6 +16,61 @@
The license applies to all entries newer than 2009-04-28.
*/
2010-08-06 09:56 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* config/global.mk
! Fixed setting LD_LIBRARY_PATH under pre-3.81 GNU Makes.
+ Will now set HB_SYSLOC=yes when creating .tgz packages which
are meant to be installed to system locations. (didn't test
this one)
+ Will now set HB_INSTALL_DOC to /share/doc/harbour on *nix systems.
! Fixed to set HB_INSTALL_MAN to /share/man (instead of /man) on
*nix systems.
; Please test/review these.
* config/postinst.hbs
+ Create directory for "root documents". They are now stored
in /share/doc/harbour for *nix.
! Fixed to store proper directory in ld.so.conf.d setting by
removing HB_INSTALL_PKG_TOP from the beginning of full dynlib
path.
* debian/rules
* package/harbour.spec
* package/harbour-win.spec.in
* package/harbour-wce.spec.in
! Use HB_INSTALL_PKG_TOP to denote the root of package dir structure.
; TODO: Change the name to HB_INSTALL_PKG_ROOT
; TODO: Optimize variable usage.
; TOFIX: Use HB_INSTALL_DYN instead HB_INSTALL_LIB in context of
dynamic libs in postinst.hbs and package scripts.
* package/harbour.spec
! Fixed to honor HB_BUILD_NAME in local LD_LIBRARY_PATH setting.
(is it needed?)
* INSTALL
- Deleted note about GNU Make 3.81.90
3.82 is out and the bug was fixed.
! Updated mpkg_src.sh location.
* contrib/make.hbs
* Do not create dynlib, .hbd, .hbx if the main build process
returned with non-zero errorlevel.
* utils/hbmk2/hbmk2.prg
+ Return errorlevel when -stop is used in project.
+ Use manifest constants for errorlevels.
* config/hbextern.hbs
* Local function renamed.
* contrib/xhb/xhb.hbx
* contrib/hbxpp/hbxpp.hbx
* Regenerated.
* src/vm/pvaluehb.c
! Typo in comment.
2010-08-05 18:27 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
+ contrib/hbide/resources/view_refresh.png
* contrib/hbide/hbide.qrc
@@ -26,16 +81,16 @@
* contrib/hbide/ideedit.prg
* contrib/hbide/ideeditor.prg
+ Added: "Reload Source" icon on the MDI area top-toolbar.
This facilitates to reload the source from disk. If the source
This facilitates to reload the source from disk. If the source
in the editor in modified state, a confirmation dialog is presented.
! Rearranged: MDI area left-toolbar icons to break them
! Rearranged: MDI area left-toolbar icons to break them
in more logical units.
! Fixed: under MDI editing mode "Find" icon had stopped to work.
! Fixed: "Horizontal/Vertical" split option was not refreshed
under context menu after first activation.
! Fixed: "Horizontal/Vertical" split option was not refreshed
under context menu after first activation.
2010-08-05 21:26 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* utils/hbmk2/hbmk2.prg

View File

@@ -222,7 +222,7 @@ HARBOUR
Source .tgz on *nixes
---------------------
$ ./mpkg_src.sh
$ package/mpkg_src.sh
Binary .tgz on *nixes
---------------------
@@ -1212,9 +1212,6 @@ HARBOUR
8. Try to do no or only small modifications at once to command examples
included in this document. If it doesn't work, fall back to documented
examples as is.
9. GNU Make 3.81.90 has known bug which prevents autodetection to work
in certain situations: http://savannah.gnu.org/bugs/?27591
Use 3.81 if in doubt.
11. QUICK START TO BUILD YOUR OWN HARBOUR APPLICATIONS

View File

@@ -1141,7 +1141,7 @@ else
IMP_DIR :=
ifeq ($(HB_LD_PATH_SET),)
ifneq ($(HB_SRC_ROOTPATH),)
export LD_LIBRARY_PATH := $(HB_SRC_ROOTPATH)$(PLAT_COMP):$(LD_LIBRARY_PATH)
export LD_LIBRARY_PATH := $(HB_SRC_ROOTPATH)lib/$(PLAT_COMP):$(LD_LIBRARY_PATH)
else
export LD_LIBRARY_PATH := $(realpath $(DYN_DIR)):$(LD_LIBRARY_PATH)
endif
@@ -1443,21 +1443,27 @@ export HB_VERSION
export HB_PKGNAME
export HB_PKGNAMI
HB_SYSLOC :=
HB_INSTALL_PREFIX_ORI := $(HB_INSTALL_PREFIX)
ifeq ($(HB_BUILD_PKG),yes)
ifeq ($(HB_INIT_DONE),)
ifeq ($(HB_PLATFORM),darwin)
HB_BUILD_PKG_PREFIX := /usr/local
HB_SYSLOC := yes
else
ifeq ($(HB_PLATFORM),sunos)
HB_BUILD_PKG_PREFIX := /opt
HB_SYSLOC := yes
else
ifeq ($(HB_PLATFORM),beos)
HB_BUILD_PKG_PREFIX := /boot/common
HB_SYSLOC := yes
else
ifneq ($(HB_PLATFORM_UNIX),)
HB_BUILD_PKG_PREFIX := /usr/local
HB_SYSLOC := yes
else
HB_BUILD_PKG_PREFIX := /$(HB_PKGNAME)
endif
@@ -1472,7 +1478,7 @@ ifeq ($(HB_BUILD_PKG),yes)
#
# <HB_TOP><plat/comp ><HB_BUILD_PKG_PREFIX>
# <HB_INSTALL_PKG_TOP>
# <HB_INSTALL_PREFIX >
# <HB_INSTALL_PREFIX >/bin
#
ifneq ($(HB_SRC_ROOTPATH),)
@@ -1571,18 +1577,20 @@ ifeq ($(HB_INIT_DONE),)
endif
endif
HB_SYSLOC :=
ifeq ($(HB_PLATFORM),beos)
ifneq ($(strip $(foreach dir,/boot/common /boot/system /boot/home/config $(subst :, ,$(LIBRARY_PATH)),$(findstring |$(dir),|$(HB_INSTALL_PREFIX)))),)
HB_SYSLOC := yes
ifeq ($(HB_SYSLOC),)
ifeq ($(HB_PLATFORM),beos)
ifneq ($(strip $(foreach dir,/boot/common /boot/system /boot/home/config $(subst :, ,$(LIBRARY_PATH)),$(findstring |$(dir),|$(HB_INSTALL_PREFIX)))),)
HB_SYSLOC := yes
endif
else
ifneq ($(HB_PLATFORM_UNIX),)
ifneq ($(strip $(foreach dir,/usr/local/bin /usr/bin $(subst :, ,$(LD_LIBRARY_PATH)),$(findstring |$(dir),|$(HB_INSTALL_PREFIX)))),)
HB_SYSLOC := yes
endif
endif
else
ifneq ($(HB_PLATFORM_UNIX),)
ifneq ($(strip $(foreach dir,/usr/local/bin /usr/bin $(subst :, ,$(LD_LIBRARY_PATH)),$(findstring |$(dir),|$(HB_INSTALL_PREFIX)))),)
HB_SYSLOC := yes
endif
endif
endif
export HB_SYSLOC
ifneq ($(HB_INSTALL_PREFIX),)
@@ -1651,9 +1659,10 @@ ifneq ($(HB_INSTALL_PREFIX),)
endif
# Standard name: DOCDIR
ifeq ($(HB_INSTALL_DOC),)
# Do not set doc dir for *nix targets
ifeq ($(HB_PLATFORM_UNIX),)
export HB_INSTALL_DOC := $(HB_INSTALL_PREFIX)$(DIRSEP)doc
else
export HB_INSTALL_DOC := $(HB_INSTALL_PREFIX)$(DIRSEP)share$(DIRSEP)doc$(DIRSEP)harbour
endif
endif
# Standard name: MANDIR
@@ -1661,7 +1670,7 @@ ifneq ($(HB_INSTALL_PREFIX),)
# Do not set doc dir for non-*nix targets
ifneq ($(HB_PLATFORM_UNIX),)
ifeq ($(HB_SYSLOC),yes)
export HB_INSTALL_MAN := $(HB_INSTALL_PREFIX)$(DIRSEP)man$(INCPOSTFIX)
export HB_INSTALL_MAN := $(HB_INSTALL_PREFIX)$(DIRSEP)share$(DIRSEP)man
endif
endif
endif

View File

@@ -94,7 +94,7 @@ STATIC FUNCTION __hb_extern_get_list( cInputName )
RETURN aExtern
STATIC PROCEDURE __hb_extern_get_neg_list( cInputName, /* @ */ aInclude, /* @ */ aExclude )
STATIC PROCEDURE __hb_extern_get_exception_list( cInputName, /* @ */ aInclude, /* @ */ aExclude )
LOCAL cFile
LOCAL hRegex
LOCAL tmp
@@ -131,7 +131,7 @@ STATIC FUNCTION __hb_extern_gen( aFuncList, cOutputName )
LOCAL cHelp := "/* Syntax: // HB_FUNC_INCLUDE <func> */" + hb_eol() +;
"/* // HB_FUNC_EXCLUDE <func> */" + hb_eol()
__hb_extern_get_neg_list( cOutputName, @aInclude, @aExclude )
__hb_extern_get_exception_list( cOutputName, @aInclude, @aExclude )
cExtern := "/*" + hb_eol()
cExtern += " * $" + "Id" + "$" + hb_eol()

View File

@@ -37,7 +37,7 @@ PROCEDURE Main( ... )
LOCAL nErrorLevel := 0
LOCAL aFile
LOCAL tmp
LOCAL tmp, tmp1
LOCAL cOldDir
LOCAL cTar_Name
@@ -74,14 +74,18 @@ PROCEDURE Main( ... )
OutStd( "! Copying root documents..." + hb_eol() )
FOR EACH aFile IN Directory( "Change*" )
mk_hb_FCopy( aFile[ F_NAME ], tmp + hb_ps() + iif( GetEnv( "HB_PLATFORM" ) == "dos", "CHANGES", "" ) )
NEXT
IF DirBuild( tmp )
FOR EACH aFile IN Directory( "Change*" )
mk_hb_FCopy( aFile[ F_NAME ], tmp + hb_ps() + iif( GetEnv( "HB_PLATFORM" ) == "dos", "CHANGES", "" ) )
NEXT
mk_hb_FCopy( "COPYING", tmp + hb_ps() )
mk_hb_FCopy( "INSTALL", tmp + hb_ps() )
mk_hb_FCopy( "NEWS" , tmp + hb_ps() )
mk_hb_FCopy( "TODO" , tmp + hb_ps() )
mk_hb_FCopy( "COPYING", tmp + hb_ps() )
mk_hb_FCopy( "INSTALL", tmp + hb_ps() )
mk_hb_FCopy( "NEWS" , tmp + hb_ps() )
mk_hb_FCopy( "TODO" , tmp + hb_ps() )
ELSE
OutStd( hb_StrFormat( "! Error: Cannot create directory '%1$s'", tmp ) + hb_eol() )
ENDIF
ENDIF
IF ! Empty( GetEnv( "HB_INSTALL_BIN" ) )
@@ -105,14 +109,17 @@ PROCEDURE Main( ... )
OutStd( hb_StrFormat( "! Error: Cannot create directory '%1$s'", GetEnv( "HB_INSTALL_ETC" ) ) + hb_eol() )
ENDIF
IF ! Empty( GetEnv( "HB_INSTALL_LIB" ) )
IF ! Empty( GetEnv( "HB_INSTALL_DYN" ) )
OutStd( "! Creating *nix ld config file..." + hb_eol() )
tmp := GetEnv( "HB_INSTALL_ETC" ) + hb_ps() + ".." + hb_ps() + "ld.so.conf.d"
IF DirBuild( tmp )
/* TOFIX: Put HB_INSTALL_LIB without build sandbox prefix */
hb_MemoWrit( tmp + hb_ps() + "harbour.conf", GetEnv( "HB_INSTALL_LIB" ) + hb_eol() )
tmp1 := GetEnv( "HB_INSTALL_DYN" )
IF Left( tmp1, Len( GetEnv( "HB_INSTALL_PKG_TOP" ) ) ) == GetEnv( "HB_INSTALL_PKG_TOP" )
tmp1 := SubStr( tmp1, Len( GetEnv( "HB_INSTALL_PKG_TOP" ) ) + 1 )
ENDIF
hb_MemoWrit( tmp + hb_ps() + "harbour.conf", tmp1 + hb_eol() )
ELSE
OutStd( hb_StrFormat( "! Error: Cannot create directory '%1$s'", tmp ) + hb_eol() )
ENDIF

View File

@@ -50,7 +50,6 @@ DYNAMIC DLLPREPARECALL
DYNAMIC DLLUNLOAD
DYNAMIC F2BIN
DYNAMIC NUMBUTTONS
DYNAMIC PVALUE
DYNAMIC RUNSHELL
DYNAMIC SETMOUSE
DYNAMIC SIGNAL

View File

@@ -426,22 +426,23 @@ STATIC PROCEDURE build_projects( nAction, hProjectList, hProjectReqList, cOption
cProjectPath := s_cBase + s_cHome + cProject
lPrimary := cProject $ hProjectReqList .OR. "lFromContainer" $ hProjectList[ cProject ]
call_hbmk2( cProjectPath, iif( lPrimary, cOptions + cOptionsUser, " -inc" ), .F. )
IF call_hbmk2( cProjectPath, iif( lPrimary, cOptions + cOptionsUser, " -inc" ), .F. )
/* Build dynamic lib */
IF GetEnv( "HB_BUILD_CONTRIB_DYN" ) == "yes" .AND. hProjectList[ cProject ][ "cType" ] == "hblib"
call_hbmk2( cProjectPath, iif( lPrimary, cOptions + cOptionsUser, " -inc" ), .T. )
ENDIF
/* Build dynamic lib */
IF GetEnv( "HB_BUILD_CONTRIB_DYN" ) == "yes" .AND. hProjectList[ cProject ][ "cType" ] == "hblib"
call_hbmk2( cProjectPath, iif( lPrimary, cOptions + cOptionsUser, " -inc" ), .T. )
ENDIF
/* Compile documentation */
IF lInstall .AND. lPrimary
mk_hbd( FNameDirGet( PathSepToSelf( cProjectPath ) ) )
ENDIF
/* Compile documentation */
IF lInstall .AND. lPrimary
mk_hbd( FNameDirGet( PathSepToSelf( cProjectPath ) ) )
ENDIF
/* Create EXTERN list */
IF lPrimary .AND. hProjectList[ cProject ][ "cType" ] $ "hblib|hbdyn"
mk_extern_lib( PathSepToSelf( hProjectList[ cProject ][ "cOutputName" ] ),;
FNameExtSet( PathSepToSelf( cProjectPath ), ".hbx" ) )
/* Create EXTERN list */
IF lPrimary .AND. hProjectList[ cProject ][ "cType" ] $ "hblib|hbdyn"
mk_extern_lib( PathSepToSelf( hProjectList[ cProject ][ "cOutputName" ] ),;
FNameExtSet( PathSepToSelf( cProjectPath ), ".hbx" ) )
ENDIF
ENDIF
ENDIF
NEXT

View File

@@ -339,7 +339,6 @@ DYNAMIC OS_VERSIONINFO
DYNAMIC PARSESTRING
DYNAMIC PRGEXPTOVAL
DYNAMIC PUTCOUNTER
DYNAMIC PVALUE
DYNAMIC QUERYREGISTRY
DYNAMIC RASCAN
DYNAMIC SCROLLFIXED

View File

@@ -6,6 +6,7 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE := 1
export HB_INSTALL_PKG_TOP := $(CURDIR)/debian/harbour
export HB_INSTALL_BIN := $(CURDIR)/debian/harbour/usr/bin
export HB_INSTALL_LIB := $(CURDIR)/debian/harbour/usr/lib/harbour
export HB_INSTALL_INC := $(CURDIR)/debian/harbour/usr/include/harbour

View File

@@ -100,6 +100,7 @@ export HB_BUILD_PARTS=lib
export HB_PLATFORM=wce
export HB_HOST_BIN="$(pwd)/bin/linux/gcc"
export HB_INSTALL_PKG_TOP=$RPM_BUILD_ROOT
export HB_INSTALL_BIN=$RPM_BUILD_ROOT/%{_bindir}
export HB_INSTALL_INC=$RPM_BUILD_ROOT/%{_includedir}/%{name}
export HB_INSTALL_LIB=$RPM_BUILD_ROOT/%{_libdir}/%{name}

View File

@@ -100,6 +100,7 @@ export HB_BUILD_PARTS=lib
export HB_PLATFORM=win
export HB_HOST_BIN="$(pwd)/bin/linux/gcc"
export HB_INSTALL_PKG_TOP=$RPM_BUILD_ROOT
export HB_INSTALL_BIN=$RPM_BUILD_ROOT/%{_bindir}
export HB_INSTALL_INC=$RPM_BUILD_ROOT/%{_includedir}/%{name}
export HB_INSTALL_LIB=$RPM_BUILD_ROOT/%{_libdir}/%{name}

View File

@@ -61,12 +61,13 @@
%define hb_cflag export HB_USER_CFLAGS=
%define hb_lflag export HB_USER_LDFLAGS=
%define hb_dflag export HB_USER_DFLAGS=
%define shl_path export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}`pwd`/lib/${HB_PLATFORM}/${HB_COMPILER}
%define shl_path export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}`pwd`/lib/${HB_PLATFORM}/${HB_COMPILER}${HB_BUILD_NAME}
%define hb_gpm export HB_WITH_GPM=%{!?_without_gpm:yes}%{?_without_gpm:no}
%define hb_crs export HB_WITH_CURSES=%{!?_without_curses:yes}%{?_without_curses:no}
%define hb_sln export HB_WITH_SLANG=%{!?_without_slang:yes}%{?_without_slang:no}
%define hb_x11 export HB_WITH_X11=%{!?_without_x11:yes}%{?_without_x11:no}
%define hb_local export HB_WITH_ZLIB=%{?_with_localzlib:local} ; export HB_WITH_PCRE=%{?_with_localpcre:local}
%define hb_proot export HB_INSTALL_PKG_TOP=${RPM_BUILD_ROOT}
%define hb_bdir export HB_INSTALL_BIN=${RPM_BUILD_ROOT}%{_bindir}
%define hb_idir export HB_INSTALL_INC=${RPM_BUILD_ROOT}%{_includedir}/%{name}
%define hb_ldir export HB_INSTALL_LIB=${RPM_BUILD_ROOT}%{_libdir}/%{name}
@@ -76,7 +77,7 @@
%define hb_bldsh export HB_BUILD_SHARED=%{!?_with_static:yes}
%define hb_cmrc export HB_BUILD_NOGPLLIB=%{?_without_gpllib:yes}
%define hb_ctrb export HB_BUILD_CONTRIBS="hbblink hbclipsm hbct hbgt hbmisc hbmzip hbnetio hbtip hbtpathy hbhpdf hbziparc hbfoxpro hbsms hbfship hbxpp xhb rddbmcdx rddsql sddsqlt3 hbnf %{?_with_allegro:gtalleg} %{?_with_cairo:hbcairo} %{?_with_cups:hbcups} %{?_with_curl:hbcurl} %{?_with_firebird:hbfbird sddfb} %{?_with_freeimage:hbfimage} %{?_with_gd:hbgd} %{?_with_mysql:hbmysql sddmy} %{?_with_odbc:hbodbc sddodbc} %{?_with_pgsql:hbpgsql sddpg} %{?_with_qt:hbqt hbxbp} %{?_with_ads:rddads}"
%define hb_env %{hb_plat} ; %{hb_cc} ; %{hb_cflag} ; %{hb_lflag} ; %{hb_dflag} ; %{shl_path} ; %{hb_gpm} ; %{hb_crs} ; %{hb_sln} ; %{hb_x11} ; %{hb_local} ; %{hb_bdir} ; %{hb_idir} ; %{hb_ldir} ; %{hb_edir} ; %{hb_mdir} ; %{hb_ctrb} ; %{hb_cmrc} ; %{hb_blds} ; %{hb_bldsh}
%define hb_env %{hb_plat} ; %{hb_cc} ; %{hb_cflag} ; %{hb_lflag} ; %{hb_dflag} ; %{shl_path} ; %{hb_gpm} ; %{hb_crs} ; %{hb_sln} ; %{hb_x11} ; %{hb_local} ; %{hb_proot} ; %{hb_bdir} ; %{hb_idir} ; %{hb_ldir} ; %{hb_edir} ; %{hb_mdir} ; %{hb_ctrb} ; %{hb_cmrc} ; %{hb_blds} ; %{hb_bldsh}
######################################################################
## Preamble.
######################################################################

View File

@@ -52,7 +52,7 @@
#include "hbapi.h"
/* NOTE: This function is a new Harbour functions implemented in the
/* NOTE: This function is a new Harbour function implemented in the
original CA-Cl*pper namespace. It should have been marked as
HB_EXTENSION, but it's not, because it's commonly used extension
in other xbase dialects, like Xbase++ and FlagShip.

View File

@@ -444,6 +444,24 @@ REQUEST hbmk_KEYW
#ifndef _HBMK_EMBEDDED_
#define _ERRLEV_OK 0
#define _ERRLEV_UNKNPLAT 1
#define _ERRLEV_UNKNCOMP 2
#define _ERRLEV_FAILHBDETECT 3
#define _ERRLEV_STUBCREATE 5
#define _ERRLEV_COMPPRG 6
#define _ERRLEV_RUNRES 6
#define _ERRLEV_COMPC 6
#define _ERRLEV_RUNLINKER 7
#define _ERRLEV_RUNLIB 7
#define _ERRLEV_UNSUPPORTED 8
#define _ERRLEV_WORKDIRCREATE 9
#define _ERRLEV_HELP 19
#define _ERRLEV_MISSDEPT 10
#define _ERRLEV_PLUGINPREALL 20
#define _ERRLEV_DEEPPROJNESTING 30
#define _ERRLEV_STOP 50
#define hb_DirCreate( d ) MakeDir( d )
#define hb_DirDelete( d ) DirRemove( d )
@@ -839,7 +857,7 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel )
hbmk[ _HBMK_lStopAfterInit ] := .F.
hbmk[ _HBMK_lStopAfterHarbour ] := .F.
hbmk[ _HBMK_nErrorLevel ] := 0
hbmk[ _HBMK_nErrorLevel ] := _ERRLEV_OK
hbmk[ _HBMK_cWorkDir ] := NIL
@@ -933,7 +951,7 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel )
IF Empty( aArgs )
ShowHeader( hbmk )
ShowHelp( hbmk )
RETURN 19
RETURN _ERRLEV_HELP
ENDIF
/* Process environment */
@@ -1036,34 +1054,34 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel )
ShowHeader( hbmk )
ShowHelp( hbmk, .T. )
RETURN 19
RETURN _ERRLEV_HELP
CASE Left( cParamL, 8 ) == "-hbmake="
convert_hbmake_to_hbp( hbmk, SubStr( cParam, 9 ) )
RETURN 0
RETURN _ERRLEV_OK
CASE Left( cParamL, 5 ) == "-xbp="
convert_xbp_to_hbp( hbmk, SubStr( cParam, 6 ) )
RETURN 0
RETURN _ERRLEV_OK
CASE Left( cParamL, 5 ) == "-xhp="
convert_xhp_to_hbp( hbmk, SubStr( cParam, 6 ) )
RETURN 0
RETURN _ERRLEV_OK
CASE cParamL == "--version"
ShowHeader( hbmk )
RETURN 0
RETURN _ERRLEV_OK
ENDCASE
NEXT
IF nLevel > _HBMK_NEST_MAX
hbmk_OutErr( hbmk, hb_StrFormat( I_( "Error: Cannot nest projects deeper than %1$s levels" ), hb_ntos( _HBMK_NEST_MAX ) ) )
RETURN 30
RETURN _ERRLEV_DEEPPROJNESTING
ENDIF
IF nLevel > 1
@@ -1325,7 +1343,7 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel )
l_aLIBSYSMISC := { "ceshell", "uuid", "ole32", "oleaut32", "wininet", "commdlg", "commctrl" }
OTHERWISE
hbmk_OutErr( hbmk, hb_StrFormat( I_( "Error: Platform value unknown: %1$s" ), hbmk[ _HBMK_cPLAT ] ) )
RETURN 1
RETURN _ERRLEV_UNKNPLAT
ENDCASE
hbmk[ _HBMK_aLIBCOREGT ] := ArrayJoin( aLIB_BASE_GT, l_aLIBHBGT )
@@ -1354,7 +1372,7 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel )
l_cHB_INSTALL_PREFIX := DirAddPathSep( hb_DirBase() ) + ".." + hb_ps() + ".." + hb_ps() + ".."
OTHERWISE
hbmk_OutErr( hbmk, I_( "Error: HB_INSTALL_PREFIX not set, failed to autodetect.\nPlease run this tool from its original location inside the Harbour installation or set HB_INSTALL_PREFIX environment variable to Harbour's root directory." ) )
RETURN 3
RETURN _ERRLEV_FAILHBDETECT
ENDCASE
ENDIF
@@ -1563,12 +1581,12 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel )
ELSE
hbmk_OutErr( hbmk, hb_StrFormat( I_( "Could not detect any supported C compiler in your PATH.\nPlease setup one or set -compiler= option to one of these values: %1$s" ), ArrayToList( aCOMPSUP, ", " ) ) )
ENDIF
RETURN 2
RETURN _ERRLEV_UNKNCOMP
ENDIF
ELSE
IF AScan( aCOMPSUP, {| tmp | tmp == hbmk[ _HBMK_cCOMP ] } ) == 0
hbmk_OutErr( hbmk, hb_StrFormat( I_( "Error: Compiler value unknown: %1$s" ), hbmk[ _HBMK_cCOMP ] ) )
RETURN 2
RETURN _ERRLEV_UNKNCOMP
ENDIF
/* Detect cross platform CCPREFIX and CCPATH if embedded installation is detected */
FOR tmp := 1 TO Len( aCOMPDET_EMBED )
@@ -2260,6 +2278,7 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel )
hbmk[ _HBMK_lStopAfterInit ] := .T.
hbmk[ _HBMK_lRUN ] := .F.
hbmk[ _HBMK_nErrorLevel ] := _ERRLEV_STOP
IF Left( cParamL, Len( "-stop=" ) ) == "-stop="
cParam := MacroProc( hbmk, SubStr( cParam, Len( "-stop=" ) + 1 ), aParam[ _PAR_cFileName ] )
@@ -2693,7 +2712,7 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel )
iif( ! Empty( hbmk[ _HBMK_aOPTPRG ] ), " " + ArrayToList( hbmk[ _HBMK_aOPTPRG ] ), "" )
hb_processRun( AllTrim( cCommand ) )
ENDIF
RETURN 0
RETURN _ERRLEV_OK
ENDIF
/* Strip leading @ char of .clp files */
@@ -2716,7 +2735,7 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel )
/* Start doing the make process. */
IF ! hbmk[ _HBMK_lStopAfterInit ] .AND. ! hbmk[ _HBMK_lCreateImpLib ] .AND. ( Len( hbmk[ _HBMK_aPLUGINPars ] ) + Len( hbmk[ _HBMK_aPRG ] ) + Len( hbmk[ _HBMK_aC ] ) + Len( hbmk[ _HBMK_aCPP ] ) + Len( hbmk[ _HBMK_aOBJUSER ] ) + Len( l_aOBJA ) ) == 0 .AND. ! hbmk[ _HBMK_lContainer ]
hbmk_OutErr( hbmk, I_( "Warning: No source files were specified." ) )
RETURN 0
RETURN _ERRLEV_OK
ENDIF
/* Decide about output name */
@@ -2743,7 +2762,7 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel )
IF hbmk[ _HBMK_lBEEP ]
DoBeep( .F. )
ENDIF
RETURN 9
RETURN _ERRLEV_WORKDIRCREATE
ENDIF
ENDIF
ELSE
@@ -2761,7 +2780,7 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel )
IF hbmk[ _HBMK_lBEEP ]
DoBeep( .F. )
ENDIF
RETURN 9
RETURN _ERRLEV_WORKDIRCREATE
ENDIF
lDeleteWorkDir := .T.
ENDIF
@@ -4339,7 +4358,7 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel )
IF hbmk[ _HBMK_lBEEP ]
DoBeep( .F. )
ENDIF
RETURN 20
RETURN _ERRLEV_PLUGINPREALL
ENDIF
/* ; */
@@ -4566,7 +4585,7 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel )
OutStd( "}}" + hb_eol() )
OutStd( "}}}" + hb_eol() )
RETURN 0
RETURN _ERRLEV_OK
ENDIF
/* Check if we've found all dependencies */
@@ -4576,7 +4595,7 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel )
IF hbmk[ _HBMK_lBEEP ]
DoBeep( .F. )
ENDIF
RETURN 10
RETURN _ERRLEV_MISSDEPT
ENDIF
ENDIF
@@ -4645,7 +4664,7 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel )
IF hbmk[ _HBMK_lBEEP ]
DoBeep( .F. )
ENDIF
RETURN 6
RETURN _ERRLEV_COMPPRG
ENDIF
ENDIF
ENDIF
@@ -4671,7 +4690,7 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel )
IF hbmk[ _HBMK_lBEEP ]
DoBeep( .F. )
ENDIF
RETURN 6
RETURN _ERRLEV_COMPPRG
ENDIF
ENDIF
NEXT
@@ -4707,7 +4726,7 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel )
IF hbmk[ _HBMK_lBEEP ]
DoBeep( .F. )
ENDIF
RETURN 6
RETURN _ERRLEV_COMPPRG
ENDIF
ENDIF
ENDIF
@@ -4889,7 +4908,7 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel )
IF hbmk[ _HBMK_lBEEP ]
DoBeep( .F. )
ENDIF
RETURN 5
RETURN _ERRLEV_STUBCREATE
ENDIF
/* Don't delete stub in workdir in incremental mode. */
IF hbmk[ _HBMK_lINC ]
@@ -4993,7 +5012,7 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel )
IF hbmk[ _HBMK_lBEEP ]
DoBeep( .F. )
ENDIF
RETURN 5
RETURN _ERRLEV_STUBCREATE
ENDIF
/* Don't delete stub in workdir in incremental mode. */
IF hbmk[ _HBMK_lINC ]
@@ -5222,7 +5241,7 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel )
OutErr( cCommand + _OUT_EOL )
ENDIF
IF ! hbmk[ _HBMK_lIGNOREERROR ]
hbmk[ _HBMK_nErrorLevel ] := 6
hbmk[ _HBMK_nErrorLevel ] := _ERRLEV_RUNRES
EXIT
ENDIF
ENDIF
@@ -5264,7 +5283,7 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel )
OutErr( cCommand + _OUT_EOL )
ENDIF
IF ! hbmk[ _HBMK_lIGNOREERROR ]
hbmk[ _HBMK_nErrorLevel ] := 6
hbmk[ _HBMK_nErrorLevel ] := _ERRLEV_RUNRES
ENDIF
ENDIF
@@ -5274,7 +5293,7 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel )
ENDIF
ENDIF
IF hbmk[ _HBMK_nErrorLevel ] == 0
IF hbmk[ _HBMK_nErrorLevel ] == _ERRLEV_OK
IF hbmk[ _HBMK_lINC ] .AND. ! hbmk[ _HBMK_lREBUILD ]
l_aPRG_TODO := {}
@@ -5315,7 +5334,7 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel )
cBin_CompCGEN := cBin_CompCPP
ENDIF
IF hbmk[ _HBMK_nErrorLevel ] == 0 .AND. Len( l_aCGEN_TODO ) > 0
IF hbmk[ _HBMK_nErrorLevel ] == _ERRLEV_OK .AND. Len( l_aCGEN_TODO ) > 0
IF ! Empty( cBin_CompCGEN )
@@ -5347,7 +5366,7 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel )
ELSE
IF ! CompileCLoop( hbmk, aTODO, cBin_CompCGEN, cOpt_CompC, cObjExt, nOpt_Esc, nOpt_FNF, 0, 0 )
IF ! hbmk[ _HBMK_lIGNOREERROR ]
hbmk[ _HBMK_nErrorLevel ] := 6
hbmk[ _HBMK_nErrorLevel ] := _ERRLEV_COMPC
EXIT
ENDIF
ENDIF
@@ -5359,7 +5378,7 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel )
hb_threadJoin( thread, @tmp )
IF ! tmp
IF ! hbmk[ _HBMK_lIGNOREERROR ]
hbmk[ _HBMK_nErrorLevel ] := 6
hbmk[ _HBMK_nErrorLevel ] := _ERRLEV_COMPC
ENDIF
ENDIF
NEXT
@@ -5435,7 +5454,7 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel )
OutErr( cCommand + _OUT_EOL )
ENDIF
IF ! hbmk[ _HBMK_lIGNOREERROR ]
hbmk[ _HBMK_nErrorLevel ] := 6
hbmk[ _HBMK_nErrorLevel ] := _ERRLEV_COMPC
EXIT
ENDIF
ENDIF
@@ -5460,7 +5479,7 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel )
OutErr( thread[ 2 ] + _OUT_EOL )
ENDIF
IF ! hbmk[ _HBMK_lIGNOREERROR ]
hbmk[ _HBMK_nErrorLevel ] := 6
hbmk[ _HBMK_nErrorLevel ] := _ERRLEV_COMPC
ENDIF
ENDIF
NEXT
@@ -5475,13 +5494,13 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel )
ENDIF
ELSE
hbmk_OutErr( hbmk, I_( "Error: C/C++ command is not implemented for this platform/compiler." ) )
hbmk[ _HBMK_nErrorLevel ] := 8
hbmk[ _HBMK_nErrorLevel ] := _ERRLEV_UNSUPPORTED
ENDIF
ENDIF
NEXT
ENDIF
IF hbmk[ _HBMK_nErrorLevel ] == 0
IF hbmk[ _HBMK_nErrorLevel ] == _ERRLEV_OK
lTargetUpToDate := .F.
@@ -5523,7 +5542,7 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel )
ENDIF
ENDIF
IF hbmk[ _HBMK_nErrorLevel ] == 0 .AND. ( Len( l_aOBJ ) + Len( hbmk[ _HBMK_aOBJUSER ] ) + Len( l_aOBJA ) ) > 0 .AND. ! hbmk[ _HBMK_lCLEAN ]
IF hbmk[ _HBMK_nErrorLevel ] == _ERRLEV_OK .AND. ( Len( l_aOBJ ) + Len( hbmk[ _HBMK_aOBJUSER ] ) + Len( l_aOBJA ) ) > 0 .AND. ! hbmk[ _HBMK_lCLEAN ]
IF lTargetUpToDate
hbmk_OutStd( hbmk, hb_StrFormat( I_( "Target up to date: %1$s" ), hbmk[ _HBMK_cPROGNAME ] ) )
@@ -5609,7 +5628,7 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel )
OutErr( cCommand + _OUT_EOL )
ENDIF
IF ! hbmk[ _HBMK_lIGNOREERROR ]
hbmk[ _HBMK_nErrorLevel ] := 7
hbmk[ _HBMK_nErrorLevel ] := _ERRLEV_RUNLINKER
ENDIF
ENDIF
@@ -5617,11 +5636,11 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel )
FErase( cScriptFile )
ENDIF
IF hbmk[ _HBMK_nErrorLevel ] == 0
IF hbmk[ _HBMK_nErrorLevel ] == _ERRLEV_OK
l_lIMPLIBToProcess := .T.
ENDIF
IF hbmk[ _HBMK_nErrorLevel ] == 0 .AND. hbmk[ _HBMK_lGUI ] .AND. hbmk[ _HBMK_cPLAT ] == "darwin"
IF hbmk[ _HBMK_nErrorLevel ] == _ERRLEV_OK .AND. hbmk[ _HBMK_lGUI ] .AND. hbmk[ _HBMK_cPLAT ] == "darwin"
/* Build app bundle for OS X GUI apps. (experimental) */
tmp := FNameDirGet( hbmk[ _HBMK_cPROGNAME ] )
IF ! Empty( tmp )
@@ -5706,7 +5725,7 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel )
OutErr( cCommand + _OUT_EOL )
ENDIF
IF ! hbmk[ _HBMK_lIGNOREERROR ]
hbmk[ _HBMK_nErrorLevel ] := 7
hbmk[ _HBMK_nErrorLevel ] := _ERRLEV_RUNLINKER
ENDIF
ENDIF
@@ -5714,7 +5733,7 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel )
FErase( cScriptFile )
ENDIF
IF hbmk[ _HBMK_nErrorLevel ] == 0
IF hbmk[ _HBMK_nErrorLevel ] == _ERRLEV_OK
l_lIMPLIBToProcess := .T.
ENDIF
@@ -5774,7 +5793,7 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel )
OutErr( cCommand + _OUT_EOL )
ENDIF
IF ! hbmk[ _HBMK_lIGNOREERROR ]
hbmk[ _HBMK_nErrorLevel ] := 7
hbmk[ _HBMK_nErrorLevel ] := _ERRLEV_RUNLIB
ENDIF
ENDIF
@@ -5845,7 +5864,7 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel )
DirUnbuild( hbmk[ _HBMK_cWorkDir ] )
ENDIF
IF hbmk[ _HBMK_nErrorLevel ] == 0 .AND. ! hbmk[ _HBMK_lCLEAN ] .AND. ! lTargetUpToDate .AND. ;
IF hbmk[ _HBMK_nErrorLevel ] == _ERRLEV_OK .AND. ! hbmk[ _HBMK_lCLEAN ] .AND. ! lTargetUpToDate .AND. ;
( ! lStopAfterCComp .OR. hbmk[ _HBMK_lCreateLib ] .OR. hbmk[ _HBMK_lCreateDyn ] )
IF ! Empty( cBin_Post )
@@ -5944,7 +5963,7 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel )
ENDIF
ENDIF
IF hbmk[ _HBMK_nErrorLevel ] == 0 .AND. ! hbmk[ _HBMK_lCLEAN ] .AND. ;
IF hbmk[ _HBMK_nErrorLevel ] == _ERRLEV_OK .AND. ! hbmk[ _HBMK_lCLEAN ] .AND. ;
( ! lStopAfterCComp .OR. hbmk[ _HBMK_lCreateLib ] .OR. hbmk[ _HBMK_lCreateDyn ] )
DoInstCopy( hbmk )
@@ -5960,12 +5979,12 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel )
ENDIF
IF ! lSkipBuild .AND. hbmk[ _HBMK_lBEEP ]
DoBeep( hbmk[ _HBMK_nErrorLevel ] == 0 )
DoBeep( hbmk[ _HBMK_nErrorLevel ] == _ERRLEV_OK )
ENDIF
IF ! hbmk[ _HBMK_lStopAfterHarbour ] .AND. ! lStopAfterCComp .AND. ;
! hbmk[ _HBMK_lCreateLib ] .AND. ! hbmk[ _HBMK_lCreateDyn ] .AND. ;
hbmk[ _HBMK_nErrorLevel ] == 0 .AND. ! hbmk[ _HBMK_lCLEAN ] .AND. hbmk[ _HBMK_lRUN ]
hbmk[ _HBMK_nErrorLevel ] == _ERRLEV_OK .AND. ! hbmk[ _HBMK_lCLEAN ] .AND. hbmk[ _HBMK_lRUN ]
cCommand := hbmk[ _HBMK_cPROGNAME ]
#if defined( __PLATFORM__UNIX )
IF Empty( FNameDirGet( hbmk[ _HBMK_cPROGNAME ] ) )
@@ -8691,6 +8710,7 @@ STATIC FUNCTION HBC_ProcessOne( hbmk, cFileName, nNestingLevel )
hbmk[ _HBMK_lStopAfterInit ] := .T.
hbmk[ _HBMK_lRUN ] := .F.
hbmk[ _HBMK_nErrorLevel ] := _ERRLEV_STOP
EXIT
CASE Lower( Left( cLine, Len( "prgflags=" ) ) ) == "prgflags=" ; cLine := SubStr( cLine, Len( "prgflags=" ) + 1 )