Boost C++ Libraries: Ticket #7163: Issue in glob rule when invoked in <conditional>. https://svn.boost.org/trac10/ticket/7163 <p> Hi, </p> <p> When we use glob rule inside conditional in dependency target, it makes "globbing" not inside directory of dependency project, but inside dependent one. To reproduce, take example/libraries from boost build repository, amend util/foo/jamfile to introduce &lt;conditional&gt;: </p> <blockquote class="citation"> <blockquote class="citation"> <blockquote class="citation"> </blockquote> </blockquote> </blockquote> <p> rule print-my-sources ( properties * ) { </p> <blockquote> <p> ECHO My sources: ; ECHO [ glob *.cpp ] ; </p> </blockquote> <p> } </p> <p> project </p> <blockquote> <p> : usage-requirements &lt;include&gt;include ; </p> </blockquote> <p> lib bar : bar.cpp : &lt;conditional&gt;@print-my-sources ; &lt;&lt;&lt; </p> <p> Finally, build from jamroot.jam level and see the output: My sources: app.cpp My sources: app.cpp </p> <p> We expected to see "bar.cpp", while it seems that context was not switched from dependent "app" to dependency "util/foo", and thus we got "app.cpp". </p> <p> Attached reworked example/libraries. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7163 Trac 1.4.3 Dmitriy Kinoshenko <dvb.kharkov@…> Mon, 23 Jul 2012 20:43:10 GMT attachment set https://svn.boost.org/trac10/ticket/7163 https://svn.boost.org/trac10/ticket/7163 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">libraries.tar.gz</span> </li> </ul> Ticket Dmitriy Kinoshenko <dvb.kharkov@…> Mon, 23 Jul 2012 20:45:11 GMT summary changed https://svn.boost.org/trac10/ticket/7163#comment:1 https://svn.boost.org/trac10/ticket/7163#comment:1 <ul> <li><strong>summary</strong> <span class="trac-field-old">Issue in glob rule when defined in &lt;conditional&gt;.</span> → <span class="trac-field-new">Issue in glob rule when invoked in &lt;conditional&gt;.</span> </li> </ul> Ticket Jurko Gospodnetic Wed, 29 Aug 2012 16:04:07 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/7163#comment:2 https://svn.boost.org/trac10/ticket/7163#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> The issue has been solved by not allowing the global project level glob() rule after Boost Build's module loading phase. That rule globs from the folder containing the 'last/currently loaded project module' and since conditional rules get triggered only after the module loading phase has has been completed - it was 'accidentally' using some 'last loaded' project module. </p> <p> Latest trunk Boost Build version will actually report a clean/readable error message in this case. </p> <p> Use one of the globbing rules from the path.jam module that allow you to specify the folder you want to GLOB. </p> <p> Hope this helps. </p> <p> Best regards, </p> <blockquote> <p> Jurko Gospodnetić </p> </blockquote> Ticket