Ñò rê$Lc @sÌdZdZddkZddkZddkZddkZddkZddkZddk Zddk Zd„Z e ƒd„Z d„Z defd„ƒYZd efd „ƒYZe ƒd „ZdS( snSCons.Platform SCons platform selection. This looks for modules that define a callable object that can modify a construction environment as appropriate for a given platform. Note that we take a more simplistic view of "platform" than Python does. We're looking for a single string that determines a set of tool-independent variables with which to initialize a construction environment. Consequently, we'll examine both sys.platform and os.name (and anything else that might come in to play) in order to return some specification which is unique enough for our purposes. Note that because this subsysem just *selects* a callable that can modify a construction environment, it's possible for people to define their own "platform specification" in an arbitrary callable function. No one needs to use or tie in to this subsystem in order to roll their own platform definition. sDsrc/engine/SCons/Platform/__init__.py 5023 2010/06/14 22:05:46 sconsiÿÿÿÿNcCsti}|djo ti}n|djo³tidjodStiidƒdjodStiidƒdjodStiidƒdjodStiid ƒdjod Stiid ƒdjod SdSntid jod StiSd S( sïReturn the platform string for our execution environment. The returned value should map to one of the SCons/Platform/*.py files. Since we're architecture independent, though, we don't care about the machine architecture. tjavatposixtcygwintirixiÿÿÿÿtsunosshp-uxthpuxtaixtdarwintos2N(tostnamet_osTypetsystplatformtfind(tosname((s:install/lib/scons-2.0.0.final.0/SCons/Platform/__init__.pytplatform_default:s(    c Cs6d|}|tijotidjot|ƒq+y^ti|tidiƒ\}}}zti||||ƒ}Wd|o|i ƒnXWn{t j ooy<ddk }|i tididƒ}|i|ƒ}Wqt j ot iid|ƒ‚qXnXtt i||ƒnti|S(sÜReturn the imported module for the platform. This looks for a module name that matches the specified argument. If the name is unspecified, we fetch the appropriate default for our execution environment. sSCons.Platform.RsSCons.PlatformNiÿÿÿÿisNo platform named '%s'(R tmodulesR R tevaltimpt find_modulet__path__t load_moduletcloset ImportErrort zipimportt zipimportertSConstErrorst UserErrortsetattrtPlatform(R t full_nametfiletpathtdesctmodRtimporter((s:install/lib/scons-2.0.0.final.0/SCons/Platform/__init__.pytplatform_moduleXs(    cCstii||ƒS(s;Select a default tool list for the specified platform. (RtToolt tool_list(R tenv((s:install/lib/scons-2.0.0.final.0/SCons/Platform/__init__.pytDefaultToolListvst PlatformSpeccBs#eZd„Zd„Zd„ZRS(cCs||_||_dS(N(R tgenerate(tselfR R,((s:install/lib/scons-2.0.0.final.0/SCons/Platform/__init__.pyt__init__|s cOs|i||ŽS(N(R,(R-targstkw((s:install/lib/scons-2.0.0.final.0/SCons/Platform/__init__.pyt__call__€scCs|iS(N(R (R-((s:install/lib/scons-2.0.0.final.0/SCons/Platform/__init__.pyt__str__ƒs(t__name__t __module__R.R1R2(((s:install/lib/scons-2.0.0.final.0/SCons/Platform/__init__.pyR+{s  t TempFileMungecBs eZdZd„Zd„ZRS(swA callable class. You can set an Environment variable to this, then call it with a string argument, then it will perform temporary file substitution on it. This is used to circumvent the long command line limitation. Example usage: env["TEMPFILE"] = TempFileMunge env["LINKCOM"] = "${TEMPFILE('$LINK $TARGET $SOURCES')}" By default, the name of the temporary file used begins with a prefix of '@'. This may be configred for other tool chains by setting '$TEMPFILEPREFIX'. env["TEMPFILEPREFIX"] = '-@' # diab compiler env["TEMPFILEPREFIX"] = '-via' # arm tool chain cCs ||_dS(N(tcmd(R-R6((s:install/lib/scons-2.0.0.final.0/SCons/Platform/__init__.pyR.—sc Csï|o|iS|i|itii||ƒd}yt|idƒƒ}Wntj o d}nXd}x|D]}|t|ƒ7}qvW||jo|iSt i ddt ƒ\} } ti i tii| ƒƒ} |do=|ddjo,| idd ƒ} |id ƒpd } nd } |id ƒ} | p d } ntttii|dƒƒ}ti| di|ƒdƒti| ƒtiio0d| dt|dƒddi|ƒGHn|d| | d| | gS(Nis$MAXLINELENGTHis.lnkttexttSHELLtshs\s\\\\trmtdels$TEMPFILEPREFIXt@it s sUsing tempfile s for command line: (R6t subst_listRtSubstt SUBST_CMDtinttsubstt ValueErrortlenttempfiletmkstemptTruetUtiltget_native_pathR R"tnormpathtreplacetDetecttlisttmapt quote_spacestwritetjoinRtActiont print_actionststr(R-ttargettsourceR)t for_signatureR6tmaxlinetlengthtctfdttmpt native_tmpR:tprefixR/((s:install/lib/scons-2.0.0.final.0/SCons/Platform/__init__.pyR1šs8%      0(R3R4t__doc__R.R1(((s:install/lib/scons-2.0.0.final.0/SCons/Platform/__init__.pyR5†s cCs"t|ƒ}t||iƒ}|S(s,Select a canned Platform specification. (R&R+R,(R tmoduletspec((s:install/lib/scons-2.0.0.final.0/SCons/Platform/__init__.pyRæs (R_t __revision__t SCons.compatRRR R REt SCons.Errorst SCons.Substt SCons.ToolRR&R*tobjectR+R5R(((s:install/lib/scons-2.0.0.final.0/SCons/Platform/__init__.pyts           `