Boost logo

Boost-Build :

Subject: Re: [Boost-build] How to create and call a rule which acts differentlydepending on the build variant?
From: Deniz Bahadir (D.Bahadir_at_[hidden])
Date: 2009-11-12 06:43:51


Hi Johan,

your solution sounds interesting but its not really what my intention
was. (Maybe I was a little imprecise.)
I have a lot of libraries that exist with four different
postfix/suffix combinations, one for each build variant.

libfoo1_debugstatic.a
libfoo1_releasestatic.a
libfoo1_debugdynamic.so
libfoo1_releasedymaic.so
...
libfoo100_debugstatic.a
libfoo100_releasestatic.a
libfoo100_debugdynamic.so
libfoo100_releasedymaic.so

With your solution I have to write down all 400 library-names. What I
was planning was to just write down 100 library-base names
(libfoo1 .... libfoo100) and automatically append the correct
postfix/suffix combination, depending on the build variant. I thought
of doing this by a rule, which gets called and does the appropriate
thing. The problem is, I do not know how. As I wrote in my former
email, I now have a rule that returns the correct postfix/suffix
combination, but I am not sure about how to call this rule on the list
of library-base-names that shall be appended by the correct
postfix/suffix combination.
(The problem is probably, that I did not fully understand the rules
mechanism and when and how rules get called.)

Does someone know how to achieve what I have in mind?
DENIZ


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