Bug 1488 - dynamically generated headers cannot be cleanly included in ns3-headers
dynamically generated headers cannot be cleanly included in ns3-headers
Status: NEW
Product: ns-3
Classification: Unclassified
Component: build system
pre-release
All All
: P5 normal
Assigned To: Gustavo J. A. M. Carneiro
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-17 16:39 EDT by scheibel1
Modified: 2012-08-17 16:39 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description scheibel1 2012-08-17 16:39:13 EDT
The TaskGen method 'apply_ns3header' expects the headers in its source list to be present when it runs.  If one is dynamically generating header files (e.g. protobuf) for an ns3 module, then processing of the module header is dependent on the .h generator (e.g. protoc in the protobuf example).  

The problem: apply_ns3_header is a taskgen method and generally speaking compilation logic is placed in a task.  There are ways to create ordering between two TaskGen methods, and there are ways to create orderings between two Tasks, but there is not a way to create an ordering between a TaskGen method and a task.  In other words, the work done in apply_ns3header depends on the presence of .h files, yet it cannot be set to depend on tasks that generate .h files.

A short term fix involves performing the compilation in a taskgen method and creating a dependency between that method and 'apply_ns3header'; however, this does not seem in keeping with the waf philosophy (and is certainly wrong if the dynamic source generation tasks themselves depend on anything).

It would seem that since apply_ns3header is doing work with source files and could have dependencies, it would be nice to place its logic in a task.  I'm not sure whether this is feasible though.  

Thanks!