%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/self/root/usr/src/node-v0.10.4/tools/gyp/pylib/gyp/generator/
Upload File :
Create Path :
Current File : //proc/self/root/usr/src/node-v0.10.4/tools/gyp/pylib/gyp/generator/make.pyc

�
4�fQc@sIddlZddlZddlZddlZddlZddlZddlZddlmZidd6dd6dd6dd6d	d
6dd6d
d6dd6dd6dd6dd6dd6dd6dd6Ze	Z
eaga
gagad�Zd�Zd�Zd Zd!Zd"Zd#Zd$ed%ed&ed'ed(ed)Zd*Zd+Zd,�Zd-Zd.Zd/Zd0Zid1d26d3d46d3d56d3d66d1d76d1d86Zd9�Z d:�Z!d;�Z"d<�Z#d=�Z$d>�Z%d?�Z&d@�Z'da(dA�Z)dBdC�Z*iZ+iZ,dDfdE��YZ-dF�Z.dG�Z/dH�Z0dS(Ii����N(tGetEnvironFallbackttEXECUTABLE_PREFIXtEXECUTABLE_SUFFIXtlibtSTATIC_LIB_PREFIXtSHARED_LIB_PREFIXs.atSTATIC_LIB_SUFFIXs $(obj).$(TOOLSET)/$(TARGET)/genitINTERMEDIATE_DIRs
$(obj)/gentSHARED_INTERMEDIATE_DIRs$(builddir)tPRODUCT_DIRs%(INPUT_ROOT)stRULE_INPUT_ROOTs%(INPUT_DIRNAME)stRULE_INPUT_DIRNAMEs
$(abspath $<)tRULE_INPUT_PATHs$(suffix $<)tRULE_INPUT_EXTs$(notdir $<)tRULE_INPUT_NAMEs$(BUILDTYPE)tCONFIGURATION_NAMEcCs+tjj|�}|dkr�|jdd�|jdd�|jdtd�|jdtd�dd	ljj}t|d
g�a	t|dg�a
t|dg�atj
id
d6dd6�n[|}|dkr�d}n|jd|�|jdd�|jdd�|jdd�d	S(sDCalculate additional variables for use in the build (called by gyp).tmactOStSHARED_LIB_SUFFIXs.dylibtSHARED_LIB_DIRR
tLIB_DIRi����Nt+generator_additional_non_configuration_keyst"generator_additional_path_sectionst!generator_extra_sources_for_rulestobjcs.mtobjcxxs.mmtandroidtlinuxs.sos$(builddir)/lib.$(TOOLSET)s$(obj).$(TOOLSET)(tgyptcommont	GetFlavort
setdefaulttgenerator_default_variablestgyp.generator.xcodet	generatortxcodetgetattrRRRtCOMPILABLE_EXTENSIONStupdate(tdefault_variablestparamstflavortxcode_generatortoperating_system((s'./tools/gyp/pylib/gyp/generator/make.pytCalculateVariables>s.			cCs7|jdi�}|jdd�}|r3tandS(sOCalculate the generator specific info that gets fed to input (called by
  gyp).tgenerator_flagstandroid_ndk_versionN(tgettNonetTruet#generator_wants_sorted_dependencies(R)R.R/((s'./tools/gyp/pylib/gyp/generator/make.pytCalculateGeneratorInputInfo`scCs?tjj|�}|r;tjj|�r;tj|�ndS(N(tostpathtdirnametexiststmakedirs(R6tdir((s'./tools/gyp/pylib/gyp/generator/make.pytensure_directory_existskst?s�quiet_cmd_alink = AR($(TOOLSET)) $@
cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) crs $@ $(filter %.o,$^)

quiet_cmd_alink_thin = AR($(TOOLSET)) $@
cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^)

# Due to circular dependencies between libraries :(, we wrap the
# special "figure out circular dependencies" flags around the entire
# input list during linking.
quiet_cmd_link = LINK($(TOOLSET)) $@
cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) -Wl,--end-group $(LIBS)

# We support two kinds of shared objects (.so):
# 1) shared_library, which is just bundling together many dependent libraries
# into a link line.
# 2) loadable_module, which is generating a module intended for dlopen().
#
# They differ only slightly:
# In the former case, we want to package all dependent code into the .so.
# In the latter case, we want to package just the API exposed by the
# outermost module.
# This means shared_library uses --whole-archive, while loadable_module doesn't.
# (Note that --whole-archive is incompatible with the --start-group used in
# normal linking.)

# Other shared-object link notes:
# - Set SONAME to the library filename so our binaries don't reference
# the local, absolute paths used on the link command-line.
quiet_cmd_solink = SOLINK($(TOOLSET)) $@
cmd_solink = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ -Wl,--whole-archive $(LD_INPUTS) -Wl,--no-whole-archive $(LIBS)

quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@
cmd_solink_module = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ -Wl,--start-group $(filter-out FORCE_DO_CMD, $^) -Wl,--end-group $(LIBS)
sMquiet_cmd_alink = LIBTOOL-STATIC $@
cmd_alink = rm -f $@ && ./gyp-mac-tool filter-libtool libtool $(GYP_LIBTOOLFLAGS) -static -o $@ $(filter %.o,$^)

quiet_cmd_link = LINK($(TOOLSET)) $@
cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o "$@" $(LD_INPUTS) $(LIBS)

# TODO(thakis): Find out and document the difference between shared_library and
# loadable_module on mac.
quiet_cmd_solink = SOLINK($(TOOLSET)) $@
cmd_solink = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o "$@" $(LD_INPUTS) $(LIBS)

# TODO(thakis): The solink_module rule is likely wrong. Xcode seems to pass
# -bundle -single_module here (for osmesa.so).
quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@
cmd_solink_module = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(filter-out FORCE_DO_CMD, $^) $(LIBS)
s�quiet_cmd_alink = AR($(TOOLSET)) $@
cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) crs $@ $(filter %.o,$^)

quiet_cmd_alink_thin = AR($(TOOLSET)) $@
cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^)

# Due to circular dependencies between libraries :(, we wrap the
# special "figure out circular dependencies" flags around the entire
# input list during linking.
quiet_cmd_link = LINK($(TOOLSET)) $@
quiet_cmd_link_host = LINK($(TOOLSET)) $@
cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) -Wl,--end-group $(LIBS)
cmd_link_host = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(LD_INPUTS) $(LIBS)

# Other shared-object link notes:
# - Set SONAME to the library filename so our binaries don't reference
# the local, absolute paths used on the link command-line.
quiet_cmd_solink = SOLINK($(TOOLSET)) $@
cmd_solink = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ -Wl,--whole-archive $(LD_INPUTS) -Wl,--no-whole-archive $(LIBS)

quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@
cmd_solink_module = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ -Wl,--start-group $(filter-out FORCE_DO_CMD, $^) -Wl,--end-group $(LIBS)
quiet_cmd_solink_module_host = SOLINK_MODULE($(TOOLSET)) $@
cmd_solink_module_host = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ $(filter-out FORCE_DO_CMD, $^) $(LIBS)
s*
# We borrow heavily from the kernel build setup, though we are simpler since
# we don't have Kconfig tweaking settings on us.

# The implicit make rules have it looking for RCS files, among other things.
# We instead explicitly write all the rules we care about.
# It's even quicker (saves ~200ms) to pass -r on the command line.
MAKEFLAGS=-r

# The source directory tree.
srcdir := %(srcdir)s
abs_srcdir := $(abspath $(srcdir))

# The name of the builddir.
builddir_name ?= %(builddir)s

# The V=1 flag on command line makes us verbosely print command lines.
ifdef V
  quiet=
else
  quiet=quiet_
endif

# Specify BUILDTYPE=Release on the command line for a release build.
BUILDTYPE ?= %(default_configuration)s

# Directory all our build output goes into.
# Note that this must be two directories beneath src/ for unit tests to pass,
# as they reach into the src/ directory for data with relative paths.
builddir ?= $(builddir_name)/$(BUILDTYPE)
abs_builddir := $(abspath $(builddir))
depsdir := $(builddir)/.deps

