Ñò rê$Lc @sÓdZdZddkZddkZddkZddkZddkZddk Zddk Zd„Z d„Z d„Z d„Zd„Zd „Zd d „Zd „Zd „Zd„Zd„Zd„ZdS(sYSCons.Tool.FortranCommon Stuff for processing Fortran, common to all fortran dialects. sEsrc/engine/SCons/Tool/FortranCommon.py 5023 2010/06/14 22:05:46 sconsiÿÿÿÿNcCs‰y|d}Wntj odSX|pdSxQ|D]I}|io9tiit|idƒƒd}||jodSq8q8WdS(sKReturn 1 if any of code in source has fortran files in it, 0 otherwise.tFORTRANSUFFIXESii(tKeyErrortsourcestostpathtsplitexttstr(tenvtsourcet fsuffixeststext((s;install/lib/scons-2.0.0.final.0/SCons/Tool/FortranCommon.pyt isfortran)s #  c Cs#|diƒ}|iƒ o+|iƒ odt|iƒGHggfSd}ti|tiƒ}|i|i ƒƒ}t i i |ƒ}|i dd|d|ƒ}|i dd|d|ƒ}g} |D]} | | iƒ|qÌ~ }x*|D]"} |i|ii| |ƒƒqóW||fS(NisCould not locate s#(?i)^\s*MODULE\s+(?!PROCEDURE)(\w+)s$FORTRANMODSUFFIXttargetRs$FORTRANMODDIR(trfiletexistst is_derivedRtnametretcompiletMtfindalltget_text_contentstSConstUtiltuniquetsubsttlowertappendtfstFile( R RRtnodet mod_regextcretmodulestsuffixtmoddirt_[1]txtm((s;install/lib/scons-2.0.0.final.0/SCons/Tool/FortranCommon.pyt_fortranEmitter=s + cCs.t|||ƒ\}}tii|||ƒS(N(R(RtDefaultstStaticObjectEmitter(R RR((s;install/lib/scons-2.0.0.final.0/SCons/Tool/FortranCommon.pytFortranEmitterPscCs.t|||ƒ\}}tii|||ƒS(N(R(RR)tSharedObjectEmitter(R RR((s;install/lib/scons-2.0.0.final.0/SCons/Tool/FortranCommon.pytShFortranEmitterTscCst|ƒdjpt‚|d}|iƒ}g}|D]}||iƒq;~}tii||ƒo|i|ƒn|i|ƒdS(szsuffixes are fortran source files, and ppsuffixes the ones to be pre-processed. Both should be sequences, not strings.iN(tlentAssertionErrortupperRRtcase_sensitive_suffixestextend(tsuffixest ppsuffixesR tsupR%t_tupper_suffixes((s;install/lib/scons-2.0.0.final.0/SCons/Tool/FortranCommon.pytComputeFortranSuffixesXs  'cCs„tiid|d|ƒ}tiid|d|ƒ}tiid|d|ƒ}tiid|d|ƒ}||||fS( s Create dialect specific actions.s$%sCOM s $%sCOMSTRs $%sPPCOM s $%sPPCOMSTRs $SH%sCOM s $SH%sCOMSTRs $SH%sPPCOM s $SH%sPPCOMSTR(RtAction(tdialectt CompActiont CompPPActiont ShCompActiontShCompPPAction((s;install/lib/scons-2.0.0.final.0/SCons/Tool/FortranCommon.pytCreateDialectActionsds ic Csçt||ƒtiiid|ƒ}x(||D]}tiii||ƒq1W|id||ƒt |ƒ\}}} } tii |ƒ\} } xN|D]F}| i ||ƒ| i || ƒ| i |t ƒ| i |tƒqœWxN|D]F}| i ||ƒ| i || ƒ| i |t ƒ| i |tƒqíWd||jotiidƒ|d|s(            6