Boost logo

Boost-Build :

Subject: [Boost-build] Get full source path in generator rule
From: Àëåêñåé Ì. Áàäÿåâ (leemouse_at_[hidden])
Date: 2009-03-30 08:07:46


Hi
Sorry for my bad English please.
I have my own generator (similar as headers-to-doxyfile rule in doxygen.jam)
And in the rule, named same as corresponding action, I need full path to
sources, provided to generator.
Below is text of my rule. But my code is not work - $(files) is emty...
Help me please solve this problem.

rule headers-to-projfile ( target : sources * : properties * )
{
     local text "# Generated by Boost.Build version 2" ;
     local output-dir = [ on $(target) return $(LOCATE) ] ;
     text += "OUTPUT_DIRECTORY = \"$(output-dir)\"" ;
     local files ;
     for local src in $(sources) {
         files += [ on $(src) return $(LOCATE) ] ;
     }
     text += "INPUT = $(files:J= )" ;
     print.output $(target) plain ;
     print.text $(text) : true ;
}

With best regards, Alexey Badyaev

-- 
Ñ óâàæåíèåì, Àëåêñåé Áàäÿåâ

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