# Object output directory.
obj := $(builddir)/obj
abs_obj := $(abspath $(obj))

# We build up a list of every single one of the targets so we can slurp in the
# generated dependency rule Makefiles in one pass.
all_deps :=

%(make_global_settings)s

# C++ apps need to be linked with g++.
#
# Note: flock is used to seralize linking. Linking is a memory-intensive
# process so running parallel links can often lead to thrashing.  To disable
# the serialization, override LINK via an envrionment variable as follows:
#
#   export LINK=g++
#
# This will allow make to invoke N linker processes as specified in -jN.
LINK ?= %(flock)s $(builddir)/linker.lock $(CXX.target)

CC.target ?= %(CC.target)s
CFLAGS.target ?= $(CFLAGS)
CXX.target ?= %(CXX.target)s
CXXFLAGS.target ?= $(CXXFLAGS)
LINK.target ?= %(LINK.target)s
LDFLAGS.target ?= $(LDFLAGS)
AR.target ?= $(AR)

# TODO(evan): move all cross-compilation logic to gyp-time so we don't need
# to replicate this environment fallback in make as well.
CC.host ?= %(CC.host)s
CFLAGS.host ?=
CXX.host ?= %(CXX.host)s
CXXFLAGS.host ?=
LINK.host ?= %(LINK.host)s
LDFLAGS.host ?=
AR.host ?= %(AR.host)s

# Define a dir function that can handle spaces.
# http://www.gnu.org/software/make/manual/make.html#Syntax-of-Functions
# "leading spaces cannot appear in the text of the first argument as written.
# These characters can be put into the argument value by variable substitution."
empty :=
space := $(empty) $(empty)

# http://stackoverflow.com/questions/1189781/using-make-dir-or-notdir-on-a-path-with-spaces
replace_spaces = $(subst $(space),s ,$1)
unreplace_spaces = $(subst s�,$(space),$1)
dirx = $(call unreplace_spaces,$(dir $(call replace_spaces,$1)))

# Flags to make gcc output dependency info.  Note that you need to be
# careful here to use the flags that ccache and distcc can understand.
# We write to a dep file on the side first and then rename at the end
# so we can't end up with a broken dep file.
depfile = $(depsdir)/$(call replace_spaces,$@).d
DEPFLAGS = -MMD -MF $(depfile).raw

# We have to fixup the deps output in a few ways.
# (1) the file output should mention the proper .o file.
# ccache or distcc lose the path to the target, so we convert a rule of
# the form:
#   foobar.o: DEP1 DEP2
# into
#   path/to/foobar.o: DEP1 DEP2
# (2) we want missing files not to cause us to fail to build.
# We want to rewrite
#   foobar.o: DEP1 DEP2 \
#               DEP3
# to
#   DEP1:
#   DEP2:
#   DEP3:
# so if the files are missing, they're just considered phony rules.
# We have to do some pretty insane escaping to get those backslashes
# and dollar signs past make, the shell, and sed at the same time.
# Doesn't work with spaces, but that's fine: .d files have spaces in
# their names replaced with other characters.
define fixup_dep
# The depfile may not exist if the input file didn't have any #includes.
touch $(depfile).raw
# Fixup path as in (1).
sed -e "s|^$(notdir $@)|$@|" $(depfile).raw >> $(depfile)
# Add extra rules as in (2).
# We remove slashes and replace spaces with new lines;
# remove blank lines;
# delete the first line and append a colon to the remaining lines.
sed -e 's|\\||' -e 'y| |\n|' $(depfile).raw |\
  grep -v '^$$'                             |\
  sed -e 1d -e 's|$$|:|'                     \
    >> $(depfile)
rm $(depfile).raw
endef

# Command definitions:
# - cmd_foo is the actual command to run;
# - quiet_cmd_foo is the brief-output summary of the command.

quiet_cmd_cc = CC($(TOOLSET)) $@
cmd_cc = $(CC.$(TOOLSET)) $(GYP_CFLAGS) $(DEPFLAGS) $(CFLAGS.$(TOOLSET)) -c -o $@ $<

