2009-04-15 00:22 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* utils/hbmk2/hbmk2.prg
+ libpaths= can now have relative paths specified, and in this
case the path will be adjusted by absolute path of host .hbp.
This makes it possible to point hbmk2 to a .hbp file in a
foreign dir, and let it pick up local lib dirs automatically.
+ .hbp files passed without absolute paths will now inherit
the .hbm path if applicable.
+ Will now echo all explicitly specified .hbp filenames on
screen in -info mode.
+ Added echo= support in .hbp files. The parameter will be
echoed to stdout as is.
+ Added macro support for following .hbp lines:
libpaths=, prgflags=, cflags=, ldflags=, echo=.
Supported macros are:
${hb_root}: hbmk2 base dir
${hb_parent}: .hbp file dir
${hb_arch}: architecture
${hb_comp}: compiler
${<envvar>}: any envvar
+ .hbp files are now searched in libpaths, too.
; NOTE: With above changes it's possible to refer to a 3rd
party lib solely by pointing to its .hbp file, from
that point all lib/include paths can be automatically
picked up. Here's an example for hwgui, the file
needs to be places in hwgui root dir:
---
{win}prgflags=-i${hb_parent}include
{win}cflags=-I${hb_parent}include
{win}libpaths=${hb_parent}lib
{win}libs=hwgui hwg_qhtm procmisc hbxml
{win}gt=gtgui
---
Any hwgui apps can be compiled with this command:
hbmk2 appname.prg C:\hwgui\hwgui.hbp
* contrib/hbtip/tests/dnldftp.prg
% Minor opt.
This commit is contained in:
@@ -8,6 +8,45 @@
|
||||
2009-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org)
|
||||
*/
|
||||
|
||||
2009-04-15 00:22 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
|
||||
* utils/hbmk2/hbmk2.prg
|
||||
+ libpaths= can now have relative paths specified, and in this
|
||||
case the path will be adjusted by absolute path of host .hbp.
|
||||
This makes it possible to point hbmk2 to a .hbp file in a
|
||||
foreign dir, and let it pick up local lib dirs automatically.
|
||||
+ .hbp files passed without absolute paths will now inherit
|
||||
the .hbm path if applicable.
|
||||
+ Will now echo all explicitly specified .hbp filenames on
|
||||
screen in -info mode.
|
||||
+ Added echo= support in .hbp files. The parameter will be
|
||||
echoed to stdout as is.
|
||||
+ Added macro support for following .hbp lines:
|
||||
libpaths=, prgflags=, cflags=, ldflags=, echo=.
|
||||
Supported macros are:
|
||||
${hb_root}: hbmk2 base dir
|
||||
${hb_parent}: .hbp file dir
|
||||
${hb_arch}: architecture
|
||||
${hb_comp}: compiler
|
||||
${<envvar>}: any envvar
|
||||
+ .hbp files are now searched in libpaths, too.
|
||||
; NOTE: With above changes it's possible to refer to a 3rd
|
||||
party lib solely by pointing to its .hbp file, from
|
||||
that point all lib/include paths can be automatically
|
||||
picked up. Here's an example for hwgui, the file
|
||||
needs to be places in hwgui root dir:
|
||||
---
|
||||
{win}prgflags=-i${hb_parent}include
|
||||
{win}cflags=-I${hb_parent}include
|
||||
{win}libpaths=${hb_parent}lib
|
||||
{win}libs=hwgui hwg_qhtm procmisc hbxml
|
||||
{win}gt=gtgui
|
||||
---
|
||||
Any hwgui apps can be compiled with this command:
|
||||
hbmk2 appname.prg C:\hwgui\hwgui.hbp
|
||||
|
||||
* contrib/hbtip/tests/dnldftp.prg
|
||||
% Minor opt.
|
||||
|
||||
2009-04-14 20:31 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
|
||||
* utils/hbmk2/hbmk2.prg
|
||||
+ Added support for -hbdyn option with bcc. .dll is created
|
||||
|
||||
@@ -2,20 +2,17 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/* DNLDftp.prg
|
||||
/*
|
||||
Download an file from an ftp server
|
||||
*/
|
||||
|
||||
#include "common.ch"
|
||||
|
||||
FUNCTION MAIN( cFile)
|
||||
PROCDURE MAIN( cFile)
|
||||
|
||||
LOCAL lRet
|
||||
? TRP20FTPEnv( cFile )
|
||||
|
||||
lRet := TRP20FTPEnv( cFile )
|
||||
? lRet
|
||||
|
||||
RETURN nil
|
||||
RETURN
|
||||
|
||||
*+±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±
|
||||
*+
|
||||
@@ -47,7 +44,7 @@ STATIC FUNCTION TRP20FTPEnv( cCarpeta )
|
||||
|
||||
// Leemos ficheros a enviar
|
||||
aFiles := { { cCarpeta, 1, 2, 3 } }
|
||||
// aFiles := Directory( cCarpeta)
|
||||
// aFiles := Directory( cCarpeta )
|
||||
|
||||
IF Len( aFiles ) > 0
|
||||
|
||||
|
||||
@@ -1151,6 +1151,21 @@ PROCEDURE Main( ... )
|
||||
|
||||
CASE FN_ExtGet( cParamL ) == ".hbp"
|
||||
|
||||
cParam := PathProc( cParam, aParam[ _PAR_cFileName ] )
|
||||
|
||||
IF ! hb_FileExists( cParam )
|
||||
FOR EACH tmp IN s_aLIBPATH
|
||||
IF hb_FileExists( DirAddPathSep( tmp ) + FN_NameExtGet( cParam ) )
|
||||
cParam := DirAddPathSep( tmp ) + FN_NameExtGet( cParam )
|
||||
EXIT
|
||||
ENDIF
|
||||
NEXT
|
||||
ENDIF
|
||||
|
||||
IF t_lInfo
|
||||
OutStd( "hbmk: Processing: " + cParam + hb_osNewLine() )
|
||||
ENDIF
|
||||
|
||||
HBP_ProcessOne( cParam,;
|
||||
@s_aLIBUSER,;
|
||||
@s_aLIBUSERGT,;
|
||||
@@ -3213,6 +3228,13 @@ STATIC FUNCTION FN_NameGet( cFileName )
|
||||
|
||||
RETURN cName
|
||||
|
||||
STATIC FUNCTION FN_NameExtGet( cFileName )
|
||||
LOCAL cName, cExt
|
||||
|
||||
hb_FNameSplit( cFileName,, @cName, @cExt )
|
||||
|
||||
RETURN hb_FNameMerge( NIL, cName, cExt )
|
||||
|
||||
STATIC FUNCTION FN_ExtGet( cFileName )
|
||||
LOCAL cExt
|
||||
|
||||
@@ -3389,7 +3411,7 @@ STATIC PROCEDURE HBP_ProcessOne( cFileName,;
|
||||
|
||||
CASE Lower( Left( cLine, Len( "libpaths=" ) ) ) == "libpaths=" ; cLine := SubStr( cLine, Len( "libpaths=" ) + 1 )
|
||||
FOR EACH cItem IN hb_ATokens( cLine,, .T. )
|
||||
cItem := PathSepToTarget( StrStripQuote( cItem ) )
|
||||
cItem := PathProc( PathSepToTarget( MacroProc( StrStripQuote( cItem ), FN_DirGet( cFileName ) ) ), cFileName )
|
||||
IF AScan( aLIBPATH, {|tmp| tmp == cItem } ) == 0
|
||||
AAddNotEmpty( aLIBPATH, cItem )
|
||||
ENDIF
|
||||
@@ -3413,9 +3435,15 @@ STATIC PROCEDURE HBP_ProcessOne( cFileName,;
|
||||
ENDIF
|
||||
NEXT
|
||||
|
||||
CASE Lower( Left( cLine, Len( "echo=" ) ) ) == "echo=" ; cLine := SubStr( cLine, Len( "echo=" ) + 1 )
|
||||
cLine := MacroProc( cLine, FN_DirGet( cFileName ) )
|
||||
IF ! Empty( cLine )
|
||||
OutStd( cLine + hb_osNewLine() )
|
||||
ENDIF
|
||||
|
||||
CASE Lower( Left( cLine, Len( "prgflags=" ) ) ) == "prgflags=" ; cLine := SubStr( cLine, Len( "prgflags=" ) + 1 )
|
||||
FOR EACH cItem IN hb_ATokens( cLine,, .T. )
|
||||
cItem := PathSepToTarget( StrStripQuote( cItem ) )
|
||||
cItem := PathSepToTarget( MacroProc( StrStripQuote( cItem ), FN_DirGet( cFileName ) ) )
|
||||
IF AScan( aOPTPRG, {|tmp| tmp == cItem } ) == 0
|
||||
AAddNotEmpty( aOPTPRG, cItem )
|
||||
ENDIF
|
||||
@@ -3423,7 +3451,7 @@ STATIC PROCEDURE HBP_ProcessOne( cFileName,;
|
||||
|
||||
CASE Lower( Left( cLine, Len( "cflags=" ) ) ) == "cflags=" ; cLine := SubStr( cLine, Len( "cflags=" ) + 1 )
|
||||
FOR EACH cItem IN hb_ATokens( cLine,, .T. )
|
||||
cItem := StrStripQuote( cItem )
|
||||
cItem := MacroProc( StrStripQuote( cItem ), FN_DirGet( cFileName ) )
|
||||
IF AScan( aOPTC, {|tmp| tmp == cItem } ) == 0
|
||||
AAddNotEmpty( aOPTC, cItem )
|
||||
ENDIF
|
||||
@@ -3431,7 +3459,7 @@ STATIC PROCEDURE HBP_ProcessOne( cFileName,;
|
||||
|
||||
CASE Lower( Left( cLine, Len( "ldflags=" ) ) ) == "ldflags=" ; cLine := SubStr( cLine, Len( "ldflags=" ) + 1 )
|
||||
FOR EACH cItem IN hb_ATokens( cLine,, .T. )
|
||||
cItem := StrStripQuote( cItem )
|
||||
cItem := MacroProc( StrStripQuote( cItem ), FN_DirGet( cFileName ) )
|
||||
IF AScan( aOPTL, {|tmp| tmp == cItem } ) == 0
|
||||
AAddNotEmpty( aOPTL, cItem )
|
||||
ENDIF
|
||||
@@ -3650,6 +3678,7 @@ STATIC FUNCTION ArchCompFilter( cItem )
|
||||
"hbmk_KEYW( Lower( '%' ) ) )"
|
||||
|
||||
IF ( nStart := At( "{", cItem ) ) > 0 .AND. ;
|
||||
!( SubStr( cItem, nStart - 1, 1 ) == "$" ) .AND. ;
|
||||
( nEnd := hb_At( "}", cItem, nStart ) ) > 0
|
||||
|
||||
/* Separate filter from the rest of the item */
|
||||
@@ -3699,7 +3728,7 @@ STATIC FUNCTION MacroProc( cString, cDirParent )
|
||||
DO WHILE ( nStart := At( "${", cString ) ) > 0 .AND. ;
|
||||
( nEnd := hb_At( "}", cString, nStart ) ) > 0
|
||||
|
||||
cMacro := Upper( SubStr( cString, nStart + 2, nEnd - nStart - 1 ) )
|
||||
cMacro := Upper( SubStr( cString, nStart + 2, nEnd - nStart - 2 ) )
|
||||
|
||||
DO CASE
|
||||
CASE cMacro == "HB_ROOT"
|
||||
@@ -3708,8 +3737,12 @@ STATIC FUNCTION MacroProc( cString, cDirParent )
|
||||
IF Empty( cDirParent )
|
||||
cMacro := ""
|
||||
ELSE
|
||||
cMacro := PathSepToSelf( DirAddPathSep( cDirParent ) )
|
||||
cMacro := PathSepToSelf( cDirParent )
|
||||
ENDIF
|
||||
CASE cMacro == "HB_ARCH" .OR. cMacro == "HB_ARCHITECTURE"
|
||||
cMacro := t_cARCH
|
||||
CASE cMacro == "HB_COMP" .OR. cMacro == "HB_COMPILER"
|
||||
cMacro := t_cCOMP
|
||||
CASE ! Empty( GetEnv( cMacro ) )
|
||||
cMacro := GetEnv( cMacro )
|
||||
OTHERWISE
|
||||
@@ -4193,12 +4226,14 @@ STATIC PROCEDURE ShowHelp( lLong )
|
||||
" libs=[<libname[s]>], gt=[gtname], prgflags=[Harbour flags]" ,;
|
||||
" cflags=[C compiler flags], ldflags=[Linker flags], libpaths=[lib paths]" ,;
|
||||
" gui|mt|shared|nulrdd|debug|map|strip|run|inc=[yes|no]" ,;
|
||||
" compr=[yes|no|def|min|max]" ,;
|
||||
" compr=[yes|no|def|min|max], echo=<text>" ,;
|
||||
" Lines starting with '#' char are ignored" ,;
|
||||
" - Platform filters are accepted in each .hbp line and with -l options." ,;
|
||||
" Filter format: {[!][<arch|comp>]}. Filters can be combined " ,;
|
||||
" using '&', '|' operators and grouped by parantheses." ,;
|
||||
" Ex.: {win}, {gcc}, {linux|darwin}, {win&!pocc}, {(win|linux)&!owatcom}" ,;
|
||||
" - Certain .hbp lines (prgflags=, cflags=, ldflags=, libpaths=, echo=) will",;
|
||||
" accept macros: ${hb_root}, ${hb_parent}, ${hb_arch}, ${hb_comp}, ${<envvar>}",;
|
||||
" - Defaults and feature support vary by architecture/compiler." ,;
|
||||
" - Supported <comp> values for each supported <arch> value:" ,;
|
||||
" linux : gcc, owatcom, icc" ,;
|
||||
|
||||
Reference in New Issue
Block a user