[prev in list] [next in list] [prev in thread] [next in thread]
List: boost-build
Subject: [Boost-build] one target for all build configurations
From: Mikhail Levin <svarneticist () gmail ! com>
Date: 2011-10-23 1:16:10
Message-ID: CAFx+-x+Fx3qS9yzLN+QOSByVR3RvVR89_w9UGiPwOH+KfL9_Ew () mail ! gmail ! com
[Download RAW message or body]
Hello boost-builders,
I understand that similar issues have already been discussed. It is
still not clear to me, however.
I often need to generate files that are dependencies for other
targets. These files are same for debug/release, static/shared, etc.
configurations. I want to generate them at the specific location, no
more than once, as required by other targets.
Here is an example of a library that uses a generated header:
lib my_lib : lib.cpp : <implicit-dependency>generated.hpp ;
make generated.hpp : $(may_be_empty) : @generate_hpp :
<location>out/include/my_lib ;
rule generate_hpp ( out * : in * : prop * ) { s on $(<) = "//write
some stuff" ; }
actions generate_hpp { @($(STDOUT):E=$(s)) > "$(<)" }
This produces:
error: Duplicate name of actual target ...
because Boost.build wants to make separate generated.hpp for shared
and for static. The error goes away if I remove the <location>
property, but then generated.hpp will be re-generated for every build
configuration. It may seem okay to make half-dozen identical small
headers, but what if I need to transform the whole source tree of some
library?
How can I state that generated.hpp should be made only once and used
for all configurations of my_lib?
Mikhail
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic