humanai / gyp

Automatically exported from code.google.com/p/gyp
0 stars 0 forks source link

make generator does not populate targets that are not transitive dependencies of all.gyp #95

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Targets which are not reachable from all.gyp as a transitive dependency do not 
get created as an optional 
target. This does not match the behavior of the other generators.

Original issue reported on code.google.com by bradnel...@google.com on 20 Oct 2009 at 6:51

GoogleCodeExporter commented 9 years ago
This behaviour is intentional. Please see 
http://code.google.com/p/gyp/source/detail?
r=702. I'd welcome other fixes to that problem, but just re-enabling all the 
targets 
won't work. For that matter, is there a reason why any of the generators should 
generate targets that are not dependencies of the requested gyp file? If you 
want more 
targets, you could always specify other gyp files to process.

Original comment by mmoss@chromium.org on 20 Oct 2009 at 11:10

GoogleCodeExporter commented 9 years ago
So admittedly we're deluding the meaning of the word 'all', but the use case is 
that 
jrg would like to add a coverage target which is not part of what gets built by 
all.gyp. 
For the other generators, suppress_wildcard causes his coverage target to be 
skipped 
for the purpose of the default set of things to build, but it still can be 
called for 
manually.

It seems like we should pick one behavior or the other. It is a little messy 
having it 
flood-fill the world, but I'm not sure what to recommend.

If we go the route of only populating directly used dependencies, then 
suppress_wildcard becomes a misfeature, as it would prevent constructing an 
all_coverage.gyp which includes an alternate slice of the world.

I grant you generating more targets is somewhat frivolous, but for instance 
with 
vstudio/xcode it means that you get all sorts of useful sub-slices available 
for 
people to use (all.sln, chrome.sln, webkit.sln, base.sln etc).

Original comment by bradnel...@google.com on 20 Oct 2009 at 11:27

GoogleCodeExporter commented 9 years ago
As far as I can tell, scons also does the 'only transitive dependencies' thing. 
For 
instance, if I try to build the npGoogleNaClPlugin target that was causing 
problems 
for make (before r702), scons says:
scons: *** Do not know how to make target `npGoogleNaClPlugin'.  Stop.

That's actually what made me think this was the correct fix for make.

Original comment by mmoss@chromium.org on 21 Oct 2009 at 4:15

GoogleCodeExporter commented 9 years ago
mmoss, I don't think scons behaves the way you expect.  For example, if I 
   GYP_DEFINES='coverage=1' gclient runhooks --force
Then there is a coverage.scons, a 'coverage' target, and All.scons does NOT 
have Alias('coverage') in the App 
dependencies.    If I remove the 'suppress_wildcard':1 line in the coverage 
target in chrome.gyp, it shows up.

This contrasts with GYP_GENERATORS=make use where a coverage.mk is NOT 
generated if 'suppress_wildcard':1.

Original comment by j...@chromium.org on 21 Oct 2009 at 4:38

GoogleCodeExporter commented 9 years ago

Original comment by mmoss@chromium.org on 21 Oct 2009 at 4:50