|
Boost-Build : |
From: David Abrahams (gclbb-jamboost_at_[hidden])
Date: 2003-07-17 11:09:07
"pal.tw" <pal.tw_at_[hidden]> writes:
> English is not my mother language. Some words may be read
> so ridiculously. But I hope most of you understand what I sad.:-)
> Recently I tried Boost.Build V2 to build the "ImageMagick" project,
> and found something strange. I don't know if they are reasonable,
> or would be changed in the future. So I post it here, maybe someone
> will discuss it.
>
> 1. The built-in rule "GLOB" has the prototype like
> "rule GLOB ( directories + : patterns + : downcase-opt ? )",
> but [BBv2] rule "path.glob" has "rule glob ( dir : patterns + )".
> So I can't execute the following instructions successfully.
> #---------------------------------------------------------------------
> SOURCE_FILES = jp2 jpc base ;
> SOURCE_FILES =
> [ path.glob $(SOURCE_ROOT)/jp2/src/libjasper/$(SOURCE_FILES) : *.c ] ;
> SOURCE_FILES = [ MATCH .*(jp2/src/libjasper/.*) : $(SOURCE_FILES) ] ;
> #---------------------------------------------------------------------
>
> So I modify the "path.jam" file as the following.
> #---------------------------------------------------------------------
> rule glob ( dir : patterns + )
> {
> return [ sequence.transform make : [ GLOB [ native $(dir) ] :
> $(patterns) ] ] ;
> }
> #---------------------------------------------------------------------
> to
> #---------------------------------------------------------------------
> rule glob ( dir + : patterns + )
> {
> local result ;
> for local i in $(dir)
> {
> i = [ GLOB [ native $(i) ] : $(patterns) ] ;
> result += [ sequence.transform make : $(i) ] ;
> }
> return $(result) ;
> }
> #---------------------------------------------------------------------
> Is it more useful?
> Could I suggest to change the prototype of "path.glob" rule?
Why not:
rule glob ( dir + : patterns + )
{
return
[ sequence.transform make
: [ GLOB
[ sequence.transform native : $(dir) ]
: $(patterns)
]
] ;
}
??
> 3. The "msvc" toolset always use the "vcvars32.bat" file to setup
> the "msvc" environment variables, such as include-paths,
> library-paths ..etc. But no way to setup the location of
> the Platform SDK. This make me not to use the lastest system
> service released from Microsoft.
>
> Does anybody know the convenient way to setup the location
> of Platform SDK? When using "msvc" toolset, let [BBv2] search
> the location of the Platform SDK first, and then the compiler's
> location. Of course, not to modify the "msvc.jam" or
> "vcvars32.bat" files directly. ^_^
Does the Platform SDK ship with its own setup script?
If not, what do you have to do to your MSVC command-line in order to
use the SDK?
> 4. I saw someone suggested separating out common rules for OS.
> Hmmm, what about common features of a platform?
> A platform, I mean, includes OS and the computer architecture,
> such as CPU type. For example, Microsoft Windows may run in
> different computer system, such as "i386", "ALPHA", "IA64",
> "ALPHA64". and there are a little different compiler and
> linker options among them.
Good idea.
> So does gcc, there are so many varints could run in so many
> platform. Some features are particular in some platform,
> and must be point out by defining some symbols or applying
> some compiler options no matter what compiler we use.
> And It may be also useful for cross-compilation.
Specific suggestions would be welcome.
-- Dave Abrahams Boost Consulting www.boost-consulting.com
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk