From 196c5a738c0cef3cc2930fff1a702d5743dc2ea9 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 23 Nov 2010 18:07:03 +0000 Subject: [PATCH] 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. --- harbour/ChangeLog | 10 ++++++++++ harbour/utils/hbrun/hbrun.prg | 20 ++++---------------- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index d9a40046db..bb6fe44c97 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -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 diff --git a/harbour/utils/hbrun/hbrun.prg b/harbour/utils/hbrun/hbrun.prg index 411f0bba84..d868e67603 100644 --- a/harbour/utils/hbrun/hbrun.prg +++ b/harbour/utils/hbrun/hbrun.prg @@ -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