2010-07-09 22:49 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* utils/hbmk2/hbmk2.prg
+ --hbrefs option renamed to --hbinfo and now also includes
target type.
+ Extended target detection with 'hbppo' and 'hbhrb' types.
These are automatically detected from Harbour option usage.
+ Added ${hb_outputname} macro. Returns the output name as
specified with -o option, without extension. Returns empty
if there wasn't -o option at the point of usage.
+ Added ${hb_outputdir} macro. Returns the output dir as
specified with -o option. Returns empty if there wasn't
-o option at the point of usage.
+ -p -s options don't require to manually select -hbraw
mode, it will be autodetected.
! Fixed to not interpret -i- Harbour option as include dir.
+ Don't add the same Harbour option twice.
* contrib/Makefile
* contrib/make.hbs
+ contrib/hbpost.hbm
+ contrib/hbpre.hbm
% Cleaned the way build options are passed to hbmk2.
+ Synced much more options and build behavior of hbmk2
based contrib build with GNU Make build (debug, unicode,
warnings, Harbour settings, C settings)
+ Added more projects to hbmk2 build method.
% Deleted MS-DOS specific hack (for now) because the new
cmdlines are very short.
; TODO: Now make.hbs is not self-contained, which would
better be solved somehow.
* contrib/make.hbs
+ It will now detect and show target type in stdalone mode.
+ Synced default build options with GNU Make.
* contrib/hbqt/hbqts.hbp
* contrib/hbqt/hbqtguis.hbp
* contrib/hbqt/hbqtcores.hbp
* contrib/hbqt/hbqtnetworks.hbp
+ Added -hblib option to make it easy to detect target type
for 3rd party tools.
* contrib/hbnetio/utils/netiosrv.prg
+ Will now also accept .hbs and .prg files as RPC filters.
- contrib/hbnetio/utils/modules
* contrib/hbnetio/utils/modules.hbp
+ contrib/hbnetio/utils/rpcdemo.hbs
* Renamed RPC demo to .hbs.
* Deleted modules subdir.
- contrib/hbnetio/utils/hbmk.hbm
* contrib/hbnetio/utils/hbnetio.hbp
- Deleted separate hbmk.hbm.
* contrib/hbnetio/utils/netiocmd.prg
! Minor in help screen.
* contrib/hbnetio/tests/netiotst.prg
+ Added some feedback.
This commit is contained in:
@@ -16,6 +16,67 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2010-07-09 22:49 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* utils/hbmk2/hbmk2.prg
|
||||
+ --hbrefs option renamed to --hbinfo and now also includes
|
||||
target type.
|
||||
+ Extended target detection with 'hbppo' and 'hbhrb' types.
|
||||
These are automatically detected from Harbour option usage.
|
||||
+ Added ${hb_outputname} macro. Returns the output name as
|
||||
specified with -o option, without extension. Returns empty
|
||||
if there wasn't -o option at the point of usage.
|
||||
+ Added ${hb_outputdir} macro. Returns the output dir as
|
||||
specified with -o option. Returns empty if there wasn't
|
||||
-o option at the point of usage.
|
||||
+ -p -s options don't require to manually select -hbraw
|
||||
mode, it will be autodetected.
|
||||
! Fixed to not interpret -i- Harbour option as include dir.
|
||||
+ Don't add the same Harbour option twice.
|
||||
|
||||
* contrib/Makefile
|
||||
* contrib/make.hbs
|
||||
+ contrib/hbpost.hbm
|
||||
+ contrib/hbpre.hbm
|
||||
% Cleaned the way build options are passed to hbmk2.
|
||||
+ Synced much more options and build behavior of hbmk2
|
||||
based contrib build with GNU Make build (debug, unicode,
|
||||
warnings, Harbour settings, C settings)
|
||||
+ Added more projects to hbmk2 build method.
|
||||
% Deleted MS-DOS specific hack (for now) because the new
|
||||
cmdlines are very short.
|
||||
; TODO: Now make.hbs is not self-contained, which would
|
||||
better be solved somehow.
|
||||
|
||||
* contrib/make.hbs
|
||||
+ It will now detect and show target type in stdalone mode.
|
||||
+ Synced default build options with GNU Make.
|
||||
|
||||
* contrib/hbqt/hbqts.hbp
|
||||
* contrib/hbqt/hbqtguis.hbp
|
||||
* contrib/hbqt/hbqtcores.hbp
|
||||
* contrib/hbqt/hbqtnetworks.hbp
|
||||
+ Added -hblib option to make it easy to detect target type
|
||||
for 3rd party tools.
|
||||
|
||||
* contrib/hbnetio/utils/netiosrv.prg
|
||||
+ Will now also accept .hbs and .prg files as RPC filters.
|
||||
|
||||
- contrib/hbnetio/utils/modules
|
||||
* contrib/hbnetio/utils/modules.hbp
|
||||
+ contrib/hbnetio/utils/rpcdemo.hbs
|
||||
* Renamed RPC demo to .hbs.
|
||||
* Deleted modules subdir.
|
||||
|
||||
- contrib/hbnetio/utils/hbmk.hbm
|
||||
* contrib/hbnetio/utils/hbnetio.hbp
|
||||
- Deleted separate hbmk.hbm.
|
||||
|
||||
* contrib/hbnetio/utils/netiocmd.prg
|
||||
! Minor in help screen.
|
||||
|
||||
* contrib/hbnetio/tests/netiotst.prg
|
||||
+ Added some feedback.
|
||||
|
||||
2010-07-09 16:22 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* src/rtl/gtsys.c
|
||||
! Added hack to fix setting default GT in bcc C++ builds.
|
||||
|
||||
@@ -6,8 +6,6 @@ ROOT := ../
|
||||
|
||||
# contribs _without_ external dependencies
|
||||
DIRS := \
|
||||
gtwvg \
|
||||
hbbz2 \
|
||||
hbcomm \
|
||||
hbct \
|
||||
hbfoxpro \
|
||||
@@ -28,6 +26,8 @@ DIRS := \
|
||||
xhb \
|
||||
|
||||
# under testing in make.hbs
|
||||
# gtwvg \
|
||||
# hbbz2 \
|
||||
# hbblink \
|
||||
# hbclipsm \
|
||||
# hbnetio \
|
||||
@@ -35,8 +35,6 @@ DIRS := \
|
||||
|
||||
# contribs _with_ external dependencies
|
||||
DIRS += \
|
||||
gtalleg \
|
||||
hbblat \
|
||||
hbcairo \
|
||||
hbcups \
|
||||
hbcurl \
|
||||
@@ -57,6 +55,10 @@ DIRS += \
|
||||
sddpg \
|
||||
sddsqlt3 \
|
||||
|
||||
# under testing in make.hbs
|
||||
# hbblat \
|
||||
# gtalleg \
|
||||
|
||||
# contribs dependent on above
|
||||
DIRS += \
|
||||
hbxbp \
|
||||
|
||||
@@ -56,6 +56,7 @@ proc main()
|
||||
iif( netio_funcexec( "MakeDir", "./data" ) == -1, "error", "OK" )
|
||||
endif
|
||||
|
||||
? "'" + DBNAME + "'"
|
||||
createdb( DBNAME )
|
||||
testdb( DBNAME )
|
||||
wait
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
../hbnetio.hbc
|
||||
-mt
|
||||
|
||||
-w3 -es2
|
||||
@@ -2,8 +2,10 @@
|
||||
# $Id$
|
||||
#
|
||||
|
||||
# Add it explicitly to allow calling this .hbp from other dirs.
|
||||
hbmk.hbm
|
||||
../hbnetio.hbc
|
||||
-mt
|
||||
|
||||
-w3 -es2 -l
|
||||
|
||||
-o${hb_name}
|
||||
|
||||
@@ -13,3 +15,5 @@ netiocmd.prg
|
||||
-ldflag={allmsvc}-nxcompat
|
||||
-ldflag={allmsvc}-dynamicbase
|
||||
-ldflag={allmsvc}-fixed:no
|
||||
|
||||
-prgflag=-DHB_EXTERN
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
#
|
||||
|
||||
-gh
|
||||
modules/*.prg
|
||||
*.hbs
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
STATIC FUNCTION HBNETIOSRV_RPCMAIN( sFunc, ... )
|
||||
|
||||
OutStd( "DO", sFunc:name, "WITH", ..., hb_osNewLine() )
|
||||
|
||||
RETURN sFunc:exec( ... )
|
||||
@@ -64,7 +64,7 @@ STATIC PROCEDURE cmdHelp( hCommands )
|
||||
AAdd( aTexts, PadR( " <Up>", m ) + " - Move up on historic list." )
|
||||
AAdd( aTexts, PadR( " <Down>", m ) + " - Move down on historic list." )
|
||||
AAdd( aTexts, PadR( " <Tab>", m ) + " - Complete command." )
|
||||
AAdd( aTexts, PadR( " <Alt+V>", m ) + " - Paste Clipboard contents (if apropriate)." )
|
||||
AAdd( aTexts, PadR( " <Alt+V>", m ) + " - Paste from clipboard." )
|
||||
|
||||
c := 0
|
||||
m := MaxRow()
|
||||
|
||||
@@ -23,13 +23,14 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "hbhrb.ch"
|
||||
|
||||
#include "color.ch"
|
||||
#include "hbgtinfo.ch"
|
||||
#include "fileio.ch"
|
||||
#include "inkey.ch"
|
||||
#include "setcurs.ch"
|
||||
|
||||
#include "hbgtinfo.ch"
|
||||
#include "hbhrb.ch"
|
||||
|
||||
/* netio_mtserver() needs MT HVM version */
|
||||
REQUEST HB_MT
|
||||
|
||||
@@ -70,6 +71,9 @@ PROCEDURE Main( ... )
|
||||
LOCAL nPos
|
||||
LOCAL aCmd
|
||||
|
||||
LOCAL cExt
|
||||
LOCAL cFile
|
||||
|
||||
LOCAL aHistory, nHistIndex
|
||||
|
||||
HB_Logo()
|
||||
@@ -93,7 +97,29 @@ PROCEDURE Main( ... )
|
||||
hb_StrClear( @cParam )
|
||||
CASE Lower( Left( cParam, 5 ) ) == "-rpc="
|
||||
netiosrv[ _NETIOSRV_cRPCFFileName ] := SubStr( cParam, 6 )
|
||||
netiosrv[ _NETIOSRV_cRPCFHRB ] := hb_hrbLoad( HB_HRB_BIND_FORCELOCAL, netiosrv[ _NETIOSRV_cRPCFFileName ] )
|
||||
hb_FNameSplit( netiosrv[ _NETIOSRV_cRPCFFileName ], NIL, NIL, @cExt )
|
||||
cExt := Lower( cExt )
|
||||
SWITCH cExt
|
||||
CASE ".prg"
|
||||
CASE ".hbs"
|
||||
CASE ".hrb"
|
||||
EXIT
|
||||
OTHERWISE
|
||||
cExt := FileSig( cFile )
|
||||
ENDSWITCH
|
||||
SWITCH cExt
|
||||
CASE ".prg"
|
||||
CASE ".hbs"
|
||||
cFile := HB_COMPILEBUF( HB_ARGV( 0 ), "-n2", "-w", "-es2", "-q0",;
|
||||
"-D" + "__HBSCRIPT__HBNETIOSRV", netiosrv[ _NETIOSRV_cRPCFFileName ] )
|
||||
IF cFile != NIL
|
||||
netiosrv[ _NETIOSRV_cRPCFHRB ] := hb_hrbLoad( HB_HRB_BIND_FORCELOCAL, cFile )
|
||||
ENDIF
|
||||
EXIT
|
||||
OTHERWISE
|
||||
netiosrv[ _NETIOSRV_cRPCFHRB ] := hb_hrbLoad( HB_HRB_BIND_FORCELOCAL, netiosrv[ _NETIOSRV_cRPCFFileName ] )
|
||||
EXIT
|
||||
ENDSWITCH
|
||||
netiosrv[ _NETIOSRV_lRPC ] := ! Empty( netiosrv[ _NETIOSRV_cRPCFHRB ] ) .AND. ! Empty( hb_hrbGetFunSym( netiosrv[ _NETIOSRV_cRPCFHRB ], _RPC_FILTER ) )
|
||||
IF ! netiosrv[ _NETIOSRV_lRPC ]
|
||||
netiosrv[ _NETIOSRV_cRPCFFileName ] := NIL
|
||||
@@ -213,6 +239,24 @@ PROCEDURE Main( ... )
|
||||
|
||||
RETURN
|
||||
|
||||
STATIC FUNCTION FileSig( cFile )
|
||||
LOCAL hFile
|
||||
LOCAL cBuff, cSig, cExt
|
||||
|
||||
cExt := ".prg"
|
||||
hFile := FOpen( cFile, FO_READ )
|
||||
IF hFile != F_ERROR
|
||||
cSig := hb_hrbSignature()
|
||||
cBuff := Space( Len( cSig ) )
|
||||
FRead( hFile, @cBuff, Len( cSig ) )
|
||||
FClose( hFile )
|
||||
IF cBuff == cSig
|
||||
cExt := ".hrb"
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
RETURN cExt
|
||||
|
||||
/* Complete the command line, based on the first characters that the user typed. [vailtom] */
|
||||
STATIC PROCEDURE CompleteCmd( cCommand, hCommands )
|
||||
LOCAL s := Lower( AllTrim( cCommand ) )
|
||||
|
||||
18
harbour/contrib/hbnetio/utils/rpcdemo.hbs
Normal file
18
harbour/contrib/hbnetio/utils/rpcdemo.hbs
Normal file
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* RPC demo module for hbnetio server.
|
||||
* Usage: 'hbnetio -rpc=rpcdemo.hbs'
|
||||
*
|
||||
* Copyright 2010 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* www - http://www.harbour-project.org
|
||||
*
|
||||
*/
|
||||
|
||||
STATIC FUNCTION HBNETIOSRV_RPCMAIN( sFunc, ... )
|
||||
|
||||
OutStd( "DO", sFunc:name, "WITH", ..., hb_osNewLine() )
|
||||
|
||||
RETURN sFunc:exec( ... )
|
||||
20
harbour/contrib/hbpost.hbm
Normal file
20
harbour/contrib/hbpost.hbm
Normal file
@@ -0,0 +1,20 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
# These are mandatory in Harbour SVN, they will always
|
||||
# override project options.
|
||||
|
||||
-w3 -es2 -kmo -i-
|
||||
-warn=yes
|
||||
-cflag=-DHB_LEGACY_TYPES_OFF
|
||||
{allwin&!(HB_BUILD_UNICODE='no')}-cflag=-DUNICODE
|
||||
|
||||
{HB_BUILD_DEBUG}-l-
|
||||
{HB_BUILD_DEBUG}-debug
|
||||
{HB_BUILD_DEBUG}-cflag=-DHB_TR_LEVEL_DEBUG
|
||||
|
||||
{hblib|hbimplib}-o../../lib/${hb_plat}/${hb_comp}${hb_build}/
|
||||
{hbexe|hbdyn}-o../../bin/${hb_plat}/${hb_comp}${hb_build}/
|
||||
|
||||
-workdir=${hb_outputdir}${hb_work}/${hb_outputname}${hb_workdynsub}
|
||||
15
harbour/contrib/hbpre.hbm
Normal file
15
harbour/contrib/hbpre.hbm
Normal file
@@ -0,0 +1,15 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
-q0
|
||||
|
||||
{!_HB_BUILD_MIGR}-quiet
|
||||
{_HB_BUILD_MIGR}-info
|
||||
{_HB_BUILD_MIGR}-trace
|
||||
|
||||
{!HB_BUILD_DEBUG}-l
|
||||
{HB_BUILD_NAME}-build=${HB_BUILD_NAME}
|
||||
|
||||
{HB_BUILD_MODE='cpp'}-cpp=yes
|
||||
{HB_BUILD_MODE='c'}-cpp=no
|
||||
@@ -6,6 +6,8 @@
|
||||
|
||||
hbqtcore.hbp
|
||||
|
||||
-hblib
|
||||
|
||||
-o${hb_name}
|
||||
-workdir=${hb_work}/${hb_plat}/${hb_comp}/${hb_name}
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
|
||||
-stop{!HB_QT_BUILD_STATIC|!allwin}
|
||||
|
||||
-hblib
|
||||
|
||||
hbqtgui.hbp
|
||||
|
||||
-o${hb_name}
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
|
||||
hbqtnetwork.hbp
|
||||
|
||||
-hblib
|
||||
|
||||
-o${hb_name}
|
||||
-workdir=${hb_work}/${hb_plat}/${hb_comp}/${hb_name}
|
||||
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
|
||||
hbqt.hbp
|
||||
|
||||
-hblib
|
||||
|
||||
-o${hb_name}
|
||||
-workdir=${hb_work}/${hb_plat}/${hb_comp}/${hb_name}
|
||||
|
||||
|
||||
@@ -38,11 +38,28 @@
|
||||
#define _ACT_INC_INST 3
|
||||
#define _ACT_INC_REBUILD_INST 4
|
||||
|
||||
STATIC s_cBase
|
||||
STATIC s_cHome
|
||||
STATIC s_cRoot
|
||||
|
||||
STATIC s_lTest
|
||||
STATIC s_lMigr
|
||||
|
||||
PROCEDURE Main( ... )
|
||||
|
||||
s_cBase := ""
|
||||
s_cHome := StrTran( hb_DirBase(), hb_ps(), "/" )
|
||||
s_cRoot := s_cHome + "../"
|
||||
|
||||
s_lMigr := "migr" $ hb_cmdLine()
|
||||
|
||||
IF s_lMigr
|
||||
hb_setenv( "_HB_BUILD_MIGR", "yes" )
|
||||
ENDIF
|
||||
|
||||
/* Making sure that user settings do not interfere with the std build process. */
|
||||
hb_setenv( "HBMK_OPTIONS" )
|
||||
|
||||
IF Empty( GetEnv( "HB_HOST_BIN_DIR" ) )
|
||||
StandAlone( ... )
|
||||
ELSE
|
||||
@@ -63,9 +80,6 @@ PROCEDURE Main( ... )
|
||||
|
||||
*/
|
||||
PROCEDURE StandAlone( ... )
|
||||
LOCAL cBase := ""
|
||||
LOCAL cRoot := StrTran( hb_DirBase(), hb_ps(), "/" ) + "../"
|
||||
|
||||
LOCAL aParams
|
||||
LOCAL aLibs
|
||||
|
||||
@@ -76,7 +90,6 @@ PROCEDURE StandAlone( ... )
|
||||
LOCAL cBaseOptions
|
||||
LOCAL cOptionsPre
|
||||
LOCAL cOptionsPost
|
||||
LOCAL cTargetDir
|
||||
|
||||
LOCAL nAction
|
||||
LOCAL tmp
|
||||
@@ -119,19 +132,7 @@ PROCEDURE StandAlone( ... )
|
||||
|
||||
/* Converting build options to hbmk2 options */
|
||||
|
||||
cBaseOptions := "-quiet -lang=en -width=0 -q0"
|
||||
|
||||
IF GetEnv( "HB_BUILD_MODE" ) == "cpp"
|
||||
cBaseOptions += " -cpp=yes"
|
||||
ELSEIF GetEnv( "HB_BUILD_MODE" ) == "c"
|
||||
cBaseOptions += " -cpp=no"
|
||||
ENDIF
|
||||
IF GetEnv( "HB_BUILD_DEBUG" ) == "yes"
|
||||
cBaseOptions += " -debug"
|
||||
ENDIF
|
||||
IF ! Empty( GetEnv( "HB_BUILD_NAME" ) )
|
||||
cBaseOptions += " -build=" + GetEnv( "HB_BUILD_NAME" )
|
||||
ENDIF
|
||||
cBaseOptions := ""
|
||||
|
||||
FOR EACH tmp IN aParams
|
||||
IF !( tmp $ "install|clean" )
|
||||
@@ -141,11 +142,12 @@ PROCEDURE StandAlone( ... )
|
||||
|
||||
FOR EACH cProject IN aLibs
|
||||
|
||||
FOR EACH tmp IN call_hbmk2_dept( cRoot + "bin" + hb_ps(), cBase + cProject )
|
||||
FOR EACH tmp IN call_hbmk2_dept( s_cRoot + "bin" + hb_ps(), s_cBase + cProject, @cType )
|
||||
OutStd( cProject + " depends on: " + tmp + hb_eol() )
|
||||
NEXT
|
||||
OutStd( cProject + " type: " + cType + hb_eol() )
|
||||
|
||||
cType := get_hbmk2_project_type( cBase + cProject )
|
||||
cType := get_hbmk2_project_type( s_cBase + cProject )
|
||||
|
||||
cProject := StrTran( cProject, "\", "/" )
|
||||
|
||||
@@ -155,16 +157,13 @@ PROCEDURE StandAlone( ... )
|
||||
SWITCH cType
|
||||
CASE "hblib"
|
||||
CASE "hbimplib"
|
||||
cTargetDir := cRoot + "lib/${hb_plat}/${hb_comp}${hb_build}"
|
||||
EXIT
|
||||
CASE "hbdyn"
|
||||
cTargetDir := cRoot + "bin/${hb_plat}/${hb_comp}${hb_build}"
|
||||
IF GetEnv( "HB_BUILD_SHARED" ) == "yes"
|
||||
cOptionsPre += " -shared"
|
||||
ENDIF
|
||||
EXIT
|
||||
CASE "hbexe"
|
||||
cTargetDir := cRoot + "bin/${hb_plat}/${hb_comp}${hb_build}"
|
||||
IF GetEnv( "HB_BUILD_SHARED" ) == "yes"
|
||||
cOptionsPre += " -shared"
|
||||
ENDIF
|
||||
@@ -184,7 +183,7 @@ PROCEDURE StandAlone( ... )
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
call_hbmk2( cRoot + "bin" + hb_ps(), cBase + cProject, cTargetDir, cOptionsPre, cOptionsPost, .F. )
|
||||
call_hbmk2( s_cRoot + "bin" + hb_ps(), s_cBase + cProject, cOptionsPre, cOptionsPost )
|
||||
NEXT
|
||||
|
||||
ErrorLevel( 0 )
|
||||
@@ -207,9 +206,6 @@ PROCEDURE StandAlone( ... )
|
||||
*/
|
||||
|
||||
PROCEDURE GNUMake( ... )
|
||||
LOCAL cBase := ""
|
||||
LOCAL cRoot := "../"
|
||||
|
||||
LOCAL aImpLibs := {;
|
||||
"gtalleg/gtalleg.hbi" ,;
|
||||
"hbblat/hbblat.hbi" ,;
|
||||
@@ -306,7 +302,6 @@ PROCEDURE GNUMake( ... )
|
||||
LOCAL cProject
|
||||
LOCAL cProjectDir
|
||||
LOCAL cInstallDirVar
|
||||
LOCAL cTargetDir
|
||||
|
||||
LOCAL cBaseOptions
|
||||
LOCAL cOptionsPre
|
||||
@@ -321,20 +316,22 @@ PROCEDURE GNUMake( ... )
|
||||
LOCAL tmp
|
||||
LOCAL nAction
|
||||
|
||||
s_lMigr := "migr" $ hb_cmdLine()
|
||||
|
||||
IF s_lMigr
|
||||
OutStd( "! New contrib make orchestrator test run. |" + hb_cmdLine() + "|" + GetEnv( "HB_MAKECMDGOALS" ) + "|" + hb_dirBase() + "|" + CurDir() + "|" + hb_eol() )
|
||||
|
||||
/* testing with a limited set of contribs */
|
||||
aLibsPass1 := {;
|
||||
"hbblat/hbblat.hbp" ,;
|
||||
"hbblink/hbblink.hbp" ,;
|
||||
"hbbz2/hbbz2.hbp" ,; /* uses: bz2 (external) */
|
||||
"hbclipsm/hbclipsm.hbp" ,;
|
||||
"hbnetio/hbnetio.hbp" ,;
|
||||
"rddbmcdx/hbbmcdx.hbp" }
|
||||
aLibsPass2 := {}
|
||||
aLibsPass3 := {}
|
||||
aLibsPass2 := {;
|
||||
"gtalleg/gtalleg.hbp" ,;
|
||||
"gtalleg/gtallegs.hbp" ,;
|
||||
"hbblat/hbblat.hbp" }
|
||||
aLibsPass3 := {;
|
||||
"gtwvg/gtwvg.hbp" } /* uses: hbwin */
|
||||
aUtils := {;
|
||||
"hbnetio/utils/hbnetio.hbp" }
|
||||
ENDIF
|
||||
@@ -397,22 +394,7 @@ PROCEDURE GNUMake( ... )
|
||||
|
||||
/* Converting build options to hbmk2 options */
|
||||
|
||||
cBaseOptions := "-quiet -lang=en -width=0 -q0"
|
||||
IF s_lMigr
|
||||
cBaseOptions += " -quiet- -info -trace"
|
||||
ENDIF
|
||||
|
||||
IF GetEnv( "HB_BUILD_MODE" ) == "cpp"
|
||||
cBaseOptions += " -cpp=yes"
|
||||
ELSEIF GetEnv( "HB_BUILD_MODE" ) == "c"
|
||||
cBaseOptions += " -cpp=no"
|
||||
ENDIF
|
||||
IF GetEnv( "HB_BUILD_DEBUG" ) == "yes"
|
||||
cBaseOptions += " -debug"
|
||||
ENDIF
|
||||
IF ! Empty( GetEnv( "HB_BUILD_NAME" ) )
|
||||
cBaseOptions += " -build=" + GetEnv( "HB_BUILD_NAME" )
|
||||
ENDIF
|
||||
cBaseOptions := ""
|
||||
|
||||
/* Clearing envvars that may interact with hbmk2 */
|
||||
|
||||
@@ -423,17 +405,11 @@ PROCEDURE GNUMake( ... )
|
||||
hb_setenv( "_HB_INC_INSTALL", GetEnv( "HB_INC_INSTALL" ) )
|
||||
|
||||
/* Override hbmk2 autodetection */
|
||||
hb_setenv( "HB_INSTALL_PREFIX", cRoot )
|
||||
hb_setenv( "HB_BIN_INSTALL", cRoot + "bin/" + GetEnv( "HB_PLATFORM" ) + "/" + GetEnv( "HB_COMPILER" ) + GetEnv( "HB_BUILD_NAME" ) )
|
||||
hb_setenv( "HB_LIB_INSTALL", cRoot + "lib/" + GetEnv( "HB_PLATFORM" ) + "/" + GetEnv( "HB_COMPILER" ) + GetEnv( "HB_BUILD_NAME" ) )
|
||||
hb_setenv( "HB_INSTALL_PREFIX", s_cRoot )
|
||||
hb_setenv( "HB_BIN_INSTALL", s_cRoot + "bin/" + GetEnv( "HB_PLATFORM" ) + "/" + GetEnv( "HB_COMPILER" ) + GetEnv( "HB_BUILD_NAME" ) )
|
||||
hb_setenv( "HB_LIB_INSTALL", s_cRoot + "lib/" + GetEnv( "HB_PLATFORM" ) + "/" + GetEnv( "HB_COMPILER" ) + GetEnv( "HB_BUILD_NAME" ) )
|
||||
hb_setenv( "HB_DYN_INSTALL" )
|
||||
hb_setenv( "HB_INC_INSTALL", cRoot + "include" )
|
||||
|
||||
/* Using shorter vars to save on cmdline length */
|
||||
hb_setenv( "_HB_B_", GetEnv( "HB_BIN_INSTALL" ) )
|
||||
hb_setenv( "_HB_L_", GetEnv( "HB_LIB_INSTALL" ) )
|
||||
hb_setenv( "_HB_D_", GetEnv( "HB_DYN_INSTALL" ) )
|
||||
hb_setenv( "_HB_I_", GetEnv( "HB_INC_INSTALL" ) )
|
||||
hb_setenv( "HB_INC_INSTALL", s_cRoot + "include" )
|
||||
|
||||
/* Parse filter */
|
||||
|
||||
@@ -463,7 +439,7 @@ PROCEDURE GNUMake( ... )
|
||||
|
||||
IF ! Empty( cProject )
|
||||
|
||||
cType := get_hbmk2_project_type( cBase + cProject )
|
||||
cType := get_hbmk2_project_type( s_cBase + cProject )
|
||||
|
||||
cProject := StrTran( cProject, "\", "/" )
|
||||
|
||||
@@ -484,18 +460,15 @@ PROCEDURE GNUMake( ... )
|
||||
SWITCH cType
|
||||
CASE "hblib"
|
||||
CASE "hbimplib"
|
||||
cTargetDir := "${_HB_L_}"
|
||||
cInstallDirVar := "_HB_LIB_INSTALL"
|
||||
EXIT
|
||||
CASE "hbdyn"
|
||||
cTargetDir := "${_HB_D_}"
|
||||
cInstallDirVar := "_HB_DYN_INSTALL"
|
||||
IF GetEnv( "HB_BUILD_SHARED" ) == "yes"
|
||||
cOptionsPre += " -shared"
|
||||
ENDIF
|
||||
EXIT
|
||||
CASE "hbexe"
|
||||
cTargetDir := "${_HB_B_}"
|
||||
cInstallDirVar := "_HB_BIN_INSTALL"
|
||||
IF GetEnv( "HB_BUILD_SHARED" ) == "yes"
|
||||
cOptionsPre += " -shared"
|
||||
@@ -531,12 +504,12 @@ PROCEDURE GNUMake( ... )
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
call_hbmk2( cBinDir, cBase + cProject, cTargetDir, cOptionsPre, cOptionsPost, .F. )
|
||||
call_hbmk2( cBinDir, s_cBase + cProject, cOptionsPre, cOptionsPost )
|
||||
|
||||
/* Highly experimental */
|
||||
IF cType == "hblib" .AND. GetEnv( "HB_BUILD_CONTRIB_DLL" ) == "yes" .AND. ;
|
||||
!( GetEnv( "HB_BUILD_PARTS" ) == "lib" ) .AND. ;
|
||||
hb_FileExists( FNameExtSet( cBase + cProject, ".hbc" ) )
|
||||
hb_FileExists( FNameExtSet( s_cBase + cProject, ".hbc" ) )
|
||||
|
||||
cInstallDirVar := "_HB_DYN_INSTALL"
|
||||
|
||||
@@ -559,7 +532,7 @@ PROCEDURE GNUMake( ... )
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
call_hbmk2( cBinDir, cBase + cProject, cTargetDir, cOptionsPre, cOptionsPost, .T. )
|
||||
call_hbmk2( cBinDir, s_cBase + cProject, cOptionsPre, cOptionsPost )
|
||||
ENDIF
|
||||
ELSE
|
||||
/* OutStd( hb_StrFormat( "! project '%s' skipped", cProject ) + hb_eol() ) */
|
||||
@@ -572,14 +545,21 @@ PROCEDURE GNUMake( ... )
|
||||
|
||||
RETURN
|
||||
|
||||
STATIC FUNCTION call_hbmk2_dept( cBinDir, cProject )
|
||||
STATIC FUNCTION call_hbmk2_dept( cBinDir, cProject, /* @ */ cType )
|
||||
LOCAL tmp, tmp1
|
||||
LOCAL aList := {}
|
||||
|
||||
hb_processRun( PathSepToSelf( cBinDir ) + "hbmk2" + " -quiet -lang=en -width=0 -q0 --hbrefs " + cProject,, @tmp )
|
||||
hb_processRun( PathSepToSelf( cBinDir ) + "hbmk2" + " -quiet -lang=en -width=0 -q0 --hbinfo " + cProject,, @tmp )
|
||||
|
||||
IF ( tmp1 := At( "hbrefs{{", tmp ) ) > 0
|
||||
tmp := SubStr( tmp, tmp1 + Len( "hbrefs{{" ) + 1 )
|
||||
IF ( tmp1 := At( "targettype{{", tmp ) ) > 0
|
||||
tmp := SubStr( tmp, tmp1 + Len( "targettype{{" ) )
|
||||
IF ( tmp1 := At( "}}", tmp ) ) > 0
|
||||
cType := Left( tmp, tmp1 - 1 )
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
IF ( tmp1 := At( "hbctree{{", tmp ) ) > 0
|
||||
tmp := SubStr( tmp, tmp1 + Len( "hbctree{{" ) )
|
||||
IF ( tmp1 := At( "}}", tmp ) ) > 0
|
||||
tmp := StrTran( Left( tmp, tmp1 - 1 ), Chr( 13 ) )
|
||||
FOR EACH tmp IN hb_ATokens( tmp, Chr( 10 ) )
|
||||
@@ -593,26 +573,15 @@ STATIC FUNCTION call_hbmk2_dept( cBinDir, cProject )
|
||||
|
||||
RETURN aList
|
||||
|
||||
STATIC FUNCTION call_hbmk2( cBinDir, cProject, cTargetDir, cOptionsPre, cOptionsPost, lDyn )
|
||||
STATIC FUNCTION call_hbmk2( cBinDir, cProject, cOptionsPre, cOptionsPost )
|
||||
LOCAL nErrorLevel
|
||||
|
||||
LOCAL cDir, cName
|
||||
|
||||
/* Keeping cmdline as short as possible. Also making sure that user settings
|
||||
do not interfere with the std build process. */
|
||||
#if defined( __PLATFORM__DOS )
|
||||
hb_setenv( "HBMK_OPTIONS", cOptionsPre )
|
||||
cOptionsPre := ""
|
||||
#endif
|
||||
|
||||
hb_FNameSplit( cProject, @cDir, @cName )
|
||||
|
||||
nErrorLevel := mk_hb_processRun( PathSepToSelf( cBinDir ) + "hbmk2" +;
|
||||
" " + cOptionsPre +;
|
||||
" -lang=en -width=0 @" + s_cHome + "hbpre" + cOptionsPre +;
|
||||
" " + cProject +;
|
||||
cOptionsPost +;
|
||||
" -workdir=" + cTargetDir + "/${hb_work}/" + cName + iif( lDyn, "${hb_workdynsub}", "" ) +;
|
||||
" -o" + cTargetDir + "/" )
|
||||
" @" + s_cHome + "hbpost" +;
|
||||
cOptionsPost )
|
||||
|
||||
IF nErrorLevel != 0
|
||||
OutStd( hb_StrFormat( "! '%s' returned status: %s", cProject, hb_ntos( nErrorLevel ) ) + hb_eol() )
|
||||
RETURN .F.
|
||||
|
||||
@@ -330,66 +330,70 @@ REQUEST hbmk_KEYW
|
||||
#define _HBMK_lCreateLib 62
|
||||
#define _HBMK_lCreateDyn 63
|
||||
#define _HBMK_lCreateImpLib 64
|
||||
#define _HBMK_lCreatePPO 65
|
||||
#define _HBMK_lCreateHRB 66
|
||||
|
||||
#define _HBMK_lDynVM 65
|
||||
#define _HBMK_lDynVM 67
|
||||
|
||||
#define _HBMK_lBLDFLGP 66
|
||||
#define _HBMK_lBLDFLGC 67
|
||||
#define _HBMK_lBLDFLGL 68
|
||||
#define _HBMK_lBLDFLGP 68
|
||||
#define _HBMK_lBLDFLGC 69
|
||||
#define _HBMK_lBLDFLGL 70
|
||||
|
||||
#define _HBMK_cFIRST 69
|
||||
#define _HBMK_aPRG 70
|
||||
#define _HBMK_aC 71
|
||||
#define _HBMK_aCPP 72
|
||||
#define _HBMK_aRESSRC 73
|
||||
#define _HBMK_aRESCMP 74
|
||||
#define _HBMK_aOBJUSER 75
|
||||
#define _HBMK_aICON 76
|
||||
#define _HBMK_aIMPLIBSRC 77
|
||||
#define _HBMK_aDEF 78
|
||||
#define _HBMK_aINSTFILE 79
|
||||
#define _HBMK_hDEPTS 80
|
||||
#define _HBMK_cFIRST 71
|
||||
#define _HBMK_aPRG 72
|
||||
#define _HBMK_aC 73
|
||||
#define _HBMK_aCPP 74
|
||||
#define _HBMK_aRESSRC 75
|
||||
#define _HBMK_aRESCMP 76
|
||||
#define _HBMK_aOBJUSER 77
|
||||
#define _HBMK_aICON 78
|
||||
#define _HBMK_aIMPLIBSRC 79
|
||||
#define _HBMK_aDEF 80
|
||||
#define _HBMK_aINSTFILE 81
|
||||
#define _HBMK_hDEPTS 82
|
||||
|
||||
#define _HBMK_aPO 81
|
||||
#define _HBMK_cHBL 82
|
||||
#define _HBMK_cHBLDir 83
|
||||
#define _HBMK_aLNG 84
|
||||
#define _HBMK_cPO 85
|
||||
#define _HBMK_aPO 83
|
||||
#define _HBMK_cHBL 84
|
||||
#define _HBMK_cHBLDir 85
|
||||
#define _HBMK_aLNG 86
|
||||
#define _HBMK_cPO 87
|
||||
|
||||
#define _HBMK_aPLUGIN 86
|
||||
#define _HBMK_hPLUGINHRB 87
|
||||
#define _HBMK_hPLUGINVars 88
|
||||
#define _HBMK_aPLUGINPars 89
|
||||
#define _HBMK_hPLUGINExt 90
|
||||
#define _HBMK_aPLUGIN 88
|
||||
#define _HBMK_hPLUGINHRB 89
|
||||
#define _HBMK_hPLUGINVars 90
|
||||
#define _HBMK_aPLUGINPars 91
|
||||
#define _HBMK_hPLUGINExt 92
|
||||
|
||||
#define _HBMK_lDEBUGTIME 91
|
||||
#define _HBMK_lDEBUGINC 92
|
||||
#define _HBMK_lDEBUGSTUB 93
|
||||
#define _HBMK_lDEBUGI18N 94
|
||||
#define _HBMK_lDEBUGDEPD 95
|
||||
#define _HBMK_lDEBUGTIME 93
|
||||
#define _HBMK_lDEBUGINC 94
|
||||
#define _HBMK_lDEBUGSTUB 95
|
||||
#define _HBMK_lDEBUGI18N 96
|
||||
#define _HBMK_lDEBUGDEPD 97
|
||||
|
||||
#define _HBMK_cCCPATH 96
|
||||
#define _HBMK_cCCPREFIX 97
|
||||
#define _HBMK_cCCPOSTFIX 98
|
||||
#define _HBMK_cCCEXT 99
|
||||
#define _HBMK_cCCPATH 98
|
||||
#define _HBMK_cCCPREFIX 99
|
||||
#define _HBMK_cCCPOSTFIX 100
|
||||
#define _HBMK_cCCEXT 101
|
||||
|
||||
#define _HBMK_cWorkDir 100
|
||||
#define _HBMK_cWorkDirDynSub 101
|
||||
#define _HBMK_nCmd_Esc 102
|
||||
#define _HBMK_nScr_Esc 103
|
||||
#define _HBMK_nCmd_FNF 104
|
||||
#define _HBMK_nScr_FNF 105
|
||||
#define _HBMK_nErrorLevel 106
|
||||
#define _HBMK_cWorkDir 102
|
||||
#define _HBMK_cWorkDirDynSub 103
|
||||
#define _HBMK_nCmd_Esc 104
|
||||
#define _HBMK_nScr_Esc 105
|
||||
#define _HBMK_nCmd_FNF 106
|
||||
#define _HBMK_nScr_FNF 107
|
||||
#define _HBMK_nErrorLevel 108
|
||||
|
||||
#define _HBMK_cPROGDIR 107
|
||||
#define _HBMK_cPROGNAME 108
|
||||
#define _HBMK_cPROGDIR 109
|
||||
#define _HBMK_cPROGNAME 110
|
||||
|
||||
#define _HBMK_hAUTOHBC 109
|
||||
#define _HBMK_hAUTOHBCFOUND 110
|
||||
#define _HBMK_hAUTOHBC 111
|
||||
#define _HBMK_hAUTOHBCFOUND 112
|
||||
|
||||
#define _HBMK_aDEPTHBC 111
|
||||
#define _HBMK_aDEPTHBC 113
|
||||
|
||||
#define _HBMK_MAX_ 111
|
||||
#define _HBMK_lStopAfterHarbour 114
|
||||
|
||||
#define _HBMK_MAX_ 114
|
||||
|
||||
#define _HBMK_DEP_CTRL_MARKER ".control." /* must be an invalid path */
|
||||
|
||||
@@ -753,14 +757,13 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause )
|
||||
|
||||
LOCAL lSkipBuild := .F.
|
||||
LOCAL lStopAfterInit := .F.
|
||||
LOCAL lStopAfterHarbour := .F.
|
||||
LOCAL lStopAfterCComp := .F.
|
||||
LOCAL lAcceptCFlag := .F.
|
||||
LOCAL lAcceptLDFlag := .F.
|
||||
LOCAL lAcceptLDClipper := .F.
|
||||
LOCAL lAcceptIFlag := .F.
|
||||
LOCAL lHarbourInfo := .F.
|
||||
LOCAL lDumpReferences := .F.
|
||||
LOCAL lDumpInfo := .F.
|
||||
|
||||
LOCAL nHarbourPPO := 0
|
||||
LOCAL cHarbourOutputExt
|
||||
@@ -795,6 +798,8 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause )
|
||||
s_cSecToken := StrZero( hb_Random( 1, 4294967294 ), 10, 0 )
|
||||
ENDIF
|
||||
|
||||
hbmk[ _HBMK_lStopAfterHarbour ] := .F.
|
||||
|
||||
hbmk[ _HBMK_nErrorLevel ] := 0
|
||||
|
||||
hbmk[ _HBMK_cWorkDir ] := NIL
|
||||
@@ -802,6 +807,8 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause )
|
||||
hbmk[ _HBMK_lCreateLib ] := .F.
|
||||
hbmk[ _HBMK_lCreateDyn ] := .F.
|
||||
hbmk[ _HBMK_lCreateImpLib ] := .F.
|
||||
hbmk[ _HBMK_lCreatePPO ] := .F.
|
||||
hbmk[ _HBMK_lCreateHRB ] := .F.
|
||||
|
||||
hbmk[ _HBMK_lDynVM ] := .F.
|
||||
|
||||
@@ -918,7 +925,7 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause )
|
||||
CASE Left( cParamL, 10 ) == "-platform=" ; ParseCOMPPLAT( hbmk, SubStr( cParam, 11 ), _TARG_PLAT )
|
||||
CASE Left( cParamL, 6 ) == "-arch=" ; ParseCOMPPLAT( hbmk, SubStr( cParam, 7 ), _TARG_PLAT ) /* Compatibility */
|
||||
CASE Left( cParamL, 7 ) == "-build=" ; hbmk[ _HBMK_cBUILD ] := SubStr( cParam, 8 )
|
||||
CASE Left( cParamL, 6 ) == "-build" ; lStopAfterHarbour := .T.
|
||||
CASE Left( cParamL, 6 ) == "-build" ; hbmk[ _HBMK_lStopAfterHarbour ] := .T.
|
||||
CASE Left( cParamL, 6 ) == "-lang=" ; hbmk[ _HBMK_cUILNG ] := SubStr( cParam, 7 ) ; SetUILang( hbmk )
|
||||
CASE Left( cParamL, 7 ) == "-width="
|
||||
|
||||
@@ -930,14 +937,14 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause )
|
||||
ENDIF
|
||||
|
||||
CASE cParamL == "-hbrun" ; lSkipBuild := .T. ; hbmk[ _HBMK_lRUN ] := .T.
|
||||
CASE cParamL == "-hbraw" ; hbmk[ _HBMK_lInfo ] := .F. ; lStopAfterHarbour := .T. ; lStopAfterCComp := .T. ; hbmk[ _HBMK_lCreateLib ] := .F. ; hbmk[ _HBMK_lCreateDyn ] := .F. ; lAcceptCFlag := .F. ; lAcceptLDFlag := .F.
|
||||
CASE cParamL == "-hbraw" ; hbmk[ _HBMK_lInfo ] := .F. ; hbmk[ _HBMK_lStopAfterHarbour ] := .T. ; lStopAfterCComp := .T. ; hbmk[ _HBMK_lCreateLib ] := .F. ; hbmk[ _HBMK_lCreateDyn ] := .F. ; lAcceptCFlag := .F. ; lAcceptLDFlag := .F.
|
||||
CASE cParamL == "-hbcmp" .OR. ;
|
||||
cParamL == "-clipper" ; hbmk[ _HBMK_lInfo ] := .F. ; lStopAfterHarbour := .F. ; lStopAfterCComp := .T. ; hbmk[ _HBMK_lCreateLib ] := .F. ; hbmk[ _HBMK_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.
|
||||
cParamL == "-clipper" ; hbmk[ _HBMK_lInfo ] := .F. ; hbmk[ _HBMK_lStopAfterHarbour ] := .F. ; lStopAfterCComp := .T. ; hbmk[ _HBMK_lCreateLib ] := .F. ; hbmk[ _HBMK_lCreateDyn ] := .F. ; lAcceptCFlag := .F. ; lAcceptLDFlag := .F.
|
||||
CASE cParamL == "-hbcc" ; hbmk[ _HBMK_lInfo ] := .F. ; hbmk[ _HBMK_lStopAfterHarbour ] := .F. ; lStopAfterCComp := .F. ; lAcceptCFlag := .T.
|
||||
CASE cParamL == "-hblnk" ; hbmk[ _HBMK_lInfo ] := .F. ; hbmk[ _HBMK_lStopAfterHarbour ] := .F. ; lStopAfterCComp := .F. ; lAcceptLDFlag := .T.
|
||||
CASE cParamL == "-rtlink" .OR. ;
|
||||
cParamL == "-exospace" .OR. ;
|
||||
cParamL == "-blinker" ; hbmk[ _HBMK_lInfo ] := .F. ; lStopAfterHarbour := .F. ; lStopAfterCComp := .F. ; lAcceptLDClipper := .T.
|
||||
cParamL == "-blinker" ; hbmk[ _HBMK_lInfo ] := .F. ; hbmk[ _HBMK_lStopAfterHarbour ] := .F. ; lStopAfterCComp := .F. ; lAcceptLDClipper := .T.
|
||||
CASE cParamL == "-info" ; hbmk[ _HBMK_lInfo ] := .T.
|
||||
CASE cParamL == "-xhb" ; hbmk[ _HBMK_nHBMODE ] := _HBMODE_XHB
|
||||
CASE cParamL == "-hb10" ; hbmk[ _HBMK_nHBMODE ] := _HBMODE_HB10
|
||||
@@ -1383,7 +1390,7 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause )
|
||||
|
||||
cPath_CompC := NIL
|
||||
|
||||
IF lStopAfterHarbour
|
||||
IF hbmk[ _HBMK_lStopAfterHarbour ]
|
||||
/* If we're just compiling .prg to .c we don't need a C compiler. */
|
||||
hbmk[ _HBMK_cCOMP ] := ""
|
||||
ELSE
|
||||
@@ -1686,10 +1693,10 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause )
|
||||
CASE cParamL == "-quiet-" ; hbmk[ _HBMK_lQuiet ] := .F.
|
||||
CASE cParamL == "-info" ; hbmk[ _HBMK_lInfo ] := .T.
|
||||
CASE cParamL == "-pause" ; lPause := .T.
|
||||
CASE cParamL == "-hbexe" ; lStopAfterHarbour := .F. ; lStopAfterCComp := .F. ; hbmk[ _HBMK_lCreateLib ] := .F. ; hbmk[ _HBMK_lCreateDyn ] := .F.
|
||||
CASE cParamL == "-hblib" ; lStopAfterHarbour := .F. ; lStopAfterCComp := .T. ; hbmk[ _HBMK_lCreateLib ] := .T. ; hbmk[ _HBMK_lCreateDyn ] := .F.
|
||||
CASE cParamL == "-hbdyn" ; lStopAfterHarbour := .F. ; lStopAfterCComp := .T. ; hbmk[ _HBMK_lCreateLib ] := .F. ; hbmk[ _HBMK_lCreateDyn ] := .T. ; hbmk[ _HBMK_lDynVM ] := .F. ; l_lNOHBLIB := .T.
|
||||
CASE cParamL == "-hbdynvm" ; lStopAfterHarbour := .F. ; lStopAfterCComp := .T. ; hbmk[ _HBMK_lCreateLib ] := .F. ; hbmk[ _HBMK_lCreateDyn ] := .T. ; hbmk[ _HBMK_lDynVM ] := .T. ; l_lNOHBLIB := .F.
|
||||
CASE cParamL == "-hbexe" ; hbmk[ _HBMK_lStopAfterHarbour ] := .F. ; lStopAfterCComp := .F. ; hbmk[ _HBMK_lCreateLib ] := .F. ; hbmk[ _HBMK_lCreateDyn ] := .F.
|
||||
CASE cParamL == "-hblib" ; hbmk[ _HBMK_lStopAfterHarbour ] := .F. ; lStopAfterCComp := .T. ; hbmk[ _HBMK_lCreateLib ] := .T. ; hbmk[ _HBMK_lCreateDyn ] := .F.
|
||||
CASE cParamL == "-hbdyn" ; hbmk[ _HBMK_lStopAfterHarbour ] := .F. ; lStopAfterCComp := .T. ; hbmk[ _HBMK_lCreateLib ] := .F. ; hbmk[ _HBMK_lCreateDyn ] := .T. ; hbmk[ _HBMK_lDynVM ] := .F. ; l_lNOHBLIB := .T.
|
||||
CASE cParamL == "-hbdynvm" ; hbmk[ _HBMK_lStopAfterHarbour ] := .F. ; lStopAfterCComp := .T. ; hbmk[ _HBMK_lCreateLib ] := .F. ; hbmk[ _HBMK_lCreateDyn ] := .T. ; hbmk[ _HBMK_lDynVM ] := .T. ; l_lNOHBLIB := .F.
|
||||
CASE cParamL == "-hbimplib" ; lStopAfterInit := .T. ; hbmk[ _HBMK_lCreateImpLib ] := .T. ; lAcceptIFlag := .T.
|
||||
CASE cParamL == "-gui" .OR. ;
|
||||
cParamL == "-mwindows" ; hbmk[ _HBMK_lGUI ] := .T. /* Compatibility */
|
||||
@@ -1835,9 +1842,9 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause )
|
||||
|
||||
OutStd( l_cHB_INC_INSTALL )
|
||||
|
||||
CASE cParamL == "--hbrefs"
|
||||
CASE cParamL == "--hbinfo"
|
||||
|
||||
lDumpReferences := .T.
|
||||
lDumpInfo := .T.
|
||||
|
||||
CASE Left( cParamL, Len( "-jobs=" ) ) == "-jobs="
|
||||
|
||||
@@ -1896,7 +1903,7 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause )
|
||||
ENDIF
|
||||
|
||||
#if ! defined( __PLATFORM__UNIX )
|
||||
CASE Left( cParamL, 2 ) == "/o" .AND. ! lStopAfterHarbour
|
||||
CASE Left( cParamL, 2 ) == "/o" .AND. ! hbmk[ _HBMK_lStopAfterHarbour ]
|
||||
|
||||
/* Swallow this switch. We don't pass it to Harbour, as it may badly
|
||||
interact with hbmk. */
|
||||
@@ -1906,7 +1913,7 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause )
|
||||
|
||||
tmp := SubStr( cParam, 3 )
|
||||
|
||||
IF lStopAfterHarbour
|
||||
IF hbmk[ _HBMK_lStopAfterHarbour ]
|
||||
tmp := MacroProc( hbmk, tmp, aParam[ _PAR_cFileName ] )
|
||||
IF ! Empty( tmp )
|
||||
AAddNotEmpty( hbmk[ _HBMK_aOPTPRG ], "-o" + PathNormalize( PathMakeAbsolute( PathSepToSelf( tmp ), aParam[ _PAR_cFileName ] ) ) )
|
||||
@@ -1986,7 +1993,7 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause )
|
||||
ENDIF
|
||||
|
||||
CASE Left( cParamL, 2 ) == "-i" .AND. ;
|
||||
Len( cParamL ) > 2
|
||||
Len( cParamL ) > 2 .AND. !( cParamL == "-i-" )
|
||||
|
||||
cParam := MacroProc( hbmk, SubStr( cParam, 3 ), aParam[ _PAR_cFileName ] )
|
||||
IF ! Empty( cParam )
|
||||
@@ -2010,10 +2017,11 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause )
|
||||
cParam := MacroProc( hbmk, SubStr( cParam, Len( "-prgflag=" ) + 1 ), aParam[ _PAR_cFileName ] )
|
||||
IF Left( cParam, 1 ) $ cOptPrefix
|
||||
IF SubStr( cParamL, 2 ) == "gh"
|
||||
lStopAfterHarbour := .T.
|
||||
hbmk[ _HBMK_lStopAfterHarbour ] := .T.
|
||||
hbmk[ _HBMK_lCreateHRB ] := .T.
|
||||
ENDIF
|
||||
IF !( SubStr( cParamL, 2, 1 ) == "o" )
|
||||
AAdd( hbmk[ _HBMK_aOPTPRG ], PathSepToSelf( cParam, 2 ) )
|
||||
AAddNewNotEmpty( hbmk[ _HBMK_aOPTPRG ], PathSepToSelf( cParam, 2 ) )
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
@@ -2211,7 +2219,8 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause )
|
||||
AAddNotEmpty( hbmk[ _HBMK_aOPTI ], PathSepToSelf( cParam, 2 ) )
|
||||
OTHERWISE
|
||||
IF SubStr( cParamL, 2 ) == "gh"
|
||||
lStopAfterHarbour := .T.
|
||||
hbmk[ _HBMK_lStopAfterHarbour ] := .T.
|
||||
hbmk[ _HBMK_lCreateHRB ] := .T.
|
||||
ENDIF
|
||||
/* Detect if Harbour is only used as preprocessor (-p + -s options) */
|
||||
IF SubStr( cParamL, 2 ) == "p"
|
||||
@@ -2224,9 +2233,13 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause )
|
||||
ENDIF
|
||||
ENDIF
|
||||
IF SubStr( cParamL, 2 ) == "s"
|
||||
hbmk[ _HBMK_lStopAfterHarbour ] := .T.
|
||||
++nHarbourPPO
|
||||
ENDIF
|
||||
AAddNotEmpty( hbmk[ _HBMK_aOPTPRG ], PathSepToSelf( cParam, 2 ) )
|
||||
IF nHarbourPPO >= 2
|
||||
hbmk[ _HBMK_lCreatePPO ] := .T.
|
||||
ENDIF
|
||||
AAddNewNotEmpty( hbmk[ _HBMK_aOPTPRG ], PathSepToSelf( cParam, 2 ) )
|
||||
ENDCASE
|
||||
|
||||
CASE hbmk[ _HBMK_lCreateImpLib ]
|
||||
@@ -2466,7 +2479,7 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause )
|
||||
ENDIF
|
||||
ELSE
|
||||
IF lStopAfterInit .OR. ;
|
||||
lStopAfterHarbour .OR. ;
|
||||
hbmk[ _HBMK_lStopAfterHarbour ] .OR. ;
|
||||
( lStopAfterCComp .AND. ! hbmk[ _HBMK_lCreateLib ] .AND. ! hbmk[ _HBMK_lCreateDyn ] )
|
||||
/* It's controlled by -o option in these cases */
|
||||
hbmk[ _HBMK_cWorkDir ] := ""
|
||||
@@ -2487,7 +2500,7 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause )
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
IF ! lStopAfterInit .AND. ! lStopAfterHarbour
|
||||
IF ! lStopAfterInit .AND. ! hbmk[ _HBMK_lStopAfterHarbour ]
|
||||
|
||||
/*
|
||||
/boot/common/include (beos)
|
||||
@@ -2513,7 +2526,7 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause )
|
||||
NEXT
|
||||
ENDIF
|
||||
|
||||
IF ( ! lStopAfterInit .AND. ! lStopAfterHarbour ) .OR. hbmk[ _HBMK_lCreateImpLib ]
|
||||
IF ( ! lStopAfterInit .AND. ! hbmk[ _HBMK_lStopAfterHarbour ] ) .OR. hbmk[ _HBMK_lCreateImpLib ]
|
||||
|
||||
IF hbmk[ _HBMK_cGT ] != NIL .AND. hbmk[ _HBMK_cGT ] == hbmk[ _HBMK_cGTDEFAULT ]
|
||||
hbmk[ _HBMK_cGT ] := NIL
|
||||
@@ -3977,7 +3990,7 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause )
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
IF ! lStopAfterInit .AND. ! lStopAfterHarbour
|
||||
IF ! lStopAfterInit .AND. ! hbmk[ _HBMK_lStopAfterHarbour ]
|
||||
hb_FNameSplit( hbmk[ _HBMK_cPROGNAME ], @cDir, @cName, @cExt )
|
||||
DO CASE
|
||||
CASE ! lStopAfterCComp
|
||||
@@ -3997,7 +4010,7 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause )
|
||||
|
||||
/* Generate header with repository ID information */
|
||||
|
||||
IF ! lSkipBuild .AND. ! lStopAfterInit .AND. ! lStopAfterHarbour .AND. ! lDumpReferences
|
||||
IF ! lSkipBuild .AND. ! lStopAfterInit .AND. ! hbmk[ _HBMK_lStopAfterHarbour ] .AND. ! lDumpInfo
|
||||
IF ! Empty( l_cVCSHEAD )
|
||||
tmp1 := VCSID( l_cVCSDIR, l_cVCSHEAD, @tmp2 )
|
||||
/* Use the same EOL for all platforms to avoid unnecessary rebuilds. */
|
||||
@@ -4028,7 +4041,7 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause )
|
||||
|
||||
/* Do header detection and create incremental file list for .c files */
|
||||
|
||||
IF ! lSkipBuild .AND. ! lStopAfterInit .AND. ! lStopAfterHarbour .AND. ! lDumpReferences
|
||||
IF ! lSkipBuild .AND. ! lStopAfterInit .AND. ! hbmk[ _HBMK_lStopAfterHarbour ] .AND. ! lDumpInfo
|
||||
|
||||
headstate := NIL
|
||||
|
||||
@@ -4052,7 +4065,7 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause )
|
||||
|
||||
/* Do header detection and create incremental file list for .cpp files */
|
||||
|
||||
IF ! lSkipBuild .AND. ! lStopAfterInit .AND. ! lStopAfterHarbour .AND. ! lDumpReferences
|
||||
IF ! lSkipBuild .AND. ! lStopAfterInit .AND. ! hbmk[ _HBMK_lStopAfterHarbour ] .AND. ! lDumpInfo
|
||||
|
||||
headstate := NIL
|
||||
|
||||
@@ -4076,17 +4089,17 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause )
|
||||
|
||||
/* Create incremental file list for .prg files */
|
||||
|
||||
IF ( ! lSkipBuild .AND. ! lStopAfterInit .AND. ! lStopAfterHarbour .AND. hbmk[ _HBMK_nHBMODE ] != _HBMODE_RAW_C ) .OR. ;
|
||||
( nHarbourPPO >= 2 .AND. lStopAfterHarbour ) /* or in preprocessor mode */
|
||||
IF ( ! lSkipBuild .AND. ! lStopAfterInit .AND. ! hbmk[ _HBMK_lStopAfterHarbour ] .AND. hbmk[ _HBMK_nHBMODE ] != _HBMODE_RAW_C ) .OR. ;
|
||||
( hbmk[ _HBMK_lCreatePPO ] .AND. hbmk[ _HBMK_lStopAfterHarbour ] ) /* or in preprocessor mode */
|
||||
|
||||
IF ! lDumpReferences
|
||||
IF ! lDumpInfo
|
||||
PlugIn_Execute_All( hbmk, "pre_prg" )
|
||||
ENDIF
|
||||
|
||||
/* Incremental */
|
||||
|
||||
IF hbmk[ _HBMK_lINC ] .AND. ! hbmk[ _HBMK_lREBUILD ] .AND. ! lDumpReferences
|
||||
IF nHarbourPPO >= 2 .AND. lStopAfterHarbour /* .ppo files are the dependents in preprocessor mode */
|
||||
IF hbmk[ _HBMK_lINC ] .AND. ! hbmk[ _HBMK_lREBUILD ] .AND. ! lDumpInfo
|
||||
IF hbmk[ _HBMK_lCreatePPO ] .AND. hbmk[ _HBMK_lStopAfterHarbour ] /* .ppo files are the dependents in preprocessor mode */
|
||||
cHarbourOutputExt := ".ppo"
|
||||
cHarbourOutputDir := cHarbourPPODir
|
||||
ELSE
|
||||
@@ -4142,7 +4155,7 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause )
|
||||
ELSE
|
||||
AAdd( hbmk[ _HBMK_aOPTPRG ], "-i" + FNameEscape( tmp, hbmk[ _HBMK_nCmd_Esc ] ) )
|
||||
ENDIF
|
||||
IF ! lStopAfterHarbour
|
||||
IF ! hbmk[ _HBMK_lStopAfterHarbour ]
|
||||
AAdd( hbmk[ _HBMK_aOPTC ], StrTran( cOptIncMask, "{DI}", FNameEscape( tmp, hbmk[ _HBMK_nCmd_Esc ], hbmk[ _HBMK_nCmd_FNF ] ) ) )
|
||||
AAdd( hbmk[ _HBMK_aOPTRES ], StrTran( cOptIncMask, "{DI}", FNameEscape( tmp, hbmk[ _HBMK_nCmd_Esc ], hbmk[ _HBMK_nCmd_FNF ] ) ) )
|
||||
ENDIF
|
||||
@@ -4152,7 +4165,7 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause )
|
||||
|
||||
/* Check if we've found all dependencies */
|
||||
|
||||
IF ! lSkipBuild .AND. ! lStopAfterInit .AND. ! lStopAfterHarbour
|
||||
IF ! lSkipBuild .AND. ! lStopAfterInit .AND. ! hbmk[ _HBMK_lStopAfterHarbour ]
|
||||
IF ! dep_evaluate( hbmk )
|
||||
IF hbmk[ _HBMK_lBEEP ]
|
||||
DoBeep( .F. )
|
||||
@@ -4161,14 +4174,18 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause )
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
/* Dump hbmk2 dependencies */
|
||||
/* Dump hbmk2 build information */
|
||||
|
||||
IF lDumpReferences
|
||||
OutStd( "hbrefs{{" + hb_eol() )
|
||||
IF lDumpInfo
|
||||
|
||||
OutStd( "targettype{{" + hbmk_TARGET( hbmk ) + "}}" + hb_eol() )
|
||||
|
||||
OutStd( "hbctree{{" + hb_eol() )
|
||||
FOR EACH tmp IN hbmk[ _HBMK_aDEPTHBC ]
|
||||
OutStd( Replicate( Chr( 9 ), tmp[ 2 ] ) + PathSepToForward( PathNormalize( tmp[ 1 ] ) ) + hb_eol() )
|
||||
NEXT
|
||||
OutStd( "}}" + hb_eol() )
|
||||
|
||||
RETURN 0
|
||||
ENDIF
|
||||
|
||||
@@ -4295,7 +4312,7 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause )
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
IF ! lSkipBuild .AND. ! lStopAfterInit .AND. ! lStopAfterHarbour
|
||||
IF ! lSkipBuild .AND. ! lStopAfterInit .AND. ! hbmk[ _HBMK_lStopAfterHarbour ]
|
||||
|
||||
IF hbmk[ _HBMK_nHBMODE ] != _HBMODE_RAW_C
|
||||
|
||||
@@ -5455,7 +5472,7 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause )
|
||||
DoBeep( hbmk[ _HBMK_nErrorLevel ] == 0 )
|
||||
ENDIF
|
||||
|
||||
IF ! lStopAfterHarbour .AND. ! lStopAfterCComp .AND. ;
|
||||
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 ]
|
||||
cCommand := hbmk[ _HBMK_cPROGNAME ]
|
||||
@@ -8433,6 +8450,10 @@ STATIC FUNCTION MacroProc( hbmk, cString, cFileName, cMacroPrefix )
|
||||
cMacro := hbmk[ _HBMK_cHB_INC_INSTALL ] ; EXIT
|
||||
CASE "HB_FIRST"
|
||||
cMacro := FNameNameGet( hbmk[ _HBMK_cFIRST ] ) ; EXIT
|
||||
CASE "HB_OUTPUTDIR"
|
||||
cMacro := iif( ISCHARACTER( hbmk[ _HBMK_cPROGDIR ] ), FNameDirGet( hbmk[ _HBMK_cPROGDIR ] ), "" ) ; EXIT
|
||||
CASE "HB_OUTPUTNAME"
|
||||
cMacro := iif( ISCHARACTER( hbmk[ _HBMK_cPROGNAME ] ), FNameNameGet( hbmk[ _HBMK_cPROGNAME ] ), "" ) ; EXIT
|
||||
OTHERWISE
|
||||
/* NOTE: If macro not found, try to interpret as
|
||||
envvar. If it doesn't exist, empty string
|
||||
@@ -9561,10 +9582,12 @@ STATIC FUNCTION VCSID( cDir, cVCSHEAD, /* @ */ cType )
|
||||
|
||||
STATIC FUNCTION hbmk_TARGET( hbmk )
|
||||
|
||||
IF hbmk[ _HBMK_lCreateLib ] ; RETURN "hblib"
|
||||
ELSEIF hbmk[ _HBMK_lCreateDyn ] .AND. ! hbmk[ _HBMK_lDynVM ] ; RETURN "hbdyn"
|
||||
ELSEIF hbmk[ _HBMK_lCreateDyn ] .AND. hbmk[ _HBMK_lDynVM ] ; RETURN "hbdynvm"
|
||||
ELSEIF hbmk[ _HBMK_lCreateImpLib ] ; RETURN "hbimplib"
|
||||
IF hbmk[ _HBMK_lCreateLib ] ; RETURN "hblib"
|
||||
ELSEIF hbmk[ _HBMK_lCreateDyn ] .AND. ! hbmk[ _HBMK_lDynVM ] ; RETURN "hbdyn"
|
||||
ELSEIF hbmk[ _HBMK_lCreateDyn ] .AND. hbmk[ _HBMK_lDynVM ] ; RETURN "hbdynvm"
|
||||
ELSEIF hbmk[ _HBMK_lCreateImpLib ] ; RETURN "hbimplib"
|
||||
ELSEIF hbmk[ _HBMK_lStopAfterHarbour ] .AND. hbmk[ _HBMK_lCreatePPO ] ; RETURN "hbppo"
|
||||
ELSEIF hbmk[ _HBMK_lStopAfterHarbour ] .AND. hbmk[ _HBMK_lCreateHRB ] ; RETURN "hbhrb"
|
||||
ENDIF
|
||||
|
||||
RETURN "hbexe"
|
||||
@@ -10325,7 +10348,7 @@ STATIC PROCEDURE ShowHelp( hbmk, lLong )
|
||||
{ "--hbdirdyn" , I_( "output Harbour dynamic library directory" ) },;
|
||||
{ "--hbdirlib" , I_( "output Harbour static library directory" ) },;
|
||||
{ "--hbdirinc" , I_( "output Harbour header directory" ) },;
|
||||
{ "--hbref" , I_( "output Harbour references. The output is preceded by 'hbdept{{' and closed by '}}' lines. The reference paths always contain forward slashes." ) },;
|
||||
{ "--hbinfo" , I_( "output Harbour build information. The data output comes in the format: '<name>{{<value>}}'. The included paths always contain forward slashes." ) },;
|
||||
NIL,;
|
||||
{ "-plat[form]=<plat>" , I_( "select target platform." ) },;
|
||||
{ "-comp[iler]=<comp>" , I_( "select C compiler.\nSpecial value:\n - bld: use original build settings (default on *nix)" ) },;
|
||||
|
||||
Reference in New Issue
Block a user