Experts - I figured out "a way" to do what I want. I couldn't figure out in how to get a handle on the target corresponding to the sources passed to generated-targets. So I gave up on doing DEPENDS inside of generated-targets and just pass the sources list unchanged to unix-linking-generator.generated-targets. Later in the link actions rule, I discriminate the include-whole archive sources based on the presence of <include-library-whole> or whatever I called it entries in the properties list. <br><br> Thus I end up with a command line like:<br> <br> link -include_whole path/libfoo.a ...<br> <br> instead of<br> <br> link -include_whole path/libfoo.a path/libfoo.a ...<br> <br> FWIW - the generated-targets code now looks as follows:<br> <br> class hptns-linking-generator : unix-linking-generator<br> {<br> # Provides special handling for <hptns-include-whole> archives<br> rule generated-targets ( sources + : property-set : project name ? )<br> {<br> local properties2 = [ $(property-set).raw ] ;<br> for local s in $(sources)<br> {<br> if [ type.is-derived [ $(s).type ] STATIC_LIB ]<br> {<br> local a = [ $(s).action ] ;<br> local ps ;<br> local psraw ;<br> if $(a)<br> {<br> ps = [ $(a).properties ] ;<br> if $(ps)<br> {<br> psraw = [ $(ps).raw ] ;<br> }<br> }<br> if <hptns-include-whole>yes in $(psraw)<br> {<br> local actual-name = [ $(s).actual-name ] ; # Gristed name<br> properties2 += <hptns-include-whole-arch>$(actual-name) ;<br> }<br> }<br> }<br> local spawn = [ unix-linking-generator.generated-targets $(sources) <br> : [ property-set.create $(properties2) ] : $(project) $(name) ] ;<br> return $(spawn) ;<br> }<br> }<br> <br> # Helper rule for rule link is where I remove include-whole archives<br> # from normal library list.<br> <br> rule handle-libraries ( targets * : sources * : properties * )<br> {<br> local sources2 ;<br> local whole-archs ;<br> for local p in $(properties)<br> {<br> if $(p:G) = <hptns-include-whole-arch><br> {<br> whole-archs += $(p:G=) ;<br> }<br> }<br> for local s in $(sources)<br> {<br> local suffix = $(s:S) ;<br> <br> # Discriminate LIB types from OBJ types via well-known suffixes (Ugh)<br> if $(suffix) = .so || $(suffix) = .srl || $(suffix) = .a <br> {<br> if ! $(s) in $(whole-archs)<br> {<br> LIBS on $(targets) += $(s) ;<br> }<br> # else omit $(s) from LIBS list - the archive will get<br> # included via flags binding for <hptns-include-whole-arch><br> }<br> else<br> { <br> sources2 += $(s) ;<br> }<br> }<br> OBJS on $(targets) += $(sources2) ;<br> }<br> <br> FWIW (2c) - Mark<br> <br>