quiet_cmd_cxx = CXX($(TOOLSET)) $@
cmd_cxx = $(CXX.$(TOOLSET)) $(GYP_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $<
%(extra_commands)s
quiet_cmd_touch = TOUCH $@
cmd_touch = touch $@

quiet_cmd_copy = COPY $@
# send stderr to /dev/null to ignore messages when linking directories.
cmd_copy = ln -f "$<" "$@" 2>/dev/null || (rm -rf "$@" && cp -af "$<" "$@")

%(link_commands)s

# Define an escape_quotes function to escape single quotes.
# This allows us to handle quotes properly as long as we always use
# use single quotes and escape_quotes.
escape_quotes = $(subst ','\'',$(1))
# This comment is here just to include a ' to unconfuse syntax highlighting.
# Define an escape_vars function to escape '$' variable syntax.
# This allows us to read/write command lines with shell variables (e.g.
# $LD_LIBRARY_PATH), without triggering make substitution.
escape_vars = $(subst $$,$$$$,$(1))
# Helper that expands to a shell command to echo a string exactly as it is in
# make. This uses printf instead of echo because printf's behaviour with respect
# to escape sequences is more portable than echo's across different shells
# (e.g., dash, bash).
exact_echo = printf '%%s\n' '$(call escape_quotes,$(1))'

# Helper to compare the command we're about to run against the command
# we logged the last time we ran the command.  Produces an empty
# string (false) when the commands match.
# Tricky point: Make has no string-equality test function.
# The kernel uses the following, but it seems like it would have false
# positives, where one string reordered its arguments.
#   arg_check = $(strip $(filter-out $(cmd_$(1)), $(cmd_$@)) \
#                       $(filter-out $(cmd_$@), $(cmd_$(1))))
# We instead substitute each for the empty string into the other, and
# say they're equal if both substitutions produce the empty string.
# .d files contain sa instead of spaces, take that into account.
command_changed = $(or $(subst $(cmd_$(1)),,$(cmd_$(call replace_spaces,$@))),\
                       $(subst $(cmd_$(call replace_spaces,$@)),,$(cmd_$(1))))

# Helper that is non-empty when a prerequisite changes.
# Normally make does this implicitly, but we force rules to always run
# so we can check their command lines.
#   $? -- new prerequisites
#   $| -- order-only dependencies
prereq_changed = $(filter-out FORCE_DO_CMD,$(filter-out $|,$?))

# Helper that executes all postbuilds until one fails.
define do_postbuilds
  @E=0;\
  for p in $(POSTBUILDS); do\
    eval $$p;\
    E=$$?;\
    if [ $$E -ne 0 ]; then\
      break;\
    fi;\
  done;\
  if [ $$E -ne 0 ]; then\
    rm -rf "$@";\
    exit $$E;\
  fi
endef

# do_cmd: run a command via the above cmd_foo names, if necessary.
# Should always run for a given target to handle command-line changes.
# Second argument, if non-zero, makes it do asm/C/C++ dependency munging.
# Third argument, if non-zero, makes it do POSTBUILDS processing.
# Note: We intentionally do NOT call dirx for depfile, since it contains s* for
# spaces already and dirx strips the s� characters.
define do_cmd
$(if $(or $(command_changed),$(prereq_changed)),
  @$(call exact_echo,  $($(quiet)cmd_$(1)))
  @mkdir -p "$(call dirx,$@)" "$(dir $(depfile))"
  $(if $(findstring flock,$(word %(flock_index)d,$(cmd_$1))),
    @$(cmd_$(1))
    @echo "  $(quiet_cmd_$(1)): Finished",
    @$(cmd_$(1))
  )
  @$(call exact_echo,$(call escape_vars,cmd_$(call replace_spaces,$@) := $(cmd_$(1)))) > $(depfile)
  @$(if $(2),$(fixup_dep))
  $(if $(and $(3), $(POSTBUILDS)),
    $(call do_postbuilds)
  )
)
endef

# Declare the "%(default_target)s" target first so it is the default,
# even though we don't have the deps yet.
.PHONY: %(default_target)s
%(default_target)s:

# make looks for ways to re-generate included makefiles, but in our case, we
# don't have a direct way. Explicitly telling make that it has nothing to do
# for them makes it go faster.
%%.d: ;

# Use FORCE_DO_CMD to force a target to run.  Should be coupled with
# do_cmd.
.PHONY: FORCE_DO_CMD
FORCE_DO_CMD:

s�
quiet_cmd_objc = CXX($(TOOLSET)) $@
cmd_objc = $(CC.$(TOOLSET)) $(GYP_OBJCFLAGS) $(DEPFLAGS) -c -o $@ $<

quiet_cmd_objcxx = CXX($(TOOLSET)) $@
cmd_objcxx = $(CXX.$(TOOLSET)) $(GYP_OBJCXXFLAGS) $(DEPFLAGS) -c -o $@ $<

# Commands for precompiled header files.
quiet_cmd_pch_c = CXX($(TOOLSET)) $@
cmd_pch_c = $(CC.$(TOOLSET)) $(GYP_PCH_CFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $<
quiet_cmd_pch_cc = CXX($(TOOLSET)) $@
cmd_pch_cc = $(CC.$(TOOLSET)) $(GYP_PCH_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $<
quiet_cmd_pch_m = CXX($(TOOLSET)) $@
cmd_pch_m = $(CC.$(TOOLSET)) $(GYP_PCH_OBJCFLAGS) $(DEPFLAGS) -c -o $@ $<
quiet_cmd_pch_mm = CXX($(TOOLSET)) $@
cmd_pch_mm = $(CC.$(TOOLSET)) $(GYP_PCH_OBJCXXFLAGS) $(DEPFLAGS) -c -o $@ $<

# gyp-mac-tool is written next to the root Makefile by gyp.
# Use $(4) for the command, since $(2) and $(3) are used as flag by do_cmd
# already.
quiet_cmd_mac_tool = MACTOOL $(4) $<
cmd_mac_tool = ./gyp-mac-tool $(4) $< "$@"

quiet_cmd_mac_package_framework = PACKAGE FRAMEWORK $@
cmd_mac_package_framework = ./gyp-mac-tool package-framework "$@" $(4)

quiet_cmd_infoplist = INFOPLIST $@
cmd_infoplist = $(CC.$(TOOLSET)) -E -P -Wno-trigraphs -x c $(INFOPLIST_DEFINES) "$<" -o "$@"
s�
# gyp-sun-tool is written next to the root Makefile by gyp.
# Use $(4) for the command, since $(2) and $(3) are used as flag by do_cmd
# already.
quiet_cmd_sun_tool = SUNTOOL $(4) $<
cmd_sun_tool = ./gyp-sun-tool $(4) $< "$@"
cCs�ttj�dtj�}|jd�x4|D],}|jd|�|jdt|�q/W|jd�x4|D],}|jd|�|jdt|�qsW|jd�x4|D],}|jd|�|jdt|�q�W|jd�dS(	Ntkeys1# Suffix rules, putting all outputs into $(obj).
s4$(obj).$(TOOLSET)/%%.o: $(srcdir)/%%%s FORCE_DO_CMD
s	@$(call do_cmd,%s,1)
s,
# Try building from generated source, too.
s<$(obj).$(TOOLSET)/%%.o: $(obj).$(TOOLSET)/%%%s FORCE_DO_CMD
s
s1$(obj).$(TOOLSET)/%%.o: $(obj)/%%%s FORCE_DO_CMD
(tsortedR&tkeyststrtlowertwrite(twritert
extensionstext((s'./tools/gyp/pylib/gyp/generator/make.pytWriteRootHeaderSuffixRules�s





s1# Suffix rules, putting all outputs into $(obj).
s+# Try building from generated source, too.
s�# "all" is a concatenation of the "all" targets from all the included
# sub-makefiles. This is just here to clarify.
all:

# Add in dependency-tracking rules.  $(all_deps) is the list of every single
# target in our tree. Only consider the ones with .d (dependency) info:
d_files := $(wildcard $(foreach f,$(all_deps),$(depsdir)/$(f).d))
ifneq ($(d_files),)
  include $(d_files)
endif
s/# This file is generated by gyp; do not edit.

tccs.ctcxxs.ccs.cpps.cxxs.ss.Scs/x(�fd�tD�D]}|rtSqWtS(s:Return true if the file is compilable (should be in OBJS).c3s|]}�j|�VqdS(N(tendswith(t.0te(tfilename(s'./tools/gyp/pylib/gyp/generator/make.pys	<genexpr>+s(R&R2tFalse(RLtres((RLs'./tools/gyp/pylib/gyp/generator/make.pyt
Compilable)scCs
|jd�S(sAReturn true if the file is linkable (should be on the link line).s.o(RI(RL((s'./tools/gyp/pylib/gyp/generator/make.pytLinkable1scCstjj|�ddS(s1Translate a compilable filename to its .o target.is.o(R5R6tsplitext(RL((s'./tools/gyp/pylib/gyp/generator/make.pytTarget6scCsd|jdd�dS(s�Quotes an argument so that it will be interpreted literally by a POSIX
     shell. Taken from
     http://stackoverflow.com/questions/35817/whats-the-best-way-to-escape-ossystem-calls-in-python
     t's'\''(treplace(ts((s'./tools/gyp/pylib/gyp/generator/make.pytEscapeShellArgument;scCs|jdd�S(srMake has its own variable expansion syntax using $. We must escape it for
     string to be interpreted literally.t$s$$(RT(RU((s'./tools/gyp/pylib/gyp/generator/make.pytEscapeMakeVariableExpansionCscCs(t|�}t|�}|jdd�S(sBEscapes a CPP define so that it will reach the compiler unaltered.t#s\#(RVRXRT(RU((s'./tools/gyp/pylib/gyp/generator/make.pytEscapeCppDefineIscCs-d|kr)d|jdd�d}n|S(sSTODO: Should this ideally be replaced with one or more of the above
     functions?t"s\"(RT(tstring((s'./tools/gyp/pylib/gyp/generator/make.pytQuoteIfNecessaryRscCstjdd|�S(sGConvert a string to a value that is acceptable as a make variable name.s
[^a-zA-Z0-9_]t_(tretsub(R\((s'./tools/gyp/pylib/gyp/generator/make.pytStringToMakefileVariableZscCs.d|kr|Stjj|�r&|St|S(s,Convert a path to its source directory form.s$((R5R6tisabst
srcdir_prefix(R6((s'./tools/gyp/pylib/gyp/generator/make.pyt	Sourceify`s
s\ cCs|jd|�S(Nt (RT(RUtquote((s'./tools/gyp/pylib/gyp/generator/make.pytQuoteSpacesistMakefileWritercBsIeZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�Zd�Zd!ded�Zd!ed�Zd!d!eeed�Zd�Zdd�Zd!d�Zd�Zd�Zd�Z d�Z!d�Z"d�Z#d �Z$RS("s�MakefileWriter packages up the writing of one target-specific foobar.mk.

  Its only real entry point is Write(), and is mostly used for namespacing.
  cCs�||_||_i|_i|_i|_x�tj�D]u}|jjid|t|f|6�|jjid|t|f|6�|jjid|t|f|6�q:WdS(NsT$(obj).$(TOOLSET)/$(TARGET)/%%.o: $(srcdir)/%%%s FORCE_DO_CMD
	@$(call do_cmd,%s,1)
s\$(obj).$(TOOLSET)/$(TARGET)/%%.o: $(obj).$(TOOLSET)/%%%s FORCE_DO_CMD
	@$(call do_cmd,%s,1)
sQ$(obj).$(TOOLSET)/$(TARGET)/%%.o: $(obj)/%%%s FORCE_DO_CMD
	@$(call do_cmd,%s,1)
(R.R*tsuffix_rules_srcdirtsuffix_rules_objdir1tsuffix_rules_objdir2R&R?R'(tselfR.R*RE((s'./tools/gyp/pylib/gyp/generator/make.pyt__init__|s					cs�t|�t|d��_�jjt�|�_|�_|d�_|d�_|d�_	t
jj�j
|��_�j
dkr�t
jj|��_n	d�_�j|�\}}g}	g}
g}g}g}
�jr�j|��_�j|��_n�j|��_�_t|jdd���_d�_�jsk�j�jkr�tjj�j��_�j�}n�j�_�j}�j d�j	��j d�j�d
|kr��j!|d
|
|	||�nd|kr'�j"|d|
|	||�nd|krM�j#|d|	|�n�jr�|jdg�|}�j$||
��j%|
�n|jdg�|
}|r�j&||||	||t
jj'�j�fd��j(��t)t*|�}|r�j t+�t,g|D]}tjj-|�d^q�}x4|D],}|�j.kr@�j �j.|�q@q@W�j t/�x4|D],}|�j0kr��j �j0|�q�q�Wx4|D],}|�j1kr��j �j1|�q�q�W�j d��jr|
j2�j�qqn�j3||||||
|	|�|t4|<�jdkrf�jt5|<n�j6jdd�r��j7�j||�n�jj8�dS(s�The main entry point: writes a .mk file for a single target.

    Arguments:
      qualified_target: target we're generating
      base_path: path relative to source root we're building in, used to resolve
                 target-relative paths
      output_filename: output .mk file name to write
      spec, configs: gyp info
      part_of_all: flag indicating this target is part of 'all'
    twttarget_namettypettoolsetRtstandalone_static_libraryit
executabletloadable_moduletshared_librarysTOOLSET := s
TARGET := tactionstrulestcopiestmac_bundle_resourcestsourcescst�j|��S(N(Rdt
Absolutify(tp(Rl(s'./tools/gyp/pylib/gyp/generator/make.pyt<lambda>�sis!# End of this set of suffix ruleststatic_libraryR/N(s
executablesloadable_modulesshared_library(sstatic_librarysshared_library(9R;topentfpRBtheadertqualified_targetR6ttargetRpRqRtxcode_emulationtIsMacBundleR*t
is_mac_bundlet
XcodeSettingstxcode_settingsR1tComputeDepstComputeMacBundleOutputtoutputtComputeMacBundleBinaryOutputt
output_binaryt
ComputeOutputtboolR0tis_standalone_static_libraryt_INSTALLABLE_TARGETSR5tbasenametaliast_InstallableTargetInstallPathtWriteLntWriteActionst
WriteRulestWriteCopiestWriteMacBundleResourcestWriteMacInfoPlisttWriteSourcestMacPrefixHeadertPchifytfilterROt#SHARED_HEADER_SUFFIX_RULES_COMMENT1tsetRQRit#SHARED_HEADER_SUFFIX_RULES_COMMENT2RjRktappendtWriteTargetttarget_outputsttarget_link_depsR.tWriteAndroidNdkModuleRuletclose(RlR�t	base_pathtoutput_filenametspectconfigstpart_of_alltdepst	link_depst
extra_outputst
extra_sourcestextra_link_depstextra_mac_bundle_resourcestmac_bundle_depstinstall_pathtall_mac_bundle_resourcestall_sourcesRzRURDRE((Rls'./tools/gyp/pylib/gyp/generator/make.pytWrite�s�
		


					

		

/




	

cCs�t|�t|d�|_|jjt�|jdtjjtjj	|�|��|jd�|jd�|r�d|}n|jd|dj|�f�|jj
�dS(	s�Write a "sub-project" Makefile.

    This is a small, wrapper Makefile that calls the top-level Makefile to build
    the targets from a single gyp file (i.e. a sub-project).

    Arguments:
      output_filename: sub-project Makefile name to write
      makefile_path: path to the top-level Makefile
      targets: list of "all" targets for this sub-project
      build_dir: build output directory, relative to the sub-project
    Rnsexport builddir_name ?= %ss.PHONY: allsall:s -C s
	$(MAKE)%s %sReN(R;RR�RBR�R�R5R6tjoinR7R�(RlR�t
makefile_pathttargetst	build_dir((s'./tools/gyp/pylib/gyp/generator/make.pytWriteSubMakes
	#


 c	Cs�|j�}x�|D]�}td|j|df�}|jd|d�|d}	|d}
t�}x:|
D]2}tjj|�d}
|
ro|j|
�qoqoWt	|j
dt��r�||
7}nt	|j
dt��r�||
7}n|d	}|jd
kr3g|D]}t
jj||�^q}nt
jj|�}d|kro|jd||df�n|jd||f�t|�dkr�d
dj|�d|}ndt|jp�d�}|jd|j�}|jd|j�}|jd|||f�|j�t|j|
�}
|jdt|
d��|jdt|
d��|j|
d|j��x*|	D]"}d|ks�td|��q�Wx*|
D]"}d|ks�td|��q�Wg|
D]}t
jj||�^q�}
g|	D]}t
jj||�^q}	|j|
ttt|j|	��d|d|�d|}|jd|dj|
�f�|jd|�|j�qW|j�dS(s�Write Makefile code for any 'actions' from the gyp input.

    extra_sources: a list that will be filled in with newly generated source
                   files, if any
    extra_outputs: a list that will be filled in with any outputs of these
                   actions (used to make other pieces dependent on these
                   actions)
    part_of_all: flag indicating this target is part of 'all'
    s%s_%staction_names### Rules for action "%s":tinputstoutputsitprocess_outputs_as_sourcest'process_outputs_as_mac_bundle_resourcestactionRtmessagesquiet_cmd_%s = ACTION %s $@smkdir -p %sRes; scd %s; t.s	$(TARGET)stcmd_%s = LD_LIBRARY_PATH=$(builddir)/lib.host:$(builddir)/lib.target:$$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; %s%ss%s: obj := $(abs_obj)s%s: builddir := $(abs_builddir)s3Spaces in action input filenames not supported (%s)s4Spaces in action output filenames not supported (%s)R�tcommandsaction_%s_outputss%s := %ss$(%s)N(tGetSortedXcodeEnvRaR�R�R�R5R6tsplittaddtintR0RMR*RR�t
ExpandEnvVarsRtEncodePOSIXShellListtlenR�RdRTR�tmapR{RgtWriteSortedXcodeEnvtAssertionErrort
WriteDoCmdR�(RlRvR�R�R�R�tenvR�tnameR�R�tdirstoutR:taction_commandsR�t	cd_actiontinputR�totitoutputs_variable((s'./tools/gyp/pylib/gyp/generator/make.pyR�3sf


	



(	
	

(($

 c
Csy|j�}xL|D]D}td|j|df�}d}	|jd|�g}
x�|jdg�D]�}t�}tjj|�\}
}tjj	|�\}}g|dD]}|j
|||
�^q�}x6|D].}tjj|�}|r�|j|�q�q�Wt
|jdt��r/||7}nt
|jdt��rT||7}nttt|j|g|jd	g���}d
||	fg}|dkr�|dg7}ng|D]}tjj||�^q�}g|D]}tjj||�^q�}t|j|�}|
|7}
|jd
|d�|jd|d�|j||dg|�x*|D]"}d|kshtd|��qhW|jddj|��g|dD]}|j
|||
�^q�}d}t|�dkrddj|�}ndt|jpd�}|jdkrUg|D]}tjj||�^q1}ntjj|�}|jd|j�}|jd|j�}|jd|j�}|jdi|d6|d6|	d6|d6|d6�|jdi|	d6|d6�|j�|	d 7}	qfWd!|}|j|
|�|jd"|�|jd#|�|j�qW|jd$�|jd�d%S(&s�Write Makefile code for any 'rules' from the gyp input.

    extra_sources: a list that will be filled in with newly generated source
                   files, if any
    extra_outputs: a list that will be filled in with any outputs of these
                   rules (used to make other pieces dependent on these rules)
    part_of_all: flag indicating this target is part of 'all'
    s%s_%st	rule_nameis### Generated for rule %s:trule_sourcesR�R�R�R�s$(call do_cmd,%s_%d)tresources_grits@touch --no-create $@s%s: obj := $(abs_obj)s%s: builddir := $(abs_builddir)tFORCE_DO_CMDRes/Spaces in rule filenames not yet supported (%s)sall_deps += %sR�Rs
