Opened 4 years ago

Last modified 4 years ago

#10248 new Support Requests

Understanding generated files / targets.

Reported by: anonymous Owned by: Vladimir Prus
Milestone: To Be Determined Component: build
Version: Boost 1.51.0 Severity: Not Applicable
Keywords: Cc:


Attached is a .zip file containing a detailed Jamroot attempting to understand how generated files and dependency analysis work. There are a few points that are not clear to me, so I hope someone can take a look and see of any of these behaviors are actually bugs.

Attachments (1) (5.4 KB) - added by tabsoftwareconsulting@… 4 years ago.
Boost.Build project showing usages and potential? issues.

Download all attachments as: .zip

Change History (2)

Changed 4 years ago by tabsoftwareconsulting@…

Boost.Build project showing usages and potential? issues.

comment:1 Changed 4 years ago by Steven Watanabe

  • t1: Boost.Build assumes that if a target is updated, all dependent targets must be updated. It does not recheck the timestamp after building a target to determine whether it really changed. Instead of always-generate-main, you can use the print module, which will only update the target when its contents change.
  • t2: Boost.Build ignores t2.hpp because there's no rule for building an exe from a header. You really do need <implicit-dependency> for this. <implicit-dependency> does two things for you. It forces the jam target for t2.hpp to be generated, so that t2.hpp can be found by the #include scanner, and it also adds an appropriate -I directive to the compile command line. Remember that Boost.Build will put t2.hpp in some directory under bin/
  • t5: The reason that it doesn't relink is that there is no #include <t5.hpp>. <implicit-dependency> doesn't set up an actual dependency. It only says that there's a possible dependency which should be found by scanning the source. If you want an unconditional dependency, then use the <dependency> feature instead.
Note: See TracTickets for help on using tickets.