tsekityam / gyp

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

Xcode project written to wrong directory #417

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Create a project of the following structure:

    .
    ├── out/
    ├── tools/
    │   ├── gyp/
    │   └── gyp_test.py
    ├── src/
    │   └── main.cc
    └── test.gyp

2. Run gyp_test.py (which runs gyp.main)

What is the expected output? What do you see instead?

    The Xcode project is written to the project root rather than out/

Please provide any additional information below.

--- xcode_old.py
+++ xcode.py
@@ -590,7 +590,8 @@
       continue
     xcodeproj_path = build_file_root + options.suffix + '.xcodeproj'
     if options.generator_output:
-      xcodeproj_path = os.path.join(options.generator_output, xcodeproj_path)
+      xcodeproj_path = os.path.join(options.generator_output,
+                                    os.path.basename(xcodeproj_path))
     xcp = XcodeProject(build_file, xcodeproj_path, build_file_dict)
     xcode_projects[build_file] = xcp
     pbxp = xcp.project

Original issue reported on code.google.com by m...@superlukas.com on 19 Mar 2014 at 12:29

GoogleCodeExporter commented 9 years ago
Please land this patch, this also fixes an issue where if you have the 
structure:
     .
    ├── out/
    ├── gyp1/
    │   └── library.gyp
    ├── gyp2/
    │   └── app.gyp

Previously, if app.gyp dependent on library.gyp and you had the output 
specified correctly:
 * app.xcodeproj would be located in out/, which is correct
 * library.xcodeproject would be located in gyp1/, which would be incorrect

After this patch:
 * app.xcodeproj would be located in out/, which is correct
 * library.xcodeproject would be located in out/, which is correct

So I definitely vote for landing this one.

Original comment by terencej...@gmail.com on 22 Mar 2014 at 1:28