Open GoogleCodeExporter opened 9 years ago
Where did you get the value of 'files' from? ninja.py tries to replace "$!FOO"
variables before writing its output, they should never be user-visible (done by
ExpandSpecial() which is called from GypPathToNinja() which is called from
WriteCopies()).
Original comment by thakis@chromium.org
on 8 Apr 2013 at 9:07
@comment#1: I added a "print path" line after the "for path in copy['files']:"
in the ninja.py WriteCopies function.
Original comment by marshall@chromium.org
on 8 Apr 2013 at 9:16
@comment#1: For reference, adding a "print path" in the xcodeproj_file.py
AddFile function gives the following output:
$(INTERMEDIATE_DIR)/repack/am.lproj/locale.pak
$(INTERMEDIATE_DIR)/repack/ar.lproj/locale.pak
$(INTERMEDIATE_DIR)/repack/bg.lproj/locale.pak
Original comment by marshall@chromium.org
on 8 Apr 2013 at 9:25
That's the wrong place to put a print then :-) Printing after the calls to
GypPathToNinja() is more useful.
Generally, ninja/mac tries to be compatible to the xcode generator and when it
isn't that's a bug (since you said you weren't sure if it is on email). Since
chromium doesn't run into this bug, I likely won't fix it myself though.
Original comment by thakis@chromium.org
on 8 Apr 2013 at 9:33
@comment#4: Thanks. I'm trying to identify where the path logic lives in the
Xcode generator. If I'm successful I'll submit a patch for the ninja generator
to give it the same behavior.
As a potential work-around, is there currently a way to have ninja copy a list
of files like those shown above and maintain the directory component?
Original comment by magreenb...@gmail.com
on 8 Apr 2013 at 9:36
It looks like the Xcode generator has a special case for directories ending in
".lproj". From AddOrGetFileByPath in xcodeproj_file.py:
# Adding or getting a variant? Variants are files inside directories
# with an ".lproj" extension. Xcode uses variants for localization. For
# a variant path/to/Language.lproj/MainMenu.nib, put a variant group named
# MainMenu.nib inside path/to, and give it a variant named Language. In
# this example, grandparent would be set to path/to and parent_root would
# be set to Language.
Any objection to having a similar special case in the ninja generator?
Original comment by marshall@chromium.org
on 8 Apr 2013 at 10:17
Uploaded a proposed patch here: https://codereview.chromium.org/13832003
Original comment by marshall@chromium.org
on 8 Apr 2013 at 11:11
Original issue reported on code.google.com by
marshall@chromium.org
on 8 Apr 2013 at 8:43