mς &U²Ic@s£dZdZdkZdkZdklZlZlZlZl Z l Z dk l Z l Z lZdklZdklZdklZde fd „ƒYZdS( sƒdistutils.bcppcompiler Contains BorlandCCompiler, an implementation of the abstract CCompiler class for the Borland C++ compiler. s8$Id: bcppcompiler.py 37828 2004-11-10 22:23:15Z loewis $N(sDistutilsExecErrorsDistutilsPlatformErrors CompileErrorsLibErrors LinkErrorsUnknownFileError(s CCompilersgen_preprocess_optionssgen_lib_options(s write_file(snewer(slogt BCPPCompilerc BsϊtZdZdZhZdgZdddgZeeZdZdZ dZ d Z Z d Z d d d d „Zeeed eeed „Zed ed„Zeeeeed eeeed„ Zd d„Zd dd„Zeeeeed„ZRS(sConcrete class that implements an interface to the Borland C/C++ compiler, as defined by the CCompiler abstract class. tbcpps.cs.ccs.cpps.cxxs.objs.libs.dlls%s%ss.exeicCsΒti||||ƒd|_d|_d|_d|_ ddddg|_ ddddg|_ d d dd g|_ d d dd g|_g|_d dd g|_d dd d g|_dS( Ns bcc32.exes ilink32.exestlib.exes/tWMs/O2s/qs/g0s/Ods/Tpds/Gns/xs/r(t CCompilert__init__tselftverbosetdry_runtforcetcctlinkertlibtNonetpreprocess_optionstcompile_optionstcompile_options_debugtldflags_sharedtldflags_shared_debugtldflags_statict ldflags_exetldflags_exe_debug(RRRR((t3/data/zmath/lib/python2.4/distutils/bcppcompiler.pyR9s     c Csπ|i||||||ƒ\}} }} } |pg} | i dƒ|o| i|iƒn| i|iƒxw| D]o}y| |\}}Wntj o qynXtii|ƒ}tii|ƒ}|itii|ƒƒ|djoqyn|djoEy|idd||gƒWqytj o} t| ‚qyXqyn||ijo d}n!||i!jo d}nd}d|}y4|i|i#g| | ||g||gƒWqytj o} t| ‚qyXqyW| S( Ns-cs.ress.rctbrcc32s-fots-Ps-o($Rt_setup_compilet output_dirtmacrost include_dirstsourcestdependstextra_postargstobjectstpp_optstbuildt extra_preargst compile_optstappendtdebugtextendRR tobjtsrctexttKeyErrortostpathtnormpathtmkpathtdirnametspawntDistutilsExecErrortmsgt CompileErrort _c_extensionst input_optt_cpp_extensionst output_optR(RRRRRR$R!RRRR"R R1RR'R&R(R4R6((RtcompileUsF       4c Cs―|i||ƒ\}}|i|d|ƒ}|i||ƒo[|dg|}|ony|i |i g|ƒWq«t j o}t|‚q«Xnti d|ƒdS(NRs/usskipping %s (up-to-date)(Rt_fix_object_argsRRtlibrary_filenametoutput_libnametoutput_filenamet _need_linktlib_argsR$R/R R0R1tLibErrortlog( RRR:RR$t target_langR;R1R=((Rtcreate_static_lib–sc CsΧ|i||ƒ\}}|i|||ƒ\}}}|oti dt |ƒƒn|dj ot i i||ƒ}n|i||ƒo3|tijo)d}| o|i}qξ|i}n&d}| o|i}n |i}|djo d}n΅t i i|ƒ\}}t i i |ƒ\}}t i i#|dƒ}t i i|d|ƒ}dg}x,|pgD]}|i'd||fƒq{W|i(t)||fd |ƒt*t i i+|ƒ}|g}g}x]|D]U}t i i t i i/|ƒƒ\}}|d jo|i'|ƒqδ|i'|ƒqδWx+|D]#}|i'd t i i+|ƒƒqDW|i'd ƒ|i2|ƒ|i2d |gƒ|i'dƒxN|D]F}|i4||| ƒ}|djo|i'|ƒq¬|i'|ƒq¬W|i'dƒ|i'dƒ|i2d |gƒ|i'd ƒ|i2|ƒ| o| |d*n| o|i2| ƒn|i8t i i#|ƒƒy|i9|i:g|ƒWqΣt;j o}t=|‚qΣXntid|ƒdS(Ns7I don't know what to do with 'runtime_library_dirs': %stc0w32tc0d32Ris%s.deftEXPORTSs %s=_%ss writing %ss.ress/L%ss/L.t,s,,timport32tcw32mtsskipping %s (up-to-date)(>RR8RRt _fix_lib_argst librariest library_dirstruntime_library_dirsR?twarntstrR R*R+tjoinR;R<t target_descRt EXECUTABLEt startup_objR$Rtld_argsRRRtexport_symbolstdef_filetsplittheadttailtsplitexttmodnameR(R.ttemp_dirtcontentstsymR#texecutet write_filetmapR,tobjects2t resourcestfiletnormcasetbasetlR%R tfind_library_filetlibfileR!RR-R/R R0R1t LinkError( RRORR;RRIRJRKRSR$R!Rt build_tempR@RRRVRbR[R(RWRQR1RaRZR`RgR\RYR ReRTRd((Rtlink―s„        $ !        c Cs’|o(|d}|d|d||f}n|d|f}x\|D]P}xG|D]?}tii ||i |ƒƒ}tii |ƒo|SqSqSWqFWdSdS(Nt_dt_bcpp(R$R tdlibt try_namestdirstdirtnameR*R+RNRR9RgtexistsR ( RRoR R$RnRqRgRmRp((RRf8s  RcCs)|djo d}ng}x|D]ύ}tiitii|ƒƒ\}}||i ddgjot d||f‚n|otii|ƒ}n|djo$|itii|||ƒƒq$|djo$|itii||dƒƒq$|itii|||iƒƒq$W|S(NRs.rcs.ress"unknown file type '%s' (from '%s')(RR t obj_namestsource_filenamestsrc_nameR*R+RXRcRdR(Rtsrc_extensionstUnknownFileErrort strip_dirtbasenameR#RNt obj_extension(RRtRxRRsR(RdRu((Rtobject_filenamesRs" $ $ $c Cs |id||ƒ\} }}t||ƒ}dg|}|dj o|i d|ƒn|o||d*n|o|i |ƒn|i |ƒ|ip|djpt||ƒo_|o|itii|ƒƒny|i|ƒWqtj o} | GHt| ‚qXndS(Ns cpp32.exes-oi(Rt_fix_compile_argsR RRt_tgen_preprocess_optionsRtpp_argst output_fileR#R!RR%tsourceRtnewerR-R*R+R.R/R0R1R2( RRR€RRR!RRRR1R}((Rt preprocessns$   '(t__name__t __module__t__doc__t compiler_typet executablesR3R5RvRztstatic_lib_extensiontshared_lib_extensiontstatic_lib_formattshared_lib_formatt exe_extensionRR R7RARjRfR{Rƒ(((RRs$    A'‰ (R†t __revision__tsysR*tdistutils.errorsR0tDistutilsPlatformErrorR2R>RhRwtdistutils.ccompilerRR~tgen_lib_optionstdistutils.file_utilR^tdistutils.dep_utilR‚t distutilsR?R(RR‘RŽR0R?R~R“RhRRR‚R2R^R*R>Rw((Rt?s +