Your IP : 216.73.216.213


Current Path : /opt/alt/alt-nodejs9/root/lib/python2.7/site-packages/gyp/
Upload File :
Current File : //opt/alt/alt-nodejs9/root/lib/python2.7/site-packages/gyp/msvs_emulation.pyc

�
 ]vQc@sdZddlZddlZddlZddlZddlZejd�Zd�Z	d�Z
d�Zd�Zd�Z
d	�Zd
�Zdefd��YZd
�Zdefd��YZead�Zd�Zd�Zd�Zd�Zd�Zd�Zd�ZdS(sg
This module helps emulate Visual Studio 2008 behavior on top of other
build systems, primarily ninja.
i����Ns(\\*)"cCs3tjd�|�}|jdd�}d|dS(s�Quote a command line argument so that it appears as one argument when
  processed via cmd.exe and parsed by CommandLineToArgvW (as is typical for
  Windows programs).cSsd|jd�dS(Niis\"(tgroup(tmo((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pyt<lambda> tt%s%%t"(twindows_quoter_regextsubtreplace(targ((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pytQuoteForRspFiles
cCs�|s
dS|djd�rV|djdd�\}}|dtjj|�}ntjj|d�}|ddjd�|dD��S(s6Process a list of arguments using QuoteCmdExeArgument.Riscall t icss|]}t|�VqdS(N(R
(t.0R	((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pys	<genexpr>>s(t
startswithtsplittostpathtnormpathtjoin(targstcalltprogram((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pytEncodeRspFileList1scCs5|s
|S|s|St|j|d�||d�S(s�Given a list of dictionary keys |path| and a tree of dicts |root|, find
  value at path, or return |default| if any of the path doesn't exist.ii(t_GenericRetrievetget(troottdefaultR((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pyRAs
cCsU|dkr|St|t�s.t|t�rIg|D]}||^q5S||SdS(sDAdd |prefix| to |element| or each subelement if element is iterable.N(tNonet
isinstancetlistttuple(telementtprefixte((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pyt
_AddPrefixKs
cCs�|dk	r�|dk	r�t|�s0|j}nt|t�sNt|t�rytdg|D]}||�^q[�}q�||�}n|S(s�If |element| then remap it through |map|. If |element| is iterable then
  each item will be remapped. Any elements not found will be removed.N(RtcallableRRRRtfilter(Rtmaptelem((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pyt_DoRemappingVs+cCs^|dk	rV|dk	rVt|t�s6t|t�rF|j|�qZ|j|�n|SdS(s�If |append| is None, simply return |element|. If |append| is not None,
  then add |element| to it, adding each item in |element| if it's a list or
  tuple.N(RRRRtextendtappend(R)R((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pyt_AppendOrReturncs
cCs�ttd�rtjStjjd�}|s�ddddg}tj|dtjdtj�}xG|j	�d	j
�D],}d
|krx|jd�dd
}qxqxWn|t_|S(s�Try to find an installation location for the DirectX SDK. Check for the
  standard environment variable, and if that doesn't exist, try to find
  via the registry. May return None if not found in either location.t	dxsdk_dirt	DXSDK_DIRsreg.exetquerysHKLM\Software\Microsoft\DirectXs/ststdouttstderritInstallPaths    is\(thasattrt_FindDirectXInstallationR+RtenvironRt
subprocesstPopentPIPEtcommunicatet
splitlinesR(R+tcmdtptline((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pyR2ps!!	tMsvsSettingscBsqeZdZd�Zd%d%d�Zd%d%d�Zd�Zd�Zde	fd��YZ
d�Zd	�Zd%d
d%d%d�Z
d%d
d%d%d�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z!d �Z"d!�Z#d"�Z$d#�Z%d$�Z&RS(&s�A class that understands the gyp 'msvs_...' values (especially the
  msvs_settings field). They largely correpond to the VS2008 IDE DOM. This
  class helps map those settings to command line options.c		Cs||_t|�|_t�|_tjjd�|_dt	fdt	fdt
fdt
fdtfdtfdtfd	tfg}|d
}xc|D][\}}t||i�x<|j
�D].\}}|j||��t||�|<q�Wq�W|jddg�|_dS(
NtWDK_DIRtmsvs_configuration_attributest
msvs_settingstmsvs_system_include_dirstmsvs_disabled_warningstmsvs_precompiled_headertmsvs_precompiled_sourcetmsvs_configuration_platformtmsvs_target_platformtconfigurationstmsvs_cygwin_dirst.(tspectGetVSVersiont
vs_versionR2R+RR3Rtwdk_dirtdictRtstrtsetattrt	iteritemstgetattrRG(	tselfRItgenerator_flagstsupported_fieldstconfigstfieldRt
confignametconfig((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pyt__init__�s$								
*cCs�|j|�dkrdnd}i|r4|dndd6dd6d	d
6dd6|jd
d6|d6dd6}|jj�r�|jj�|d<tjj|jj�d�d|d<n|jr�|jnd|d<|jr�|jnd|d<|S(sUGet a dict of variables mapping internal VS macro names to their gyp
    equivalents.tx86tWin32tx64s\Rs
$(OutDir)\s$!INTERMEDIATE_DIRs	$(IntDir)s	${source}s$(InputPath)s${root}s$(InputName)ttarget_names$(ProjectName)s$(PlatformName)s$(ProjectDir)\s$(VSInstallDir)tVCs$(VCInstallDir)s$(DXSDK_DIR)s
$(WDK_DIR)(	tGetArchRIRKtPathRRRR+RL(RRt
base_to_buildRXttarget_platformtreplacements((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pyt
GetVSMacroEnv�s !
cCs"|j|d|�}t||�S(s4Convert from VS macro names to something equivalent.RX(RdtExpandMacros(RRtsRaRXtenv((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pytConvertVSMacros�scCs0g|D]%}|jd�r&|dn|^qS(s2Strip -l from library if it's specified with that.s-li(R
(RRt	librariestlib((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pytAdjustLibraries�scCs=t|||�}t||�}t||�}t||�S(sRetrieve a value from |field| at |path| or return |default|. If
    |append| is specified, and the item is found, it will be appended to that
    object instead of returned. If |map| is specified, results will be
    remapped through |map| before being returned or appended.(RR'R"R*(RRRVRRR R)R%tresult((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pyt_GetAndMunge�st_GetWrappercBs&eZdd�Zdddd�ZRS(cCs+||_||_|g|_||_dS(N(tparentRVt	base_pathR)(RRRoRVRpR)((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pyRY�s		RcCs;|jj|j|j|gd|d|d|jd|�S(NRR R)R%(RoRmRVRpR)(RRtnameR%R R((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pyt__call__�sN(t__name__t
__module__RRYRr(((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pyRn�scCsW|jj|d�}|jj|d�}|s9|}nidd6dd6j|d�S(srGet architecture based on msvs_configuration_platform and
    msvs_target_platform. Returns either 'x86' or 'x64'.RRZR[R\(RDRRE(RRRXtconfiguration_platformtplatform((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pyR_�s
	cCsp|j|�}|dkr8|jd�r8|d7}n|dkrl|jd�rl|jdd�d}n|S(s*Returns the target-specific configuration.R\t_x64RZt_ii(R_tendswithtrsplit(RRRXtarch((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pyt
_TargetConfig�s
RcCs#|j|j||||||�S(s_GetAndMunge for msvs_settings.(RmR?(RRRRXRR R)R%((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pyt_Setting�scCs#|j|j||||||�S(s/_GetAndMunge for msvs_configuration_attributes.(RmR>(RRRRXRR R)R%((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pyt
_ConfigAttrib�s
cCse|j|�}||j|}|j|jd|dg��g|D]}|j|d|�^qFS(syUpdates include_dirs to expand VS specific paths, and adds the system
    include dirs used for platform SDK and similar.tVCCLCompilerTooltAdditionalIncludeDirectoriesRRX(RR�(R|R@R(R}Rh(RRtinclude_dirsRXtincludesR:((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pytAdjustIncludeDirss
cCs�|j|�}g}|jdg|�dkr@|jd
�n|jdg|�dkrk|jd�n|j|jd|d	g��|S(s`Returns the set of defines that are injected to the defines list based
    on other VS settings.tCharacterSett1t_UNICODEtUNICODEt2t_MBCSRtPreprocessorDefinitionsR(R�R�(RR�(R|R~R(R)R}(RRRXtdefines((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pytGetComputedDefines
scCsC|j|�}|jd|�}|r?||j|��}n|S(svGet the pdb file name that should be used for compiler invocations, or
    None if there's no explicit name specified.RtProgramDataBaseFileName(RR�(R|R}Rh(RRRXtexpand_specialtpdbname((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pytGetCompilerPdbNamescCst|j|�}|jd}|dkr.dnd}|j|df|�}|rp||j|d|��}n|S(scGets the explicitly overridden output name for a target or returns None
    if it's not overridden.ttypetstatic_librarytVCLibrarianTooltVCLinkerToolt
OutputFileRX(R|RIR}Rh(RRRXR�R�Rtoutput_file((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pyt
GetOutputName$s
	cCsI|j|�}|jd|�}|rE||j|d|��}n|S(s`Gets the explicitly overridden pdb name for a target or returns None
    if it's not overridden.R�tProgramDatabaseFileRX(R�R�(R|R}Rh(RRRXR�R�((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pyt
GetPDBName1s	cCs|j|�}g}|jg|j|D]}d|^q)�|j||j|dd|�}|ddidd6dd6d	d	6d
d6dd
�|ddd�|ddidd6dd6dd�|ddidd6dd6dd�|ddidd6dd	6dd
�|ddidd6�|ddd�|ddid d6�|d!did"d6d#d6d$d%6dd&�|d'did(d6d)d6�|d*did+d6d,d6�|d-did.d6�|d/did0d6d1d6�|d2didd6d3d	6dd6dd4�|d5did6d6d7d6d8d	6d9d6dd:�|d;did<d6d=d	6dd>�|d?did@d6�|dAdidd6dd6ddB�|dCdidDd6�|dEdd�|jg|jdJ|dGg�D]}dH|^q��tdI�|�}|S(KsCReturns the flags that need to be added to .c and .cc compilations.s/wdRR)tOptimizationR%tdt0R�R�txt3R s/OtInlineFunctionExpansions/ObtOmitFramePointerst-tfalseRttrues/OytEnableIntrinsicFunctionss/OitFavorSizeOrSpeedttRftWholeProgramOptimizations/GLtWarningLevels/WtWarnAsErrors/WXtDebugInformationFormatt7titIt4s/ZtRuntimeTypeInfos/GRs/GR-tEnableFunctionLevelLinkings/Gys/Gy-tMinimalRebuilds/GmtBufferSecurityChecks/GSs/GS-tBasicRuntimeCheckstus/RTCtRuntimeLibrarytTtTdtDtDds/MtExceptionHandlingtsctas/EHtDefaultCharIsUnsigneds/JtTreatWChar_tAsBuiltInTypes/Zc:wchar_tt
EnablePREfasts/analyzetAdditionalOptionstForcedIncludeFilesRs/FIcSs|jd�S(Ns/MP(R
(R�((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pyR]R(RR�(R|R(RARnR?R}R$(RRRXtcflagstwtcltf((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pyt	GetCflags;sB+	)$$$	"+	)$	'cCs|j|�}t|||�S(sTReturns an object that handles the generation of precompiled header
    build steps.(R|t
_PchHelper(RRRXtgyp_to_build_path((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pytGetPrecompiledHeader`scCs�|j|�}|j|r�tjj|j|�d}t||�r�tjj|j|�d}d|d|d|dgSngS(sLGet the flags to be added to the cflags for precompiled header support.
    is/Yus/FIs/Fp${pchprefix}.s.pch(R|RBRRtsplitextRCt_LanguageMatchesForPchR(RRRXt	extensiont
source_exttpch((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pyt_GetPchFlagsfs
 cCs|j|�}|j|d�S(s;Returns the flags that need to be added to .c compilations.s.c(R|R�(RRRX((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pyt
GetCflagsCtscCs&|j|�}dg|j|d�S(s<Returns the flags that need to be added to .cc compilations.s/TPs.cc(R|R�(RRRX((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pytGetCflagsCCyscCs�|j|�}|j|df|dg�}g|D]-}tjj||j|d|���^q4}g|D]}d|d^qnS(sPGet and normalize the list of paths in AdditionalLibraryDirectories
    setting.tAdditionalLibraryDirectoriesRRXs
/LIBPATH:"R(R|R}RRRRh(RRRRXR�tlibpathsR:((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pyt _GetAdditionalLibraryDirectories~s7cCsx|j|�}g}|j||j|dd|�}|j|jd||��|ddidd6�|d�|S(s8Returns the flags that need to be added to lib commands.R�R)tLinkTimeCodeGenerationR%s/LTCGR�R�(R|RnR?R(R�(RRRXR�tlibflagsRj((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pytGetLibFlags�s
cCs�d}|dd
kr�g|jdg�D]}|jd�r)|^q)}t|�dkrz|jd	||d
��q�t|�dkr�td��q�ndS(s�.def files get implicitly converted to a ModuleDefinitionFile for the
    linker in the VS generator. Emulate that behaviour here.RR�tshared_librarytloadable_modulet
executabletsourcess.defis	/DEF:"%s"isMultiple .def filesN(R�R�R�(RRytlenR)t	Exception(RRRItldflagsR�tdef_fileRft	def_files((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pyt_GetDefFileAsLdflags�s4cCs�|j|�}g}|j||j|dd|�}|j|j||�|ddidd6�|ddidd	6d
d6dd
�|j|jd||��|ddd�|j||�}|r�|jd|�n|j	||�}	|	r|jd|	�n|ddd�|ddidd	6dd6dd�|ddidd	6dd6dd�|ddidd	6dd6dd�|ddidd	6dd6dd�|d didd	6dd6dd!�|d"didd	6dd6dd#�|d$did%d	6d&d6dd'�|d(did)d	6d*d6dd'�|d+did,d	6�|d-dd.�|d/did0d6�|d1dd2�|d3did4d6�|d5didd	6dd6dd6�|d7dd�t
d8�|�}
|
s�|jd!�nt
d9�|�s|jd#�nt
d:�|�}|j|||oG|�\}}
|j|�|j||�}|j|
�||fS(;sUReturns the flags that need to be added to link commands, and the
    manifest files.R�R)tGenerateDebugInformationR%s/DEBUGR�t
TargetMachinetX86R�tX64t17R s	/MACHINE:t
DelayLoadDLLss/DELAYLOAD:s/OUT:s/PDB:R�Rt	SubSystemtCONSOLEtWINDOWSR�s/SUBSYSTEM:tTerminalServerAwares:NOs/TSAWAREtLinkIncrementals/INCREMENTALtFixedBaseAddresss/FIXEDtRandomizedBaseAddresss/DYNAMICBASEtDataExecutionPreventions	/NXCOMPATtOptimizeReferencestNOREFtREFs/OPT:tEnableCOMDATFoldingtNOICFtICFR�s/LTCGtIgnoreDefaultLibraryNamess/NODEFAULTLIB:tResourceOnlyDLLs/NOENTRYtEntryPointSymbols/ENTRY:tProfiles/PROFILEtLargeAddressAwares/LARGEADDRESSAWAREtAdditionalDependenciescSsd|kp|dkS(NtDYNAMICBASEs/FIXED((R�((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pyR�RcSs
d|kS(NtNXCOMPAT((R�((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pyR�RcSs
|jd�S(Ns/DEF:(R
(R�((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pyR�R(
R|RnR?R�RIR(R�R�R)R�R$t_GetLdManifestFlagst_GetAdditionalManifestFiles(RRRXR�R�tmanifest_base_namet
is_executableR�tldtouttpdbt
base_flagst
have_def_filetmanifest_flagstintermediate_manifest_filetmanifest_files((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pyt
GetLdflags�s`$$$$$		$$			

cCs=|d}dd|dg}|r3|jd�n||fS(s�Returns the set of flags that need to be added to the link to generate
    a default manifest, as well as the name of the generated file.s.intermediate.manifests	/MANIFESTs/ManifestFile:s1/MANIFESTUAC:"level='asInvoker' uiAccess='false'"s/ALLOWISOLATION(R)(RRRXRqtallow_isolationtoutput_nametflags((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pyR��s
	cCs�|jd
|dg�}|jd|dd�dkr>dGHnt|t�r_|jd�}ng|D]-}tjj||j|d	|���^qfS(s]Gets additional manifest files that are added to the default one
    generated by the linker.tVCManifestTooltAdditionalManifestFilesRt
EmbedManifestRR�s?gyp/msvs_emulation.py: "EmbedManifest: true" not yet supported.t;RX(RR(RR(R}RRNRRRRRh(RRRXR�tfilesR�((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pyR��s	cCs+|j|�}|jd|�}|dkS(szReturns whether the target should be linked via Use Library Dependency
    Inputs (using component .objs of a given .lib).R�tUseLibraryDependencyInputsR�(R�R(R|R}(RRRXtuldi((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pytIsUseLibraryDependencyInputsscCs�|j|�}g}|j||j|dd|�}|dd|dd�|jd|d��|ddd	�|d
dddd��|S(
sTReturns the flags that need to be added to invocations of the resource
    compiler.tVCResourceCompilerToolR)R�R%R s/IRHR�s/dtCultures/lcSstt|��dS(Ni(thextint(R�((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pyRR(R|RnR?R)(RRRXtgyp_to_ninja_pathtrcflagstrc((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pyt
GetRcflagsscCs�tjjtjj||jd��}d|jdd�}g|D]$}|jdd�jdd�^qE}g|D]}d|jdd	�^qv}d
j|�}d|d||f}|S(
sOBuild a command line that runs args via cygwin bash. We assume that all
    incoming paths are in Windows normpath'd form, so they need to be
    converted to posix style for the part of the command line that's passed to
    bash. We also have to do some Visual Studio macro emulation here because
    various rules use magic VS names for things. Also note that rules that
    contain ninja variables cannot be fixed here (for example ${source}), so
    the outer generator needs to make sure that the paths that are written out
    are in posix style, if the command line will be used here.iscd %ss\t/Rs\"s'%s't's'\''Rs1call "%s\setup_env.bat" && set CYGWIN=nontsec && sbash -c "%s ; %s"(RRRRRGR(RRRtpath_to_baset
cygwin_dirtcdR�tbash_cmdR9((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pytBuildCygwinBashCommandLines		1)cCs+t|jd|jjdd���dkS(skDetermine if an action should be run under cygwin. If the variable is
    unset, or set to 1 we use cygwin.tmsvs_cygwin_shellii(RRRI(RRtrule((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pytIsRuleRunUnderCygwin)scCs5x.|jdg�D]}|d|krtSqWtS(sADetermine if there's an explicit rule for a particular extension.trulesR�(RtTruetFalse(RRRIR�R&((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pyt_HasExplicitRuleForExtension/scCs|j|d�S(s�Determine if there's an explicit rule for idl files. When there isn't we
    need to generate implicit rules to build MIDL .idl files.tidl(R+(RRRI((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pytHasExplicitIdlRules6scCs|j|d�S(s�Determine if there's an explicit rule for asm files. When there isn't we
    need to generate implicit rules to assemble .asm files.tasm(R+(RRRI((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pytHasExplicitAsmRules;scs:�j����j��j�d��d���fd�}|ddd�}|ddd�}|ddd	�}|d
dd�}|ddd
�}|ddd�}	||||g}
d|fd|fd|fd|fd|fg}�j��dkrdnd}ddd|dg}
|	|
||
fS(s�Determine the implicit outputs for an idl file. Returns output
    directory, outputs, and variables and flags that are required.t
VCMIDLToolcs�j�|d|�d��S(NRRX(Rh(RqR(RXtmidl_getRR(sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pytmidlEstTypeLibraryNameRs${root}.tlbtHeaderFileNames	${root}.htDLLDataFileNames	dlldata.ctInterfaceIdentifierFileNames${root}_i.ct
ProxyFileNames${root}_p.ctOutputDirectoryRttlbthtdlldatatiidtproxyRZtwin32R\s/chartsigneds/envs/OicfN(R|RnR?RR_(RRtsourceRXR2R9theaderR;R<R=toutdirtoutputt	variablesRbR
((RXR1RRsP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pytGetIdlBuildData@s$				!N('RsRtt__doc__RYRRdRhRkRmtobjectRnR_R|R}R~R�R�R�R�R�R�R�R�R�R�R�R�R�R
R�R�RRR$R'R+R-R/RE(((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pyR<�sF			

	
				
	
	
	
	%								@									cCs:d}d}||kr$||kp9||ko9||kS(Ns.cs.ccs.cxxs.cpp(s.c(s.ccs.cxxs.cpp((R�tpch_source_exttc_extstcc_exts((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pyR�\stPrecompiledHeadercBs;eZdZd�Zd�Zd�Zd�Zd�ZRS(s�Helper to generate dependencies and build rules to handle generation of
  precompiled headers. Interface matches the GCH handler in xcode_emulation.py.
  c	Csi||_||_|jj|j}||�|_tjj|�\}}|||�j�|_dS(N(	tsettingsRXRCt
pch_sourceRRR�tlowert
output_obj(	RRRLRXR�tgyp_to_unique_outputtobj_extRMtfilenameRx((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pyRYgs		cCs!tjj|jj|j�dS(sMGet the header that will appear in an #include line for all source
    files.i(RRRRLRBRX(RR((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pyt
_PchHeaderpscCsp|j�sgStjj|j�d}x@|D]8}ttjj|�d|�r0dd|jfgSq0WgS(sGiven a list of sources files and the corresponding object files,
    returns a list of the pch files that should be depended upon. The
    additional wrapping in the return value is for interface compatability
    with make.py on Mac, and xcode_emulation.py.iN(RSRRR�RMR�RRO(RRR�tobjstpch_extR@((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pytGetObjDependenciesus
cCsgS(s�Not used on Windows as there are no additional build steps required
    (instead, existing steps are modified in GetFlagsModifications below).((RR((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pytGetPchBuildCommands�sc	Cs�||jkr�d|j�g}|dkrTdt|||�fg|jgfS|dkr�dt|||�fg|jgfSng||fS(sgGet the modified cflags and implicit dependencies that should be used
    for the pch compilation step.s/Yctcxxt	cflags_cctcctcflags_c(RMRSR%RO(	RRtinputRCtimplicittcommandR[RYR�t
pch_output((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pytGetFlagsModifications�s
(RsRtRFRYRSRVRWR`(((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pyRKcs				
	cCs+ts'tjj|jdd��antS(Ntmsvs_versiontauto(RKtgyptMSVSVersiontSelectVisualStudioVersionR(RS((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pyRJ�s	cCst|�}|j�S(N(RJtSetupScript(RSR{tvs((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pyt_GetVsvarsSetupArgs�scCsZd|krVxG|j�D]6\}}d|ks=t|��|j||�}qWn|S(s{Expand $(Variable) per expansions dict. See MsvsSettings.GetVSMacroEnv
  for the canonical way to retrieve a suitable dict.t$s$((RPtAssertionErrorR(tstringt
expansionstoldtnew((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pyRe�s
c	Cs�d}i}x�|j�D]�}x�|D]}}tj|d
|j��r&|jd
d�\}}|dkr�tjjtj	�tj
|}n|||j�<Pq&q&WqWx-dD]%}||kr�td|��q�q�W|S(s{Extracts environment variables required for the toolchain to run from
  a textual dump output by the cmd.exe 'set' command.sgoma_.*tincludeRjtlibpathRtpathextt
systemrootttempttmpt=it
SYSTEMROOTtTEMPtTMPs:Environment variable "%s" required to be set to valid path(	sgoma_.*RoRjRpRRqRrRsRt(RvRwRx(
R8tretmatchRNRRRtdirnametsysR�tpathseptupperR�(t
output_of_settenvvars_to_saveRgR;tenvvartvartsettingtrequired((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pyt_ExtractImportantEnvironment�s.
#
cCsMd}d}x0|j�D]"\}}||d||7}qW||7}|S(s�Format as an 'environment block' directly suitable for CreateProcess.
  Briefly this is a list of key=value, terminated by an additional . See
  CreateProcess documentation for more details.RsRu(RP(tenvvar_dicttblocktnultkeytvalue((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pyt_FormatAsEnvironmentBlock�s
cCsDx=|j�j�D])}|jd�r|td�j�SqWdS(s�Gets the path to cl.exe based on the output of calling the environment
  setup batch file, followed by the equivalent of `where`.sLOC:N(tstripR8R
R�(toutput_of_whereR;((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pyt_ExtractCLPath�sc
Csfd}|jdd�r=i}x|D]}d||<q%W|St|�}i}x|D]}|j|�}|jd�tj|dtd	tjd
tj�}|j	�\}	}
t
|	�}t|�}|tj
j|d|�d�}
|
j|�|
j�|j|�}|jd�tj|dtd	tj�}|j	�\}}
t|�||<qVW|S(s�It's not sufficient to have the absolute path to the compiler, linker,
  etc. on Windows, as those tools rely on .dlls being in the PATH. We also
  need to support both x86 and x64 compilers within the same build (to support
  msvs_target_platform hackery). Different architectures require a different
  compiler binary, and different supporting environment variables (INCLUDE,
  LIB, LIBPATH). So, we extract the environment here, wrap all invocations
  of compiler tools (cl, link, lib, rc, midl, etc.) via win_tool.py which
  sets up the environment, and then we do not prefix the compiler with
  an absolute path, instead preferring something like "cl.exe" in the rule
  which will then run whichever the environment setup has put in the path.
  When the following procedure to generate environment files does not
  meet your requirement (e.g. for custom toolchains), you can pass
  "-G ninja_use_custom_environment_files" to the gyp to suppress file
  generation and use custom environment files prepared by yourself.RZR\t"ninja_use_custom_environment_filesiscl.exes&&tsettshellR.R/senvironment.twbtfors%itins(cl.exe)tdos@echos
LOC:%~$PATH:i(RZR\(s&&R�(s&&R�s%iR�s(cl.exe)R�s@echos
LOC:%~$PATH:i(RRJRfR(R4R5R)R6tSTDOUTR7R�R�RRRtwritetcloseR�(ttoplevel_build_dirRStopen_outtarchstcl_pathsR{RgRtpopenRDRxRgt	env_blockR�RC((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pytGenerateEnvironmentFiles�s4


!"

c
Cs�t|jdd��r�td�|�}g|D]!}tjj|||��^q1}td�|�}|r�g|D]}tjj|�^qw}	tddj|	���q�ndS(seEmulate behavior of msvs_error_on_missing_sources present in the msvs
  generator: Check that all regular source files, i.e. not created at run time,
  exist on disk. Missing files cause needless recompilation when building via
  VS, and we want this check to match for people/bots that build using ninja,
  so they're not surprised when the VS build fails.tmsvs_error_on_missing_sourcesicSs
d|kS(NRi((R�((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pyRRcSstjj|�S(N(RRtexists(R�((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pyRRsMissing input files:
%ss
N(RRR$RRRRR�(
R�t	build_dirRStgyp_to_ninjatno_specialsRftrelativetmissingR�t
cleaned_up((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pytVerifyMissingSourcess.%(RFRRyR4R|tgyp.MSVSVersionRctcompileRR
RRR"R'R*R2RGR<R�RKRRKRJRhReR�R�R�R�R�(((sP//opt/alt/alt-nodejs9/root/usr/lib/python2.7/site-packages/gyp/msvs_emulation.pyt<module>s4			
		
	
	��	3					!			-