mò &U²Ic@sÀdZdZdkZdkZdklZlZdklZdkl Z dk l Z dk l Z lZlZdklZlZlZlZd klZd „Zd e fd „ƒYZdS( s9distutils.unixccompiler Contains the UnixCCompiler class, a subclass of CCompiler that handles the "typical" Unix-style command-line C compiler: * macros defined with -Dname[=value] * macros undefined with -Uname * include search directories specified with -Idir * libraries specified with -lllib * library search directories specified with -Ldir * compile handled by 'cc' (or similar) executable with -c option: compiles .c to .o * link static library handled by 'ar' command (possibly with 'ranlib') * link shared library handled by 'cc -shared' sB$Id: unixccompiler.py 52231 2006-10-08 17:41:25Z ronald.oussoren $N(s StringTypesNoneType(scopy(s sysconfig(snewer(s CCompilersgen_preprocess_optionssgen_lib_options(sDistutilsExecErrors CompileErrorsLibErrors LinkError(slogcCsd}}t|ƒ}tiƒd}t|idƒdƒ}|djot }}nd|j}d|j}|oDxAy!|i dƒ}|||d5Wq|t j oPq|Xq|Wn|o;y!|i dƒ}|||d5Wqÿt j oqÿXn|S( sg This function will strip '-isysroot PATH' and '-arch ARCH' from the compile flag if the user has specified one of them in extra_compile_flags. This is needed because '-arch ARCH' adds another architecture to the build, without a way to remove an architecture. Furthermore GCC will barf if multiple '-isysroot' arguments are present. iit.is-archs -isysrootiN(t stripArcht stripSysroottlistt compiler_sotostunametkernel_versiontinttsplitt major_versiontTruetcc_argstindext ValueError(RR R RRR R((t4/data/zmath/lib/python2.4/distutils/unixccompiler.pyt_darwin_compiler_fixup-s0      t UnixCCompilerc BsrtZdZhdd<ddg<ddg<ddg<dddg<d dg<d d d g<d dR?R=t _fix_lib_argst librariest library_dirstruntime_library_dirstgen_lib_optionstlib_optsttypet StringTypetNoneTypet TypeErrorR RR0tjoinRBRCtld_argsRFR)R*R(R/R1t target_desct CCompilert EXECUTABLERtlinkerRRGRR7R8RR2R3R4t LinkErrorRE(RRUR?RBR=RJRKRLtexport_symbolsRFR)R*t build_tempRGRNRTR4RX((Rtlink½s:     cCsd|S(Ns-L(tdir(RR]((Rtlibrary_dir_optionìscCsËtiitidƒƒ}tid djo d|Sntid djo d|Snmtid d jptid d jod |gSn7|d d jp|d djo d|Sn d|SdS(NtCCiRs-Lishp-uxs+s -Litirix646tosf1V5s-rpathitgccsg++s-Wl,-Rs-R( RR0tbasenamet sysconfigtget_config_varRR7R8R](RR]R((Rtruntime_library_dir_optionïs   (" cCsd|S(Ns-l(tlib(RRg((Rtlibrary_option sc Csä|i|ddƒ}|i|ddƒ} |i|ddƒ}xž|D]–} ti i | |ƒ}ti i | | ƒ}ti i | |ƒ}ti i|ƒo|SqFti i|ƒo|SqFti i|ƒo|SqFqFWdS(Ntlib_typetsharedtdylibtstatic(RR@Rgtshared_ftdylib_ftstatic_ftdirsR]RR0RSRjRkRltexistsR ( RRpRgRFRmRlRoRkRjRnR]((Rtfind_library_file s (t__name__t __module__t compiler_typeR t executablesR7R8tsrc_extensionst obj_extensiontstatic_lib_extensiontshared_lib_extensiontdylib_lib_extensiontstatic_lib_formattshared_lib_formattdylib_lib_formatt exe_extensionR6R<RHR\R^RfRhRr(((RRXs(f   '/   (t__doc__t __revision__RR7ttypesRPRQtcopyt distutilsRdtdistutils.dep_utilR.tdistutils.ccompilerRVR$RMtdistutils.errorsR3R5RDRYRERR(RPRR3R.R$RVRMRYRR7RRdR5RƒRRDRQRE((Rt?s     +