|
Boost-Build : |
From: aulwelling_at_[hidden]
Date: 2007-03-13 12:28:59
ping
> -----Original Message-----
> From: aulwelling
> Sent: Wednesday, January 24, 2007 3:08 PM
> To: 'boost-build_at_[hidden]'
> Subject: [V2] How to get list of header file
> dependencies/help with make rule
>
> Hi all,
>
> I am generating a C++ file using a script (called
> generateCode.pl) that parses through other C++ files looking
> for certain keywords. Right now I have created a rule and
> actions to accomplish this:
>
> rule generateCode ( target : sources * : properties * )
> {
> }
> actions generateCode
> {
> # syntax: generateCode.pl outputFile inputFiles
> generateCode.pl $(<) $(>)
> }
>
> I then include the generated file inside a custom rule that
> builds a library from a list of sources
> rule mylib ( Libname : sources * )
> {
> lib $(Libname)
> : $(sources)
> version.cc
> :
> ;
>
> make version.cc : $(sources) : generateCode ;
> }
>
> I have 2 questions:
>
> First, I'd really like to pass the header files that each
> source file depends on to my script as well. Is there some
> way to get this list into a variable so I can tack that onto
> my list of sources?
>
> Second, I couldn't make this work without the corresponding
> (and empty) rule. Could someone explain why? I didn't see
> that as a requirement for using the make rule.
>
> Thanks,
> Ashley
>
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