mkdir -p %s; scd %s; R�Rs	$(TARGET)s�cmd_%(name)s_%(count)d = LD_LIBRARY_PATH=$(builddir)/lib.host:$(builddir)/lib.target:$$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; %(cd_action)s%(mkdirs)s%(action)sR�tcounttmkdirsR�s9quiet_cmd_%(name)s_%(count)d = RULE %(name)s_%(count)d $@isrule_%s_outputss$(%s)s$### Finished generating for rule: %ss%### Finished generating for all rulesN( R�RaR�R�R0R�R5R6R�RQtExpandInputRootR7R�R�RMR�RdR{RR�R�t
WriteMakeRuleR�R�R�R*RR�RTR�t	WriteListR�(RlRwR�R�R�R�R�truleR�R�tall_outputstrule_sourceR�trule_source_dirnametrule_source_basenametrule_source_roottrule_source_extR�R�R:R�RvR�R�R�tacR�R�R�R�R�((s'./tools/gyp/pylib/gyp/generator/make.pyR��s�

	)


((

)(


cCsF|jd�t|jd�}g}x�|D]�}x�|dD]�}t|j|��}tjj|�d}t|jtjj|d|���}	|j	�}
t
jj|	|
�}	t
jj||
�}|j
|	g|gd|�|j|	�q>Wq-W|jd|djtt|��f�|jd	|�|j�d
S(sWrite Makefile code for any 'copies' from the gyp input.

    extra_outputs: a list that will be filled in with any outputs of this action
                   (used to make other pieces dependent on this action)
    part_of_all: flag indicating this target is part of 'all'
    s### Generated for copy rule.t_copiestfilesitdestinationtcopys%s = %sRes$(%s)N(R�RaR�RdR{R5R6R�R�R�RR�R�R�R�R�Rg(RlRxR�R�tvariableR�R�R6RLR�R�((s'./tools/gyp/pylib/gyp/generator/make.pyR�s"

)cCs�|jd�xntjjtd|jttt|j|���D]8\}}|j	|g|gddt
�|j|�qBWdS(s0Writes Makefile code for 'mac_bundle_resources'.s&### Generated for mac_bundle_resourcesR
smac_tool,,,copy-bundle-resourceR�N(R�RR�tGetMacBundleResourcesR!R�R�RdR{R�R2R�(Rlt	resourcestbundle_depsR�RN((s'./tools/gyp/pylib/gyp/generator/make.pyR�6s

(cs�tjjtd�j�fd��\}}}}|s>dS|r�dtjj|�}�j||dddt	��j
|g|gdd	g�|}n�j|�jd
|���j
|g|gddt�|j|�dS(
s0Write Makefile code for bundle Info.plist files.R
cst�j|��S(N(RdR{(R|(Rl(s'./tools/gyp/pylib/gyp/generator/make.pyR}FsNs$(obj).$(TOOLSET)/$(TARGET)/s: INFOPLIST_DEFINESs-Dtquoters$(call do_cmd,infoplist)s@plutil -convert xml1 $@ $@tadditional_settingssmac_tool,,,copy-info-plistR�(RR�tGetMacInfoPlistR!R�R5R6R�R�RZR�R�R�R�R2R�(RlR�t
info_plistR�tdefinest	extra_envtintermediate_plist((Rls'./tools/gyp/pylib/gyp/generator/make.pyR�Bs&	

	cCs(x�t|j��D]�}||}	|j|	jd�d|dddt�|jdkr�|jj|�}
|jj|�}|jj	|�}|jj
|�}
|jj|�}n-|	jd�}
|	jd�}|	jd	�}|jd
�|j|
d|�|jd�|j|d
|�|jd�|j|d|�|jdkr�|jd�|j|
d|�|jd�|j|d|�n|	jd�}|r�t
tt
|j|��}n|j|d|dd�qWtt|�}t
|jt
|jt
t|���}|j|d�x*|D]"}d|ks:td|��q:W|jd�|jd�|j�|r�|jdg|dddt�n|r�|jdg|dd dt�n|j||�}|r:|jd!�x.|D]&\}}}|jd"||f�qW|jd#�n|r�|jd�|jd$�|jd%�|jd&|jd'�d(�|jd)|jd*�d+�|jdkr�|jd,|jd-�d.�|jd/|jd0�d1�q�n|j|j��|tt|�7}|j�d2S(3sWrite Makefile code for any 'sources' from the gyp input.
    These are source files necessary to build the current target.

    configs, deps, sources: input from gyp.
    extra_outputs: a list of extra outputs this action should be dependent on;
                   used to serialize action/rules before compilation
    extra_link_deps: a list that will be filled in with any outputs of
                     compilation (to be used in link lines)
    part_of_all: flag indicating this target is part of 'all'
    R�sDEFS_%stprefixs-DR�Rtcflagstcflags_ct	cflags_ccs## Flags passed to all source files.s	CFLAGS_%ss# Flags passed to only C files.sCFLAGS_C_%ss!# Flags passed to only C++ files.sCFLAGS_CC_%ss"# Flags passed to only ObjC files.sCFLAGS_OBJC_%ss$# Flags passed to only ObjC++ files.sCFLAGS_OBJCC_%stinclude_dirssINCS_%ss-ItOBJSRes-Spaces in object filenames not supported (%s)s?# Add to the list of files we specially track dependencies for.sall_deps += $(OBJS)s$(OBJS)tcomments6Make sure our dependencies are built before any of us.t
order_onlys1Make sure our actions/rules run before any of us.s:# Dependencies from obj files to their precompiled headerss%s: %ss%# End precompiled header dependenciessn# CFLAGS et al overrides must be target-local.
# See "Target-specific Variable Values" in the GNU Make manual.s$(OBJS): TOOLSET := $(TOOLSET)sD$(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) %s tcs/$(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE))sF$(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) %s RGs0$(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE))sG$(OBJS): GYP_OBJCFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) %s tmsK$(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE)) $(CFLAGS_OBJC_$(BUILDTYPE))sI$(OBJS): GYP_OBJCXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) %s tmmsM$(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE)) $(CFLAGS_OBJCC_$(BUILDTYPE))N(R>R?R�R0RZR*R�t	GetCflagst
GetCflagsCtGetCflagsCCt
GetCflagsObjCtGetCflagsObjCCR�R�RdR{R�ROt	ObjectifyRRR�R�R2tGetObjDependenciesR�t
GetIncludetWritePchTargetstGetPchBuildCommandsRP(RlR�R�RzR�R�R�tprecompiled_headert
confignametconfigR�R�R�tcflags_objctcflags_objcctincludest
compilabletobjstobjtpchdepstsourcetgch((s'./tools/gyp/pylib/gyp/generator/make.pyR�]s�
"




'








	
	
	
	
cCs|s
dSx�|D]�\}}}}idd6dd6dd6dd	6|}id
d6dd6dd6d
d	6|}|jd|||fd|�|jd||f�|jd|�|jd�d|ks�td|��|jd|�|jd�qWdS(s,Writes make rules to compile prefix headers.Ns$(CFLAGS_C_$(BUILDTYPE))Rs$(CFLAGS_CC_$(BUILDTYPE))RGs4$(CFLAGS_C_$(BUILDTYPE)) $(CFLAGS_OBJC_$(BUILDTYPE))Rs6$(CFLAGS_CC_$(BUILDTYPE)) $(CFLAGS_OBJCC_$(BUILDTYPE))RtGYP_PCH_CFLAGStGYP_PCH_CXXFLAGStGYP_PCH_OBJCFLAGStGYP_PCH_OBJCXXFLAGSs
%s: %s := %s sA$(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) s%s: %s FORCE_DO_CMDs	@$(call do_cmd,pch_%s,1)RRes*Spaces in gch filenames not supported (%s)sall_deps += %s(R�R�(Rltpch_commandsRt	lang_flagtlangR�textra_flagstvar_name((s'./tools/gyp/pylib/gyp/generator/make.pyR�s2

cCs^|jst�|jdkr;|jdkr;|jj�S|d}d}d}|jdkr�|d d	kr}|d}nd	}d
}n�|jdkr�|d d	kr�|d}nd	}d}nE|jdkr�d
|}n)|jdkrdd|jd|fGHn|jd|�}|jd|�}|jd�}|rRd|}n|||S(s�Return the 'output basename' of a gyp spec.

    E.g., the loadable module 'foobar' in directory 'baz' will produce
      'libfoobar.so'
    RR~RsRuRtRoRiRs.as.sotnones%s.stamps,ERROR: What output file should be generated?RpR�tproduct_prefixtproduct_nametproduct_extensionR�(sstatic_librarys
executablesshared_librarysloadable_module(sloadable_modulesshared_library(R�R�R*RpR�tGetExecutablePathR0(RlR�R�t
target_prefixt
target_exttproduct_ext((s'./tools/gyp/pylib/gyp/generator/make.pytComputeOutputBasename�s8	


	
	

cCs+|jdko*|jdko*|jdkS(NR�RR~RsRuRt(sstatic_librarys
executablesshared_librarysloadable_module(RqR*Rp(Rl((s'./tools/gyp/pylib/gyp/generator/make.pyt_InstallImmediately"s$cCs�|jst�tjjd|j|j�}|jdksJ|j�rSd}n|jd|�}tjj||j	|��S(s�Return the 'output' (full output path) of a gyp spec.

    E.g., the loadable module 'foobar' in directory 'baz' will produce
      '$(obj)/baz/libfoobar.so'
    s$(obj).Rss$(builddir)tproduct_dir(
R�R�R5R6R�RqRpR.R0R-(RlR�R6((s'./tools/gyp/pylib/gyp/generator/make.pyR�'s	cCs5|jst�td}tjj||jj��S(sDReturn the 'output' (full output path) to a bundle output directory.R
(R�R�R!R5R6R�R�tGetWrapperName(RlR�R6((s'./tools/gyp/pylib/gyp/generator/make.pyR�6s
cCs&td}tjj||jj��S(sAReturn the 'output' (full output path) to the binary in a bundle.R
(R!R5R6R�R�R)(RlR�R6((s'./tools/gyp/pylib/gyp/generator/make.pyR�=s
cCs�g}g}d|kr�|jg|dD]}t|r)t|^q)�x2|dD]&}|tkrU|jt|�qUqUW|j|�ntjj|�tjj|�fS(s�Compute the dependencies of a gyp spec.

    Returns a tuple (deps, link_deps), where each is a list of
    filenames that will need to be put in front of make for either
    building (deps) or linking (link_deps).
    tdependencies(textendR�R�R�RRtuniquer(RlR�R�R�tdep((s'./tools/gyp/pylib/gyp/generator/make.pyR�CscCs&|j|jg|dddt�dS(NRs Build our special outputs first.R(R�R�R2(RlR�R�((s'./tools/gyp/pylib/gyp/generator/make.pytWriteDependencyOnExtraOutputsYscs�	�jd�|rE�j�j|��j||dddt�ni}�jdkr�x|t|j��D]h}	||	}
�jdkr<�j	j
|	td�fd��}tj
j�j�}�j	j|	ttjjtjj|�j���ttjjtjj|�j����}
|
r�|
||	<q�nS|
jd	g�}td
�|D��r�|jd�j�|jd�j�n�j|d
|	��jdkrm�j�j	j|	�d|	�qmqmW|jd�}|r'tj
j|�}�jdkr'�j	j|�}q'n�j|d��jdt�j���jdt�j���jdkr��jdt�j��q�ng}�jdkr�|r�|jd�n|jtjj |��n|r��j!�j�j"��xA|D]9}	�jdt�j�|	tj
j#||	�f�qW|j$dtj
j#d�jg��xDt%t&|��D]0}||j'd�s|t(||�||<q|q|W�jdt�j���jdt�j�dj|�f�n�j)r��j�j|��jt*t|�d��jdt�j���jdHkrq�jd �j	j+��n|r��jd!�ng}�jd"��jd#t�j��n|r��j)s�t,d$�j-��d%|ks�t,d&��n�jd'kr��jd(t�j�djt*t|��f��jd)kry�jd*kry�j.�jg|d+|d,|�q��j.�jg|d-|d,|�n��jd.kr=x*|D]"}d|ks�t,d/|��q�W�jdIkr�j/r�j.�jg|d2|d,|�q��j.�jg|d3|d,|�nN�jdkr��jd(t�j�djt*t|��f��j.�jg|d4|d,|�n��jdkrGx*|D]"}d|ks�t,d5|��q�W�jd)kr"�jd*kr"�j.�jg|d6|d,|�q��j.�jg|d7|d,|�nD�jdkr{�j.�jg|d8|d,|�nd9G�jGt-GH�jr�j�j-kr�j�j0kr�j�j-g�jgdd:d;t�|r�jd<g�j-gdd=d;t�qn�j�j0ks,�j/r�	�jdkrDd>}n�jd.kr\d?}nd'}�j1�}�jg}�jdkr�d%|kr��jd@kr�|�jks�t,dA|�jf��n�j�j-g|gdd:d;t�|�jkrO	�j)s	t,��j.|g�jgdBddC|dD|�|j|�n�j�j2kr�	�j2�j-kr�	�j�j2g|ddE|d;t�n|r�	�jd<g|gddF|d;t�q�	ndGS(Js&Write Makefile code to produce the final target of the gyp spec.

    spec, configs: input from gyp.
    deps, link_deps: dependency lists; see ComputeDeps()
    extra_outputs: any extra outputs that our target should depend on
    part_of_all: flag indicating this target is part of 'all'
    s### Rules for final target.Rs4Preserve order dependency of special output on deps.RR%RR
cst�j|��S(N(RdR{(R|(Rl(s'./tools/gyp/pylib/gyp/generator/make.pyR}ystldflagscss|]}|jd�VqdS(s.soN(RI(RJR4((s'./tools/gyp/pylib/gyp/generator/make.pys	<genexpr>�ss-Wl,-rpath=\$$ORIGIN/lib.%s/s$-Wl,-rpath-link=\$(builddir)/lib.%s/s
LDFLAGS_%ssLIBTOOLFLAGS_%st	librariestLIBSs*%s: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))s%s: LIBS := $(LIBS)s4%s: GYP_LIBTOOLFLAGS := $(LIBTOOLFLAGS_$(BUILDTYPE))s!$(TARGET_POSTBUILDS_$(BUILDTYPE))s%s: TARGET_POSTBUILDS_%s := %sitcdRWs%s: builddir := $(abs_builddir)s%s: POSTBUILDS := %sRetBUNDLE_DEPSs%s: $(BUNDLE_DEPS)RuRts+	@$(call do_cmd,mac_package_framework,,,%s)s	@$(call do_postbuilds)s	@true  # No-op, used by testss
	@touch -c %ssQPostbuilds for bundles should be done on the bundle, not the binary (target '%s')R/s.Postbuilds do not work with custom product_dirRss%s: LD_INPUTS := %sthostRt	link_hostt
postbuildstlinkR~s2Spaces in alink input filenames not supported (%s)topenbsdtwint
alink_thintalinktsolinks3Spaces in module input filenames not supported (%s)tsolink_module_hostt
solink_modulettouchsWARNING: no output forsAdd target aliastphonytalls!Add target alias to "all" target.sshared librarysstatic libraryR�s%s != %sR�s Copy this to the %s output path.R�s!Short alias for building this %s.sAdd %s to "all" target.N(sshared_librarysloadable_module(smacsopenbsdswin(3R�R5R�R�R2RpR>R?R*R�t
GetLdflagsR!RRtInvertRelativePathR6tGetTargetPostbuildsRgR5tnormpathR�R�R0tanyR�RqR�tGetLibtoolflagsR3tAdjustLibrariesR2R�tGetSpecPostbuildCommandsR�tGetSortedXcodePostbuildEnvR�tinserttxrangeR�t
startswithRVR�R�tGetFrameworkVersionR�R�R�R�R�R�R�(RlR�R�R�R�R�R�R�ttarget_postbuildsRRR6tgyp_to_buildttarget_postbuildR7R=R�tlink_dept	file_descR�tinstallable_deps((Rls'./tools/gyp/pylib/gyp/generator/make.pyR�_s8



				
	%	#		

	



	





			
$
RcCscd}|rEg|D]}|||�^q}ddj|�}n|jjd||f�dS(s�Write a variable definition that is a list of values.

    E.g. WriteList(['a','b'], 'foo', prefix='blah') writes out
         foo = blaha blahb
    but in a pretty-printed style.
    Rs \
	s	%s :=%s

N(R�R�RB(Rlt
value_listR�R�R�tvaluestl((s'./tools/gyp/pylib/gyp/generator/make.pyR�Is
#c		Cs�d}|r'd|kst�d}n|j||dd||fgd|dt�g|D]}t|t�^q]}|jdd	j|��d
S(s�Write a Makefile rule that uses do_cmd.

    This makes the outputs dependent on the command line that was run,
    as well as support the V= make command line flag.
    Rt,s,,1Rvs$(call do_cmd,%s%s)Rtforcesall_deps += %sReN(R�R�R2RgtSPACE_REPLACEMENTR�R�(	RlR�R�R�R�RR=tsuffixR�((s'./tools/gyp/pylib/gyp/generator/make.pyR�Xs	"cCs}tt|�}tt|�}|r8|jd|�n|r[|jddj|��n|ryd}dj|�}	nd}|d}	|r�d}
nd}
|r�|jd|d�n|jd	|	|dj|�|
f�|r
x"|D]}|jd
|�q�Wn|rot|�dkro|jddj|d�|df�|jd
dj|d��n|j�dS(s�Write a Makefile rule, with some extra tricks.

    outputs: a list of outputs for the rule (note: this is not directly
             supported by make; see comments below)
    inputs: a list of inputs for the rule
    actions: a list of shell commands to run for the rule
    comment: a comment to put in the Makefile above the rule (also useful
             for making this Python script's code self-documenting)
    order_only: if true, makes the dependency order-only
    force: if true, include FORCE_DO_CMD as an order-only dep
    phony: if true, the rule does not actually generate the named output, the
           output is just a name to run the rule
    s# s.PHONY: Res| Ris
 FORCE_DO_CMDs%s: TOOLSET := $(TOOLSET)s
%s: %s%s%ss	%sis%s: %ss%s: ;N(R�RgR�R�R�(RlR�R�RvRRR`RGtorder_inserttpick_outputtforce_appendR�((s'./tools/gyp/pylib/gyp/generator/make.pyR�os2
	
(!cCs|jdkrdS|jd�|jd�|jd|�|jd�|jd	�|jd
�|jd�idd
6dd6dd6}d}x`|D]X}tjj|�d}||kr�||cd7<||||kr�|}q�q�q�W|jd|�|jt|jtt	|��d�d�}idd6}	i}
t
|
|	�|j||td|
d�d�|j||tdtd�d�|jdkr�|jd�n>|jdkr�|jd�n|jdkr�|jd�n|j�dS( s�Write a set of LOCAL_XXX definitions for Android NDK.

    These variable definitions will be used by Android NDK but do nothing for
    non-Android applications.

    Arguments:
      module_name: Android NDK module name, which must be unique among all
          module names.
      all_sources: A list of source files (will be filtered by Compilable).
      link_deps: A list of link dependencies, which must be sorted in
          the order from dependencies to dependents.
    RsRuR~Ns/# Variable definitions for Android applicationssinclude $(CLEAR_VARS)sLOCAL_MODULE := siLOCAL_CFLAGS := $(CFLAGS_$(BUILDTYPE)) $(DEFS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE)) $(INCS_$(BUILDTYPE))s+LOCAL_CPPFLAGS := $(CFLAGS_CC_$(BUILDTYPE))sLOCAL_C_INCLUDES :=s/LOCAL_LDLIBS := $(LDFLAGS_$(BUILDTYPE)) $(LIBS)is.ccs.cpps.cxxisLOCAL_CPP_EXTENSION := tLOCAL_SRC_FILEScSsog}xb|D]Z}tjj|�}|j|�r
|j|�r
|j|t|�t|�!�q
q
W|S(N(R5R6R�RTRIR�R�(R�R�RbtmodulestfilepathRL((s'./tools/gyp/pylib/gyp/generator/make.pyt
DepsToModules�s
(RR*RRtLOCAL_SHARED_LIBRARIESRRtLOCAL_STATIC_LIBRARIESsinclude $(BUILD_EXECUTABLE)sinclude $(BUILD_SHARED_LIBRARY)sinclude $(BUILD_STATIC_LIBRARY)(s
executablesshared_librarysstatic_library(RpR�R5R6RQR�R�R{R�ROR-R!(Rltmodule_nameR�R�tcpp_exttdefault_cpp_extRLRERiR)R(((s'./tools/gyp/pylib/gyp/generator/make.pyR��sR







		



cCs|jj|d�dS(Ns
(R�RB(Rlttext((s'./tools/gyp/pylib/gyp/generator/make.pyR�scCs1tjj|jdtjjd|j�d|�S(Ns$(abs_builddir)s
$(abs_srcdir)s$(BUILDTYPE)(RR�R�R�R5R6R�(RlR�((s'./tools/gyp/pylib/gyp/generator/make.pyR�s		cCs,|jjdd�}|jdi|d6�S(NtCHROMIUM_STRIP_SAVE_FILERR�(R�tGetPerTargetSettingR�(Rltstrip_save_file((s'./tools/gyp/pylib/gyp/generator/make.pyRQs		cCs;x4|D],\}}|jdt|�||f�qWdS(Ns%s: export %s := %s(R�Rg(RlR�R�tktv((s'./tools/gyp/pylib/gyp/generator/make.pyR�scCsNd|kr(|jdd|j�}nd|krJd|j|f}n|S(s,Convert a path to its output directory form.s$(s$(obj)/s$(obj).%s/$(TARGET)/s$(obj)s$(obj).%s/$(TARGET)/%s(RTRq(RlR6((s'./tools/gyp/pylib/gyp/generator/make.pyR"s
cCsR|j|�}d|kr>|jdd|j|f�}|Sd|j||fS(s:Convert a prefix header path to its output directory form.s$(s$(obj)/s$(obj).%s/$(TARGET)/pch-%ss$(obj).%s/$(TARGET)/pch-%s/%s(R{RTRq(RlR6R"((s'./tools/gyp/pylib/gyp/generator/make.pyR�+scCs;d|kr|jd�Stjjtjj|j|��S(slConvert a subdirectory-relative path into a base-relative path.
    Skips over paths that contain variables.s$(t/(trstripR5R6RLR�(RlR6((s'./tools/gyp/pylib/gyp/generator/make.pyR{5s
cCs8d|krd|kr|S|i|d6|d6}|S(Ns%(INPUT_ROOT)ss%(INPUT_DIRNAME)st
INPUT_ROOTt
INPUT_DIRNAME((Rlttemplatet	expansionR7R6((s'./tools/gyp/pylib/gyp/generator/make.pyR�@scCsL|jdkrA|jdks-|jdkrAd|j|jfSd|jS(sCReturns the location of the final output for an installable target.RuRR�s$(builddir)/lib.%s/%ss$(builddir)/(RpR*RqR�(Rl((s'./tools/gyp/pylib/gyp/generator/make.pyR�JsN(%t__name__t
__module__t__doc__RmR�R�R�R�R�R�R�R�RR-R.R�R�R�R�R5R�R1R]R�RMR�R�R�R�R�RQR�RR�R{R�R�(((s'./tools/gyp/pylib/gyp/generator/make.pyRhvsF		�		d	y	&			|	!	(							�>	S					
		
cCs�|d}g|dD]}tjj||j�^q}tjj|d|j�}|jtj�stjj	d|�}n|j
di|d6dj	tt|��d6tjj
|d	gtj|�|�d
6�dS(s,Write the target to regenerate the Makefile.toptionstbuild_files_argt
gyp_binaryR�s�quiet_cmd_regen_makefile = ACTION Regenerating $@
cmd_regen_makefile = %(cmd)s
%(makefile_name)s: %(deps)s
	$(call do_cmd,regen_makefile)

t
makefile_nameReR�s-fmaketcmdN(RRtRelativePathttoplevel_dirtFixIfRelativePathRTR5tsepR6R�RBR�RdR�tRegenerateFlags(R)t
root_makefileR�tbuild_filesR~RLtbuild_files_argsR�((s'./tools/gyp/pylib/gyp/generator/make.pytWriteAutoRegenerationRuleVs
,	cCs�|d}xr|D]j}dg}|jrN|jdkrN|d|jf7}n|jd|�d||fGHtj|�qWdS(NR~tmakeR�s-Cs
BUILDTYPE=sBuilding [%s]: %s(R�R�t
subprocesst
check_call(tdatatconfigurationsR)R~Rt	arguments((s'./tools/gyp/pylib/gyp/generator/make.pytPerformBuildms

	c0
s�|d�tjj|�}|jdi�}|jdd�}|jdd�}|jdd�}�fd�}	d}
tg|D]}||d	^q��}x6|D].}||}
|
d
dkr�|
d
}
Pq�q�W|
s�d}
nd}d
�j}tjj	�j
|�}�jrUtjj	�j|�}tjj|�j�}da
nd}i|d6|d6|
d
6|d6dd6td6dd6|d6}|dkr�d}|ji|d6dd6td6td6�nw|dkr�|jitd6�nT|dkr+|jidd6dd6td6�n#|dkrN|jidd6�n|jitdYd!�d"6tdZd%�d&6td[d)�d*6td\d-�d.6td]d0�d16td^d3�d46td_d6�d76td`d6�d96�tjj|d:�\}}}||jd;g�}i}d<||d=<x?|D]7\}}|jd>�r+d?|||td>� <q+q+Wd}x�|D]�\}}tjd@|�r�qsn|d:dAkr�d?|}n|j|�}|r�dB||f}||=n|dakr=|dC|7}|tjkrtj|}n|dD||f7}|dE7}qs|dF||f7}qsW||d;<t|�t|dG�}|jt|�|r�|jdH�nx)|D]!}|jdI|�t|�q�Wtjj |�}tjj!||�t�}xB|dJD]6}x-tjj"|||�D]}|j#|�q#WqWt�}t�} x�|D]�}!tjj|!�\}}}||jd;g�}"||"ks�t$dK��|j#tjj|�j
��||dL}#x�|#D]y}$tjjtjj%|$|��j
�}%tjj&|%�}&|dMrF|&j'|dM�rF|j#|&�q�|j#|%�q�W|	||d|�jdN�\}'}(||!}
|
dO})|dkr�tj(j)|||
�nt*||�}*|*j+|!|'|(|
|)dP|!|k�tjj|(tjj |��}+| j#|+�qWWtjj�j,tj-��},x�|D]�}tjj	|,|�}g|D]/}|j'|�rf||krf||dQ^qf}-|-s�qDn|	|tjj.tjj/|��d:dR�\}'}(tjjtjj |�tjj |(��}.|*j0|(|.|-|�qDW|jdS�xKt1| �D]=}/|jdT|/dU�|jdV|/dS�|jdE�q=W|jdS�|jdW�r�|jdXt2�r�t3||||�n|jt4�|j5�dS(bNR~R.t
output_dirR�R/tdefault_targetRHcs�tjjtjj|��j�}tjj�j||�}�jrctjj�j|�}ntjjtjj|��j	�}||fS(s9Determine where to write a Makefile for a given gyp file.(
RRR�R5R6R7tdepthR�tgenerator_outputR�(t
build_filet	base_nameR�toutput_file(R~(s'./tools/gyp/pylib/gyp/generator/make.pytCalculateMakefilePath�s	Rqtdefault_configurationtDefaultR�tMakefiles
$(srcdir)/tflocktbuilddiritflock_indext
link_commandsRtextra_commandstsrcdirRs./gyp-mac-tool flockiRtsolariss./gyp-sun-tool flocktfreebsdtlockft	CC_targettCCs$(CC)s	CC.targett	AR_targettARs$(AR)s	AR.targett
CXX_targettCXXs$(CXX)s
CXX.targett	LD_targettLDs$(LINK)sLINK.targettCC_hosttgccsCC.hosttAR_hosttarsAR.hosttCXX_hostsg++sCXX.hosttLD_hosts	LINK.hostitmake_global_settingss%s $(builddir)/linker.locktLINKt_wrappers
$(abspath %s)s
.*_wrapperRWs%s %ss3ifneq (,$(filter $(origin %s), undefined default))
s
  %s = %s
sendif
s	%s ?= %s
RnsU# Define LOCAL_PATH for build of Android applications.
LOCAL_PATH := $(call my-dir)

sTOOLSET := %s
R�s:make_global_settings needs to be the same for all targets.tincluded_filesthome_dot_gyps.mkR�R�Ros	.Makefiles
smifeq ($(strip $(foreach prefix,$(NO_LOAD),\
    $(findstring $(join ^,$(prefix)),\
                 $(join ^,s)))),)
s
  include t
standalonetauto_regeneration(R�sCC(R�sAR(R�sCXX(R�R�(R�(R�(R�(R�(sCCsCC.hostsCXXsCXX.host(6RRRR0R1R�RbR5R6R�R�R�R�RctLINK_COMMANDS_LINUXR'tLINK_COMMANDS_MACtSHARED_HEADER_MAC_COMMANDStLINK_COMMANDS_ANDROIDtSHARED_HEADER_SUN_COMMANDSRtParseQualifiedTargetRIR�R_tmatchtenvironR;RRBt
SHARED_HEADERRFR7tCopyToolt
AllTargetsR�R�tUnrelativePathtabspathRTR�tMergeGlobalXcodeSettingsToSpecRhR�R�tgetcwdRQR�R�R>R2R�t
SHARED_FOOTERR�(0ttarget_listttarget_dictsR�R)R*R.t
builddir_nameR/R�R�R�R�ttoolsetsR�R�R�R�t
flock_commandt
header_paramsR�R^tmake_global_settings_arraytwrappersR=tvalueR�twrapperR�Rqt	dest_pathtneeded_targetsR�tinclude_listR�tthis_make_global_settingsR�t
included_filetrelative_include_filetabs_include_fileR�R�R�RCtmkfile_rel_pathtdepth_rel_pathtgyp_targetstmakefile_rel_pathtinclude_file((R~s'./tools/gyp/pylib/gyp/generator/make.pytGenerateOutputxs<
'


	
		
					 






			
		
	
"




 /


(1R5R_tsysR�Rt
gyp.commontgyp.xcode_emulationRR!R2t$generator_supports_multiple_toolsetsRMR3RRRR-R4R;RaR�R�R�R�R�R�RFR�R�R�R�R&RORPRRRVRXRZR]RaRcRdRgR�R�RhR�R�R�(((s'./tools/gyp/pylib/gyp/generator/make.pyt<module>s�
	"		%�'"	
											�����		

Zerion Mini Shell 1.0