GitNiko / gyp

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

Expanding array variables in a subproject's `sources` key fails in unclear fashion. #456

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Arrange the files in a folder like this:

gyp-bug/ |- top-level.gyp |- build.sh |- sub-project/ |- sub-project.gyp |- proj/ |- main.cpp


2. Build with `bash build.sh` and notice the error message says the following:

make: *\ No rule to make target out/Default/obj.target/proj/proj/main.o', needed byout/Default/proj'. Stop.


3. Change line 10 of `sub-project/sub-project.gyp` to `"sources" : [ 
"proj/main.cpp ]` (e.g. manually expand the `<@(sourceFiles)` variable.

4. Clean the build files and rerun `bash build.sh` and notice that the project 
now builds and executes properly.

What is the expected output? What do you see instead?
I would have expected the variable expansion of `<@(sourceFiles)` to be the 
same as manually entering `proj/main.cpp`. Instead expanding `<@(sourceFiles)` 
in this context becomes something that gyp doesn't like. Not sure what.

What version of the product are you using? On what operating system?
OS: Mac OS X 10.9.4
Gyp version: Not sure how to tell, built fresh from HEAD today.

Please provide any additional information below.
Code and these steps are also in this gist: 
https://gist.github.com/NateLillich/db5bfeac45ac2446f143

Original issue reported on code.google.com by nata...@lifewanted.com on 9 Sep 2014 at 1:30

Attachments: