Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(210)

Side by Side Diff: pylib/gyp/generator/make.py

Issue 1368133002: AIX's cp command does not support -af which is the default, so use -RPf which achives something sim… (Closed) Base URL: https://chromium.googlesource.com/external/gyp.git@master
Patch Set: AIX cp command line arguments update Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2013 Google Inc. All rights reserved. 1 # Copyright (c) 2013 Google Inc. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 # Notes: 5 # Notes:
6 # 6 #
7 # This is all roughly based on the Makefile system used by the Linux 7 # This is all roughly based on the Makefile system used by the Linux
8 # kernel, but is a non-recursive make -- we put the entire dependency 8 # kernel, but is a non-recursive make -- we put the entire dependency
9 # graph in front of make and let it figure it out. 9 # graph in front of make and let it figure it out.
10 # 10 #
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 cmd_cc = $(CC.$(TOOLSET)) $(GYP_CFLAGS) $(DEPFLAGS) $(CFLAGS.$(TOOLSET)) -c -o $ @ $< 358 cmd_cc = $(CC.$(TOOLSET)) $(GYP_CFLAGS) $(DEPFLAGS) $(CFLAGS.$(TOOLSET)) -c -o $ @ $<
359 359
360 quiet_cmd_cxx = CXX($(TOOLSET)) $@ 360 quiet_cmd_cxx = CXX($(TOOLSET)) $@
361 cmd_cxx = $(CXX.$(TOOLSET)) $(GYP_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) - c -o $@ $< 361 cmd_cxx = $(CXX.$(TOOLSET)) $(GYP_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) - c -o $@ $<
362 %(extra_commands)s 362 %(extra_commands)s
363 quiet_cmd_touch = TOUCH $@ 363 quiet_cmd_touch = TOUCH $@
364 cmd_touch = touch $@ 364 cmd_touch = touch $@
365 365
366 quiet_cmd_copy = COPY $@ 366 quiet_cmd_copy = COPY $@
367 # send stderr to /dev/null to ignore messages when linking directories. 367 # send stderr to /dev/null to ignore messages when linking directories.
368 cmd_copy = ln -f "$<" "$@" 2>/dev/null || (rm -rf "$@" && cp -af "$<" "$@") 368 cmd_copy = ln -f "$<" "$@" 2>/dev/null || (rm -rf "$@" && cp %(copy_archive_args )s "$<" "$@")
369 369
370 %(link_commands)s 370 %(link_commands)s
371 """ 371 """
372 372
373 r""" 373 r"""
374 # Define an escape_quotes function to escape single quotes. 374 # Define an escape_quotes function to escape single quotes.
375 # This allows us to handle quotes properly as long as we always use 375 # This allows us to handle quotes properly as long as we always use
376 # use single quotes and escape_quotes. 376 # use single quotes and escape_quotes.
377 escape_quotes = $(subst ','\'',$(1)) 377 escape_quotes = $(subst ','\'',$(1))
378 # This comment is here just to include a ' to unconfuse syntax highlighting. 378 # This comment is here just to include a ' to unconfuse syntax highlighting.
(...skipping 1624 matching lines...) Expand 10 before | Expand all | Expand 10 after
2003 makefile_name = 'Makefile' + options.suffix 2003 makefile_name = 'Makefile' + options.suffix
2004 makefile_path = os.path.join(options.toplevel_dir, makefile_name) 2004 makefile_path = os.path.join(options.toplevel_dir, makefile_name)
2005 if options.generator_output: 2005 if options.generator_output:
2006 global srcdir_prefix 2006 global srcdir_prefix
2007 makefile_path = os.path.join( 2007 makefile_path = os.path.join(
2008 options.toplevel_dir, options.generator_output, makefile_name) 2008 options.toplevel_dir, options.generator_output, makefile_name)
2009 srcdir = gyp.common.RelativePath(srcdir, options.generator_output) 2009 srcdir = gyp.common.RelativePath(srcdir, options.generator_output)
2010 srcdir_prefix = '$(srcdir)/' 2010 srcdir_prefix = '$(srcdir)/'
2011 2011
2012 flock_command= 'flock' 2012 flock_command= 'flock'
2013 copy_archive_arguments = '-af'
2013 header_params = { 2014 header_params = {
2014 'default_target': default_target, 2015 'default_target': default_target,
2015 'builddir': builddir_name, 2016 'builddir': builddir_name,
2016 'default_configuration': default_configuration, 2017 'default_configuration': default_configuration,
2017 'flock': flock_command, 2018 'flock': flock_command,
2018 'flock_index': 1, 2019 'flock_index': 1,
2019 'link_commands': LINK_COMMANDS_LINUX, 2020 'link_commands': LINK_COMMANDS_LINUX,
2020 'extra_commands': '', 2021 'extra_commands': '',
2021 'srcdir': srcdir, 2022 'srcdir': srcdir,
2023 'copy_archive_args': copy_archive_arguments,
2022 } 2024 }
2023 if flavor == 'mac': 2025 if flavor == 'mac':
2024 flock_command = './gyp-mac-tool flock' 2026 flock_command = './gyp-mac-tool flock'
2025 header_params.update({ 2027 header_params.update({
2026 'flock': flock_command, 2028 'flock': flock_command,
2027 'flock_index': 2, 2029 'flock_index': 2,
2028 'link_commands': LINK_COMMANDS_MAC, 2030 'link_commands': LINK_COMMANDS_MAC,
2029 'extra_commands': SHARED_HEADER_MAC_COMMANDS, 2031 'extra_commands': SHARED_HEADER_MAC_COMMANDS,
2030 }) 2032 })
2031 elif flavor == 'android': 2033 elif flavor == 'android':
2032 header_params.update({ 2034 header_params.update({
2033 'link_commands': LINK_COMMANDS_ANDROID, 2035 'link_commands': LINK_COMMANDS_ANDROID,
2034 }) 2036 })
2035 elif flavor == 'solaris': 2037 elif flavor == 'solaris':
2036 header_params.update({ 2038 header_params.update({
2037 'flock': './gyp-flock-tool flock', 2039 'flock': './gyp-flock-tool flock',
2038 'flock_index': 2, 2040 'flock_index': 2,
2039 }) 2041 })
2040 elif flavor == 'freebsd': 2042 elif flavor == 'freebsd':
2041 # Note: OpenBSD has sysutils/flock. lockf seems to be FreeBSD specific. 2043 # Note: OpenBSD has sysutils/flock. lockf seems to be FreeBSD specific.
2042 header_params.update({ 2044 header_params.update({
2043 'flock': 'lockf', 2045 'flock': 'lockf',
2044 }) 2046 })
2045 elif flavor == 'aix': 2047 elif flavor == 'aix':
2048 copy_archive_arguments = '-pPRf'
2046 header_params.update({ 2049 header_params.update({
2050 'copy_archive_args': copy_archive_arguments,
2047 'link_commands': LINK_COMMANDS_AIX, 2051 'link_commands': LINK_COMMANDS_AIX,
2048 'flock': './gyp-flock-tool flock', 2052 'flock': './gyp-flock-tool flock',
2049 'flock_index': 2, 2053 'flock_index': 2,
2050 }) 2054 })
2051 2055
2052 header_params.update({ 2056 header_params.update({
2053 'CC.target': GetEnvironFallback(('CC_target', 'CC'), '$(CC)'), 2057 'CC.target': GetEnvironFallback(('CC_target', 'CC'), '$(CC)'),
2054 'AR.target': GetEnvironFallback(('AR_target', 'AR'), '$(AR)'), 2058 'AR.target': GetEnvironFallback(('AR_target', 'AR'), '$(AR)'),
2055 'CXX.target': GetEnvironFallback(('CXX_target', 'CXX'), '$(CXX)'), 2059 'CXX.target': GetEnvironFallback(('CXX_target', 'CXX'), '$(CXX)'),
2056 'LINK.target': GetEnvironFallback(('LINK_target', 'LINK'), '$(LINK)'), 2060 'LINK.target': GetEnvironFallback(('LINK_target', 'LINK'), '$(LINK)'),
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
2200 root_makefile.write("endif\n") 2204 root_makefile.write("endif\n")
2201 root_makefile.write('\n') 2205 root_makefile.write('\n')
2202 2206
2203 if (not generator_flags.get('standalone') 2207 if (not generator_flags.get('standalone')
2204 and generator_flags.get('auto_regeneration', True)): 2208 and generator_flags.get('auto_regeneration', True)):
2205 WriteAutoRegenerationRule(params, root_makefile, makefile_name, build_files) 2209 WriteAutoRegenerationRule(params, root_makefile, makefile_name, build_files)
2206 2210
2207 root_makefile.write(SHARED_FOOTER) 2211 root_makefile.write(SHARED_FOOTER)
2208 2212
2209 root_makefile.close() 2213 root_makefile.close()
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698