2010-11-23 19:05 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)

* utils/hbrun/hbrun.prg
    ! Do not process HB_INSTALL_INC to find external headers.
      This envvar is no longer supported and it only makes
      things more difficult now that hbrun has embedded headers.
      Also removed adding the host dir of input .hbs/.prg file
      as -I option (it's processed automatically by compiler).
      So now hbrun uses exactly the same rules as harbour
      compiler to find headers.
This commit is contained in:
Viktor Szakats
2010-11-23 18:07:03 +00:00
parent 8f7e5857a9
commit 196c5a738c
2 changed files with 14 additions and 16 deletions

View File

@@ -16,6 +16,16 @@
The license applies to all entries newer than 2009-04-28.
*/
2010-11-23 19:05 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* utils/hbrun/hbrun.prg
! Do not process HB_INSTALL_INC to find external headers.
This envvar is no longer supported and it only makes
things more difficult now that hbrun has embedded headers.
Also removed adding the host dir of input .hbs/.prg file
as -I option (it's processed automatically by compiler).
So now hbrun uses exactly the same rules as harbour
compiler to find headers.
2010-11-23 18:10 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbplist
+ contrib/hbposix

View File

@@ -82,7 +82,7 @@ REQUEST HB_GT_STD
STATIC s_nRow := 2
STATIC s_nCol := 0
STATIC s_aIncDir := {}
STATIC s_aCompOptions := {}
STATIC s_aHistory := {}
STATIC s_lPreserveHistory := .T.
STATIC s_lWasLoad := .F.
@@ -92,15 +92,10 @@ STATIC s_cDirBase
/* ********************************************************************** */
PROCEDURE _APPMAIN( cFile, ... )
LOCAL cPath, cExt
LOCAL cExt
LOCAL hHeaders
LOCAL lHeadersDisable := ! Empty( getenv( "HBRUN_NOHEAD" ) )
cPath := getenv( "HB_INSTALL_INC" )
IF !EMPTY( cPath )
AADD( s_aIncDir, "-I" + cPath )
ENDIF
IF PCount() > 0
SWITCH Lower( cFile )
CASE "-?"
@@ -166,7 +161,7 @@ PROCEDURE _APPMAIN( cFile, ... )
ENDIF
cFile := HB_COMPILEBUF( hHeaders, HB_ARGV( 0 ), "-n2", "-w", "-es2", "-q0", ;
s_aIncDir, "-I" + FNameDirGet( cFile ), "-D" + "__HBSCRIPT__HBRUN", cFile )
s_aCompOptions, "-D" + "__HBSCRIPT__HBRUN", cFile )
IF cFile == NIL
ERRORLEVEL( 1 )
EXIT
@@ -185,13 +180,6 @@ PROCEDURE _APPMAIN( cFile, ... )
RETURN
STATIC FUNCTION FNameDirGet( cFileName )
LOCAL cDir
hb_FNameSplit( cFileName, @cDir )
RETURN cDir
STATIC FUNCTION hbrun_CoreHeaderFiles()
LOCAL hHeaders
@@ -491,7 +479,7 @@ STATIC PROCEDURE hbrun_Exec( cCommand )
BEGIN SEQUENCE WITH {|oErr| hbrun_Err( oErr, cCommand ) }
cHRB := HB_COMPILEFROMBUF( cFunc, HB_ARGV( 0 ), "-n2", "-q2", s_aIncDir )
cHRB := HB_COMPILEFROMBUF( cFunc, HB_ARGV( 0 ), "-n2", "-q2", s_aCompOptions )
IF cHRB == NIL
EVAL( ErrorBlock(), "Syntax error." )
ELSE