From 1e1fdcc70df36ce8d54adb19924fc90e4da767b5 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 2 Jun 2010 15:01:35 +0000 Subject: [PATCH] 2010-06-02 17:00 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * utils/hbmk2/hbmk2.prg % Using precompiled regexp. * ChangeLog ! Fixed my name into header of previous entry. --- harbour/ChangeLog | 9 ++++++++- harbour/utils/hbmk2/hbmk2.prg | 11 +++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 1c05dbe5a5..9f2ed264dc 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,7 +17,14 @@ past entries belonging to author(s): Viktor Szakats. */ -2010-06-02 13:10 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) +2010-06-02 17:00 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * utils/hbmk2/hbmk2.prg + % Using precompiled regexp. + + * ChangeLog + ! Fixed my name into header of previous entry. + +2010-06-02 13:10 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * utils/hbmk2/hbmk2.prg + Now uses regular expression to extract #include directives from source files, so now it should recognize all supported diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index bb4c7c7b06..e24aeca4b5 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -5498,6 +5498,7 @@ STATIC FUNCTION FindNewerHeaders( hbmk, cFileName, cParentDir, lSystemHeader, tT LOCAL cDependency LOCAL aCommand + STATIC s_hRegexInclude := NIL STATIC s_hExclStd := NIL IF s_hExclStd == NIL @@ -5773,7 +5774,9 @@ STATIC FUNCTION FindNewerHeaders( hbmk, cFileName, cParentDir, lSystemHeader, tT http://en.wikipedia.org/wiki/PCRE http://www.pcre.org/pcre.txt */ - aMatch := hb_regexAll( '^[ \t]*#[ \t]*include[ \t]+(\".+?\"|<.+?>)', cFile, .F. /* lCaseSensitive */, .T. /* lNewLine */, NIL, NIL /* nGetMatch */, .T. /* lOnlyMatch */ ) + DEFAULT s_hRegexInclude TO hb_regexComp( '^[ \t]*#[ \t]*include[ \t]+(\".+?\"|<.+?>)', .F. /* lCaseSensitive */, .T. /* lNewLine */ ) + + aMatch := hb_regexAll( s_hRegexInclude, cFile, NIL /* lCaseSensitive */, NIL /* lNewLine */, NIL, NIL /* nGetMatch */, .T. /* lOnlyMatch */ ) IF ! Empty( aMatch ) FOR EACH tmp IN aMatch @@ -7864,11 +7867,11 @@ STATIC FUNCTION getFirstFunc( hbmk, cFile ) EXIT ENDIF NEXT - ELSEIF Lower( cExt ) == ".c" .OR. ; - Lower( cExt ) == ".cpp" .OR. ; + ELSEIF Lower( cExt ) == ".cpp" .OR. ; Lower( cExt ) == ".cc" .OR. ; Lower( cExt ) == ".cxx" .OR. ; - Lower( cExt ) == ".cx" + Lower( cExt ) == ".cx" .OR. ; + _EXT_IS_UPPER( cExt, ".C" ) /* do nothing */ ELSEIF ! Empty( cExecNM := FindInPath( hbmk[ _HBMK_cCCPREFIX ] + "nm" ) ) cFuncList := ""