We found a file in the source tree that’s both checked in AND
something that’s potentially touched during the build process:
webkit/plugins/ppapi/ppb_opengles_impl.cc. This file is generated by
the generate_ppapi_gles_implementation action in
webkit/glue/webkit_glue.gypi, which specifies:
{
'action_name': 'generate_ppapi_gles_implementation',
'variables': {
'gles_script':
'<(DEPTH)/gpu/command_buffer/build_gles2_cmd_buffer.py',
},
'inputs': [
'<(gles_script)',
],
'outputs': [
'<(DEPTH)/webkit/plugins/ppapi/ppb_opengles_impl.cc',
],
'action': [
'python',
'<(gles_script)',
'--alternate-mode=chrome_ppapi'
],
'message': 'Generating Pepper OpenGL ES implementation',
}
This is bad. ppb_opengles_impl.cc shouldn’t be in the source tree
(where you’ve placed it now). It should be somewhere in
<(INTERMEDIATE_DIR) or <(SHARED_INTERMEDIATE_DIR).
It looks like at some point (r73222) this file transitioned from being
checked-in to being generated during the build. That would have been
the right time to move the location of the file.
Having a generated file checked in is bad for all sorts of reasons.
It’ll add a nuisance file to developers’ changelists. It’ll interfere
with the “pristine state” of a source tree. It can confuse build
environments that need to track dependencies.
Please restructure your action to not dump its output into the source tree.
Should we consider some sort of gyp lint check that prevents output
paths that don't use one of the intermediate dirs?
I think getting this right is kind of subtle.
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
suppress_wildcard only excludes * from depending on the target. It
doesn’t prevent anyone else from writing an explicit dependency on
your target.
If there’s a GYP target for it, someone might depend on it, and then
it becomes part of the build.
I suspect that this is a by-product of how make works. The makefiles
wind up with a rule to produce that file, so any time something
depends on that file (for example, to compile it), make will run the
rule if the file appears out of date. make doesn’t quite offer
target-level granularity, it’s allows file-to-file dependency
relationships, and effectively puts them into the same dependency
graph as target-to-target relationships.
If you just type "make", it will implicitly build all targets. Could that be it?
-- Elliot