2017-05-20 02:25 UTC Viktor Szakats (vszakats users.noreply.github.com)
* utils/hbmk2/hbmk2.prg
* remove `_HBSHELL_EXEC_PRE` macro
+ add `_HBSHELL_EXTRA_HEADER` macro that can be defined to a header
(.ch) filename which will be included in all dot prompt and script
execution sessions. The header will also be embedded in
hbmk2/hbrun at build-time, so it's not necessary to be present at
runtime. The macro may also be defined in the `hbmk2_extra.prg`
source.
This commit is contained in:
@@ -10,6 +10,16 @@
|
||||
* Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment
|
||||
*/
|
||||
|
||||
2017-05-20 02:25 UTC Viktor Szakats (vszakats users.noreply.github.com)
|
||||
* utils/hbmk2/hbmk2.prg
|
||||
* remove `_HBSHELL_EXEC_PRE` macro
|
||||
+ add `_HBSHELL_EXTRA_HEADER` macro that can be defined to a header
|
||||
(.ch) filename which will be included in all dot prompt and script
|
||||
execution sessions. The header will also be embedded in
|
||||
hbmk2/hbrun at build-time, so it's not necessary to be present at
|
||||
runtime. The macro may also be defined in the `hbmk2_extra.prg`
|
||||
source.
|
||||
|
||||
2017-05-19 17:03 UTC Viktor Szakats (vszakats users.noreply.github.com)
|
||||
* utils/hbmk2/hbmk2.prg
|
||||
+ add ability to inject extra code/directives to the hbmk2/hbrun source
|
||||
|
||||
@@ -628,8 +628,6 @@ EXTERNAL __dbgEntry
|
||||
#define _HBSH_lClipperComp 15
|
||||
#define _HBSH_MAX_ 15
|
||||
|
||||
#define _HBSHELL_EXEC_PRE ""
|
||||
|
||||
/* Allow to inject custom code at build-time. The goal is to help
|
||||
adding necessary customizations for certain use-case. */
|
||||
#if defined( _HBMK2_EXTRA_CODE )
|
||||
@@ -13637,6 +13635,9 @@ STATIC FUNCTION hbmk_CoreHeaderFiles()
|
||||
#command ADD HEADER TO <hash> FILE <(cFile)> => ;
|
||||
#pragma __streaminclude <(cFile)> | <hash>\[ <(cFile)> \] := %s
|
||||
|
||||
#if defined( _HBSHELL_EXTRA_HEADER )
|
||||
ADD HEADER TO t_hHeaders FILE _HBSHELL_EXTRA_HEADER
|
||||
#endif
|
||||
#if defined( HBMK_WITH_ALL_EMBEDDED_HEADERS )
|
||||
ADD HEADER TO t_hHeaders FILE "achoice.ch"
|
||||
ADD HEADER TO t_hHeaders FILE "assert.ch"
|
||||
@@ -13956,6 +13957,10 @@ STATIC PROCEDURE __hbshell( cFile, ... )
|
||||
AAdd( aOPTPRG, "-u+" + tmp )
|
||||
NEXT
|
||||
|
||||
#if defined( _HBSHELL_EXTRA_HEADER )
|
||||
AAdd( aOPTPRG, "-u+" + _HBSHELL_EXTRA_HEADER )
|
||||
#endif
|
||||
|
||||
/* We can use this function as this is a GPL licenced application */
|
||||
cFile := hb_compileBuf( ;
|
||||
hbmk_CoreHeaderFiles(), ;
|
||||
@@ -14702,6 +14707,10 @@ STATIC PROCEDURE __hbshell_Exec( cCommand )
|
||||
hb_HEval( hbsh[ _HBSH_hCHCORE ], {| tmp | AAdd( aOPTPRG, "-u+" + tmp ) } )
|
||||
ENDIF
|
||||
|
||||
#if defined( _HBSHELL_EXTRA_HEADER )
|
||||
AAdd( aOPTPRG, "-u+" + _HBSHELL_EXTRA_HEADER )
|
||||
#endif
|
||||
|
||||
hb_HEval( hbsh[ _HBSH_hINCPATH ], ;
|
||||
{| cExt |
|
||||
AEval( hbsh[ _HBSH_hINCPATH ][ cExt ], {| tmp | AAddNew( aOPTPRG, "-i" + tmp ) } )
|
||||
@@ -14711,7 +14720,6 @@ STATIC PROCEDURE __hbshell_Exec( cCommand )
|
||||
} )
|
||||
|
||||
cFunc := ;
|
||||
_HBSHELL_EXEC_PRE + hb_eol() + ;
|
||||
"STATIC FUNCTION __HBDOT()" + hb_eol() + ;
|
||||
"RETURN {||" + hb_eol() + ;
|
||||
" " + cCommand + hb_eol() + ;
|
||||
|
||||
Reference in New Issue
Block a user