³ò ”,9Mc@sNdZdZddkZddkZddkZddkZddkZddk Zddk Zddk Zddk Zddk ZddkZddkZddkZddklZlZddgZddd d d gZd „Zd „Zd„Zd„Zd„ZeiiddƒZeiidedddedeiiƒZ ei!i"i#ƒZ$eiiddƒZ%eiide%dddddgde$ƒZ&d„Z'd„Z(eiid d!d"e'd#d$ƒZ)eiid%d&d"e'd#d$ƒZ*eiid'd(d"e'd#d$ƒZ+eiid)d*d"e'd#d$ƒZ,d+„Z-d,„Z.dS(-sìengine.SCons.Tool.msvc Tool-specific initialization for Microsoft Visual C/C++. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. s<src/engine/SCons/Tool/msvc.py 4629 2010/01/17 22:23:21 sconsiÿÿÿÿN(t msvc_existstmsvc_setup_env_onces.cs.Cs.ccs.cpps.cxxs.c++s.C++cCsx|idƒod|doY|idƒptiid‚ntii|dƒptiid|d‚qtndS(s4Validate the PCH and PCHSTOP construction variables.tPCHtPCHSTOPs;The PCHSTOP construction must be defined if PCH is defined.s6The PCHSTOP construction variable must be a string: %rN(thas_keytSConstErrorst UserErrortUtilt is_String(tenv((s4install/lib/scons-1.2.0.d20100117/SCons/Tool/msvc.pyt validate_vars8s cCsÂt|ƒd}d}xh|D]`}tiit|ƒƒddjo |}ntiit|ƒƒddjo |}qqW|p$tiit|ƒƒdd}n||g}||fS(sAdds the object file target.is.pchs.objiN(R tNoneRRtsplitexttstr(ttargettsourceR tpchtobjtt((s4install/lib/scons-1.2.0.d20100117/SCons/Tool/msvc.pyt pch_emitter@s # #$ cCs‡t|ƒ||||ƒ|idƒoS|d}t|dƒtiit|ƒƒddjo|i||ƒq}n||fS(s0Sets up the PCH dependencies for an object file.Ris.obj(R RRRRR tDepends(RRR tparent_emitterR((s4install/lib/scons-1.2.0.d20100117/SCons/Tool/msvc.pytobject_emitterUs   1cCst|||tiiƒS(N(RRtDefaultstStaticObjectEmitter(RRR ((s4install/lib/scons-1.2.0.d20100117/SCons/Tool/msvc.pytstatic_object_emitterms cCst|||tiiƒS(N(RRRtSharedObjectEmitter(RRR ((s4install/lib/scons-1.2.0.d20100117/SCons/Tool/msvc.pytshared_object_emitterqs s$PCHCOMs $PCHCOMSTRtactiontsuffixs.pchtemittertsource_scanners$RCCOMs $RCCOMSTRt src_suffixs.rcs.rest src_buildercCs•|idƒ}|djodSn|d}|d}tii|iƒdtii|iƒdjodSnt|ƒt|ƒ|i|ifS(s¡ Returns a key to identify unique batches of sources for compilation. If batching is enabled (via the $MSVC_BATCH setting), then all target+source pairs that use the same action, defined by the same environment, and have the same target and source directories, will be batched. Returning None specifies that the specified target+source should not be batched with other compilations. s $MSVC_BATCHtt0iN(NR#R$(tsubstR tostpathR tnametidtdir(RR RRtbRts((s4install/lib/scons-1.2.0.d20100117/SCons/Tool/msvc.pytmsvc_batch_key„s    3cCsF|idƒ}|djpt|ƒdjodSn dtiSdS( sQ Returns the correct /Fo flag for batching. If batching is disabled or there's only one source file, then we return an /Fo string that specifies the target explicitly. Otherwise, we return an /Fo string that just specifies the first target's directory (where the Visual C/C++ compiler will put the .obj files). s $MSVC_BATCHR#R$is /Fo$TARGETs/Fo${TARGET.dir}N(NR#R$(R%R tlenR&tsep(RRR t for_signatureR+((s4install/lib/scons-1.2.0.d20100117/SCons/Tool/msvc.pytmsvc_output_flagœs  s$CCCOMs $CCCOMSTRt batch_keyttargetss$CHANGED_TARGETSs$SHCCCOMs $SHCCCOMSTRs$CXXCOMs $CXXCOMSTRs $SHCXXCOMs $SHCXXCOMSTRcCs1tii|ƒ\}}t|i_t|i_xNtD]F}|i|tƒ|i|t ƒ|i |t ƒ|i |t ƒq7WxNt D]F}|i|tƒ|i|tƒ|i |t ƒ|i |t ƒqˆWtiidgƒ|d|d? sb                           I