Closed GoogleCodeExporter closed 9 years ago
Patch implementing the option: https://chromiumcodereview.appspot.com/10408025
Original comment by torne@chromium.org
on 18 May 2012 at 3:05
The outcome of the recent discussion on gyp-developer [1] is that gyp should
allow duplicate target names in different directories and that we should fix
the individual backends to either support this, or at least fail gracefully.
I've spoken to Torne about this and we're on the same page - he's abandoned
https://chromiumcodereview.appspot.com/10408025 and I'll upload a new patch.
[1] https://groups.google.com/forum/?fromgroups#!topic/gyp-developer/6fbaqLfvAU0
Original comment by stevebl...@chromium.org
on 29 May 2012 at 11:39
The current behaviour of the ninja backend ...
- If multiple targets in different directories use the same name, ninja outputs
a warning that 'multiple rules generate target. build will not be correct'. The
build continues, but only one target is generated.
- If such duplicate targets also define actions/rules/copies with the same
name, ninja outputs an error that there is a duplicate rule, and fails.
Original comment by stevebl...@chromium.org
on 29 May 2012 at 11:56
Commit: 159fe3f09a7398b3bf48200855888596c1b95110
Email: steveblock@chromium.org@78cadc50-ecff-11dd-a971-7dbc132099af
Fix make and ninja backends to sensibly handle duplicate target names in
different directories
Currently, if two multiple targets in different directories use the same name,
gyp's behaviour depends on the particular backend and is confusing at best. See
bug for details.
This change fixes the make and ninja backends to ...
- always build all targets when duplicate targets exist
- use the correct action/rule/copy when such duplicate targets define
actions/rules/copies with the same name
It also adds a test for this.
BUG=gyp:270
TEST=test/same-target-name-different-directory/
Review URL: https://chromiumcodereview.appspot.com/10447063
git-svn-id: http://gyp.googlecode.com/svn/trunk@1415
78cadc50-ecff-11dd-a971-7dbc132099af
M pylib/gyp/generator/make.py
M pylib/gyp/generator/ninja.py
M pylib/gyp/generator/ninja_test.py
M test/intermediate_dir/gyptest-intermediate-dir.py
A test/same-target-name-different-directory/gyptest-all.py
A test/same-target-name-different-directory/src/subdir1/subdir1.gyp
A test/same-target-name-different-directory/src/subdir2/subdir2.gyp
A test/same-target-name-different-directory/src/subdirs.gyp
A test/same-target-name-different-directory/src/touch.py
Original comment by bugdroid1@chromium.org
on 11 Jun 2012 at 10:01
Original comment by stevebl...@chromium.org
on 11 Jun 2012 at 10:02
This change seems to break ninja builds due to the rsp generated file name's
length:
ninja: ERROR:
WriteFile(cloud_policy_backend_header_compile_target_src_chrome_app_policy_cloud
_policy_codegen_gyp_cloud_policy_backend_header_compile_target_genproto.pyproto_
chrome_browser_policy_proto_device_management_backend_pb2_py.rsp): Unable to
create file. No such file or directory
Original comment by jaysoff...@gmail.com
on 22 Jun 2012 at 9:04
The full command is:
cmd /s /c "python gyp-win-tool action-wrapper environment.x86
cloud_policy_backend_header_compile_target_src_chrome_app_policy_cloud_policy_co
degen_gyp_cloud_policy_backend_header_compile_target_genproto.pyproto_chrome_bro
wser_policy_proto_device_management_backend_pb2_py.rsp"
WriteFile(cloud_policy_backend_header_compile_target_src_chrome_app_policy_cloud
_policy_codegen_gyp_cloud_policy_backend_header_compile_target_genproto.pyproto_
chrome_browser_policy_proto_device_management_backend_pb2_py.rsp): Unable to
create file. No such file or directory
Original comment by jaysoff...@gmail.com
on 22 Jun 2012 at 9:06
Opened https://code.google.com/p/gyp/issues/detail?id=276 to track the issue
describe in previous two comments.
Original comment by jaysoff...@gmail.com
on 22 Jun 2012 at 9:28
Original issue reported on code.google.com by
torne@chromium.org
on 18 May 2012 at 3:02