From ccc6a4e02154b1de846a9c53e416c326c82ff542 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 23 Jun 2009 22:00:14 +0000 Subject: [PATCH] 2009-06-23 23:55 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * harbour-win-spec * harbour-wce-spec * mpkg_win.bat * include/hbver.h * harbour.spec * Changed version to 2.0.0beta2 (from 2.0.0beta1) ; NOTE: Everyone is encouraged to create binary releases for various platforms and try this new version with real apps. We can even upload these binary releases to sf.net. * utils/hbmk2/hbmk2.prg * Minor internal cleanup regarding macro marker chars. % Not including libpaths containing late-evaluation macros in actual commands. * Cleaned handling of paths added from .hbc. Now slashes are properly formed and paths are normalized. * INSTALL * Minor in new section. --- harbour/ChangeLog | 21 ++++++++++++ harbour/INSTALL | 2 +- harbour/harbour-wce-spec | 2 +- harbour/harbour-win-spec | 2 +- harbour/harbour.spec | 2 +- harbour/include/hbver.h | 2 +- harbour/mpkg_win.bat | 2 +- harbour/utils/hbmk2/hbmk2.prg | 60 ++++++++++++++++++++++++----------- 8 files changed, 68 insertions(+), 25 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index c7ad7429cb..396f592768 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,27 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-06-23 23:55 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * harbour-win-spec + * harbour-wce-spec + * mpkg_win.bat + * include/hbver.h + * harbour.spec + * Changed version to 2.0.0beta2 (from 2.0.0beta1) + ; NOTE: Everyone is encouraged to create binary releases + for various platforms and try this new version with real apps. + We can even upload these binary releases to sf.net. + + * utils/hbmk2/hbmk2.prg + * Minor internal cleanup regarding macro marker chars. + % Not including libpaths containing late-evaluation macros in + actual commands. + * Cleaned handling of paths added from .hbc. Now slashes are + properly formed and paths are normalized. + + * INSTALL + * Minor in new section. + 2009-06-23 23:00 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * source/rtl/hbgtcore.c ! Fixed GPF when using hb_gtInfo( HB_GTI_SETWIN ) without diff --git a/harbour/INSTALL b/harbour/INSTALL index 323a9a1ed2..631a7450fc 100644 --- a/harbour/INSTALL +++ b/harbour/INSTALL @@ -692,7 +692,7 @@ QUICK START TO BUILD YOUR OWN HARBOUR APPLICATIONS -l, -b, -n, -w3 - To make it easier to work with Harbour, it's recommended to put Harbour binary dir into the PATH: - set PATH=C:\hb20\bin;%PATH% (on Windows) + set PATH=C:\harbour\bin;%PATH% (on Windows) (this is not a requirement though) - You can access hbmk2 using absolute or relative paths, and it will work equally well: diff --git a/harbour/harbour-wce-spec b/harbour/harbour-wce-spec index a306d1af39..a6f710a525 100644 --- a/harbour/harbour-wce-spec +++ b/harbour/harbour-wce-spec @@ -26,7 +26,7 @@ %define name harbour-wce %define version 2.0.0 -%define releasen beta1 +%define releasen beta2 %define hb_pref hbwce %define hb_ccpath /opt/mingw32ce/bin %define hb_ccpref arm-wince-mingw32ce- diff --git a/harbour/harbour-win-spec b/harbour/harbour-win-spec index 3895c8c576..72c267251f 100644 --- a/harbour/harbour-win-spec +++ b/harbour/harbour-win-spec @@ -26,7 +26,7 @@ %define name harbour-win %define version 2.0.0 -%define releasen beta1 +%define releasen beta2 %define hb_pref hbw %define hb_ccpath /opt/xmingw/bin %define hb_ccpref i386-mingw- diff --git a/harbour/harbour.spec b/harbour/harbour.spec index 15e93d92ab..b0b43df562 100644 --- a/harbour/harbour.spec +++ b/harbour/harbour.spec @@ -67,7 +67,7 @@ %define name harbour %define dname Harbour %define version 2.0.0 -%define releasen beta1 +%define releasen beta2 %define hb_pref hb %define hb_arch export HB_ARCHITECTURE=linux %define hb_cc export HB_COMPILER=gcc diff --git a/harbour/include/hbver.h b/harbour/include/hbver.h index 56a00b01a9..c034cf4d78 100644 --- a/harbour/include/hbver.h +++ b/harbour/include/hbver.h @@ -62,7 +62,7 @@ #define HB_VER_MAJOR 2 /* Major version number */ #define HB_VER_MINOR 0 /* Minor version number */ #define HB_VER_RELEASE 0 /* Release number */ -#define HB_VER_STATUS "beta1" /* Build status */ +#define HB_VER_STATUS "beta2" /* Build status */ #define __HARBOUR__ 0x020000 /* Three bytes: Major + Minor + Release. This is recommented for 3rd party .c and .prg level code. */ #endif /* HB_VER_H_ */ diff --git a/harbour/mpkg_win.bat b/harbour/mpkg_win.bat index f0bd9b1f34..e51c63c15b 100644 --- a/harbour/mpkg_win.bat +++ b/harbour/mpkg_win.bat @@ -28,7 +28,7 @@ if not "%OS%" == "Windows_NT" goto END setlocal rem ; Basic setup -set HB_VERSION=2.0.0beta1 +set HB_VERSION=2.0.0beta2 if "%HB_ARCHITECTURE%" == "" set HB_ARCHITECTURE=win set HB_PKGNAME=harbour-%HB_VERSION%-%HB_ARCHITECTURE%-%HB_COMPILER% set HB_DIRNAME=harbour-%HB_ARCHITECTURE%-%HB_COMPILER% diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index f17951f97e..8484b3483e 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -171,6 +171,11 @@ REQUEST hbmk_KEYW #define _ESC_SINQUOTE_WATCOM 2 #define _ESC_NIX 3 +#define _MACRO_NORM_PREFIX "$" +#define _MACRO_LATE_PREFIX "%" +#define _MACRO_OPEN "{" +#define _MACRO_CLOSE "}" + #define _LNG_MARKER "${lng}" #define _HBMK_CFG_NAME "hbmk.cfg" @@ -1588,9 +1593,9 @@ FUNCTION hbmk( aArgs, /* @ */ lPause, /* @ */ lUTF8 ) CASE Left( cParam, 2 ) == "-L" .AND. ; Len( cParam ) > 2 - cParam := PathSepToTarget( hbmk, PathProc( MacroProc( hbmk, ArchCompFilter( hbmk, SubStr( cParam, 3 ) ), aParam[ _PAR_cFileName ] ), aParam[ _PAR_cFileName ] ) ) + cParam := PathProc( MacroProc( hbmk, ArchCompFilter( hbmk, SubStr( cParam, 3 ) ), aParam[ _PAR_cFileName ] ), aParam[ _PAR_cFileName ] ) IF ! Empty( cParam ) - AAdd( hbmk[ _HBMK_aLIBPATH ], cParam ) + AAdd( hbmk[ _HBMK_aLIBPATH ], PathSepToTarget( hbmk, cParam ) ) ENDIF CASE Left( cParamL, Len( "-instpath=" ) ) == "-instpath=" .AND. ; @@ -2958,6 +2963,13 @@ FUNCTION hbmk( aArgs, /* @ */ lPause, /* @ */ lUTF8 ) DEFAULT nScr_Esc TO nCmd_Esc + /* Delete all lib paths which contain late-evaluation macros. */ + FOR EACH tmp IN hbmk[ _HBMK_aLIBPATH ] DESCEND + IF ( _MACRO_LATE_PREFIX + _MACRO_OPEN ) $ tmp + hb_ADel( hbmk[ _HBMK_aLIBPATH ], tmp:__enumIndex(), .T. ) + ENDIF + NEXT + IF ! lStopAfterInit IF hbmk[ _HBMK_lINC ] IF ! Empty( cWorkDir ) @@ -5098,35 +5110,45 @@ STATIC FUNCTION HBC_ProcessOne( hbmk, cFileName, nNestingLevel ) CASE Lower( Left( cLine, Len( "libpaths=" ) ) ) == "libpaths=" ; cLine := SubStr( cLine, Len( "libpaths=" ) + 1 ) FOR EACH cItem IN hb_ATokens( cLine,, .T. ) - cItem := PathSepToTarget( hbmk, PathProc( MacroProc( hbmk, StrStripQuote( cItem ), cFileName ), FN_DirGet( cFileName ) ) ) + cItem := PathProc( MacroProc( hbmk, StrStripQuote( cItem ), cFileName ), FN_DirGet( cFileName ) ) IF ! Empty( cItem ) + cItem := PathNormalize( PathSepToSelf( cItem ) ) IF AScan( hbmk[ _HBMK_aLIBPATH ], {|tmp| tmp == cItem } ) == 0 - AAdd( hbmk[ _HBMK_aLIBPATH ], cItem ) + AAdd( hbmk[ _HBMK_aLIBPATH ], PathSepToTarget( hbmk, cItem ) ) ENDIF ENDIF NEXT CASE Lower( Left( cLine, Len( "incpaths=" ) ) ) == "incpaths=" ; cLine := SubStr( cLine, Len( "incpaths=" ) + 1 ) FOR EACH cItem IN hb_ATokens( cLine,, .T. ) - cItem := PathSepToTarget( hbmk, PathProc( MacroProc( hbmk, StrStripQuote( cItem ), cFileName ), FN_DirGet( cFileName ) ) ) - IF AScan( hbmk[ _HBMK_aINCPATH ], {|tmp| tmp == cItem } ) == 0 - AAddNotEmpty( hbmk[ _HBMK_aINCPATH ], cItem ) + cItem := PathProc( MacroProc( hbmk, StrStripQuote( cItem ), cFileName ), FN_DirGet( cFileName ) ) + IF ! Empty( cItem ) + cItem := PathNormalize( PathSepToSelf( cItem ) ) + IF AScan( hbmk[ _HBMK_aINCPATH ], {|tmp| tmp == cItem } ) == 0 + AAdd( hbmk[ _HBMK_aINCPATH ], PathSepToTarget( hbmk, cItem ) ) + ENDIF ENDIF NEXT CASE Lower( Left( cLine, Len( "inctrypaths=" ) ) ) == "inctrypaths=" ; cLine := SubStr( cLine, Len( "inctrypaths=" ) + 1 ) FOR EACH cItem IN hb_ATokens( cLine,, .T. ) - cItem := PathSepToTarget( hbmk, PathProc( MacroProc( hbmk, StrStripQuote( cItem ), cFileName ), FN_DirGet( cFileName ) ) ) - IF AScan( hbmk[ _HBMK_aINCTRYPATH ], {|tmp| tmp == cItem } ) == 0 - AAddNotEmpty( hbmk[ _HBMK_aINCTRYPATH ], cItem ) + cItem := PathProc( MacroProc( hbmk, StrStripQuote( cItem ), cFileName ), FN_DirGet( cFileName ) ) + IF ! Empty( cItem ) + cItem := PathNormalize( PathSepToSelf( cItem ) ) + IF AScan( hbmk[ _HBMK_aINCTRYPATH ], {|tmp| tmp == cItem } ) == 0 + AAdd( hbmk[ _HBMK_aINCTRYPATH ], PathSepToTarget( hbmk, cItem ) ) + ENDIF ENDIF NEXT CASE Lower( Left( cLine, Len( "instpaths=" ) ) ) == "instpaths=" ; cLine := SubStr( cLine, Len( "instpaths=" ) + 1 ) FOR EACH cItem IN hb_ATokens( cLine,, .T. ) - cItem := PathSepToTarget( hbmk, PathProc( MacroProc( hbmk, StrStripQuote( cItem ), cFileName ), FN_DirGet( cFileName ) ) ) - IF AScan( hbmk[ _HBMK_aINSTPATH ], {|tmp| tmp == cItem } ) == 0 - AAddNotEmpty( hbmk[ _HBMK_aINSTPATH ], cItem ) + cItem := PathProc( MacroProc( hbmk, StrStripQuote( cItem ), cFileName ), FN_DirGet( cFileName ) ) + IF ! Empty( cItem ) + cItem := PathNormalize( PathSepToSelf( cItem ) ) + IF AScan( hbmk[ _HBMK_aINSTPATH ], {|tmp| tmp == cItem } ) == 0 + AAdd( hbmk[ _HBMK_aINSTPATH ], PathSepToTarget( hbmk, cItem ) ) + ENDIF ENDIF NEXT @@ -5408,9 +5430,9 @@ STATIC FUNCTION ArchCompFilter( hbmk, cItem ) "hbmk_COMP( hbmk ) == Lower( '%1' ) .OR. " +; "hbmk_KEYW( hbmk, Lower( '%1' ) ) )" - IF ( nStart := At( "{", cItem ) ) > 0 .AND. ; - !( SubStr( cItem, nStart - 1, 1 ) $ "$%" ) .AND. ; - ( nEnd := hb_At( "}", cItem, nStart ) ) > 0 + IF ( nStart := At( _MACRO_OPEN, cItem ) ) > 0 .AND. ; + !( SubStr( cItem, nStart - 1, 1 ) $ ( _MACRO_NORM_PREFIX + _MACRO_LATE_PREFIX ) ) .AND. ; + ( nEnd := hb_At( _MACRO_CLOSE, cItem, nStart ) ) > 0 /* Separate filter from the rest of the item */ cFilterSrc := SubStr( cItem, nStart + 1, nEnd - nStart - 1 ) @@ -5467,13 +5489,13 @@ STATIC FUNCTION MacroProc( hbmk, cString, cFileName, lLateMode ) LOCAL cStart IF lLateMode == NIL .OR. ! lLateMode - cStart := "${" + cStart := _MACRO_NORM_PREFIX + _MACRO_OPEN ELSE - cStart := "%{" + cStart := _MACRO_LATE_PREFIX + _MACRO_OPEN ENDIF DO WHILE ( nStart := At( cStart, cString ) ) > 0 .AND. ; - ( nEnd := hb_At( "}", cString, nStart ) ) > 0 + ( nEnd := hb_At( _MACRO_CLOSE, cString, nStart ) ) > 0 cMacro := Upper( SubStr( cString, nStart + 2, nEnd - nStart - 2 ) )