Chromium Code Reviews| Index: pylib/gyp/generator/xcode.py |
| =================================================================== |
| --- pylib/gyp/generator/xcode.py (revision 897) |
| +++ pylib/gyp/generator/xcode.py (working copy) |
| @@ -59,6 +59,7 @@ |
| generator_additional_path_sections = [ |
| 'mac_bundle_resources', |
| 'mac_framework_headers', |
| + 'mac_framework_private_headers', |
| # 'mac_framework_dirs', input already handles _dirs endings. |
| ] |
| @@ -68,6 +69,7 @@ |
| 'mac_bundle', |
| 'mac_bundle_resources', |
| 'mac_framework_headers', |
| + 'mac_framework_private_headers', |
| 'xcode_create_dependents_test_runner', |
| ] |
| @@ -75,6 +77,7 @@ |
| generator_extra_sources_for_rules = [ |
| 'mac_bundle_resources', |
| 'mac_framework_headers', |
| + 'mac_framework_private_headers', |
| ] |
| @@ -535,12 +538,16 @@ |
| xct.ResourcesPhase().AddFile(resource) |
| -def AddHeaderToTarget(header, pbxp, xct): |
| +def AddPublicHeaderToTarget(header, pbxp, xct): |
|
TVL
2011/03/02 02:07:15
Maybe extend this to take another arg to control p
|
| # TODO(mark): Combine with AddSourceToTarget above? Or just inline this call |
| # where it's used. |
| xct.HeadersPhase().AddFile(header, '{ATTRIBUTES = (Public, ); }') |
| +def AddPrivateHeaderToTarget(header, pbxp, xct): |
| + xct.HeadersPhase().AddFile(header, '{ATTRIBUTES = (Private, ); }') |
| + |
| + |
| _xcode_variable_re = re.compile('(\$\((.*?)\))') |
| def ExpandXcodeVariables(string, expansions): |
| """Expands Xcode-style $(VARIABLES) in string per the expansions dict. |
| @@ -1052,8 +1059,8 @@ |
| else: |
| pbxp.AddOrGetFileInRootGroup(source) |
| - # Add "mac_bundle_resources" and "mac_framework_headers" if it's a bundle |
| - # of any type. |
| + # Add "mac_bundle_resources", "mac_framework_headers", and |
| + # "mac_framework_private_headers" if it's a bundle of any type. |
| if is_bundle: |
| for resource in tgt_mac_bundle_resources: |
| (resource_root, resource_extension) = posixpath.splitext(resource) |
| @@ -1063,8 +1070,11 @@ |
| pbxp.AddOrGetFileInRootGroup(resource) |
| for header in spec.get('mac_framework_headers', []): |
| - AddHeaderToTarget(header, pbxp, xct) |
| + AddPublicHeaderToTarget(header, pbxp, xct) |
| + for header in spec.get('mac_framework_private_headers', []): |
| + AddPrivateHeaderToTarget(header, pbxp, xct) |
| + |
| # Add "copies". |
| for copy_group in spec.get('copies', []): |
| pbxcp = gyp.xcodeproj_file.PBXCopyFilesBuildPhase({ |
| @@ -1086,7 +1096,8 @@ |
| # Excluded files can also go into the project file. |
| if not skip_excluded_files: |
| - for key in ['sources', 'mac_bundle_resources', 'mac_framework_headers']: |
| + for key in ['sources', 'mac_bundle_resources', 'mac_framework_headers', |
| + 'mac_framework_private_headers']: |
| excluded_key = key + '_excluded' |
| for item in spec.get(excluded_key, []): |
| pbxp.AddOrGetFileInRootGroup(item) |