�� r�$Lc�������� ���@���s����d��Z��d�Z�d�d�k�Z�d�d�k�Z�d�d�k�Z�d�d�k�Z�d�d�k�Z�d�d�k �Z�d�d�k �Z�d����Z�d����Z�d����Z �d����Z�d����Z�d ����Z�d �d���Z�d����Z�d ����Z�d����Z�d����Z�d����Z�d�S(���sY���SCons.Tool.FortranCommon Stuff for processing Fortran, common to all fortran dialects. sE���src/engine/SCons/Tool/FortranCommon.py 5023 2010/06/14 22:05:46 sconsi����Nc���������C���s����y�|��d�}�Wn�t��j �o�d�SX|�p�d�SxQ�|�D]I�}�|�i�o9�t�i�i�t�|�i�d�����d�}�|�|�j�o�d�Sq8�q8�Wd�S(���sK���Return 1 if any of code in source has fortran files in it, 0 otherwise.t���FORTRANSUFFIXESi����i���(���t���KeyErrort���sourcest���ost���patht���splitextt���str(���t���envt���sourcet ���fsuffixest���st���ext(����(����s;���install/lib/scons-2.0.0.final.0/SCons/Tool/FortranCommon.pyt ���isfortran)���s����� # c���������C���s#��|�d�i�����}�|�i����o+�|�i����o�d�t�|�i���GHg��g��f�Sd�}�t�i�|�t�i���}�|�i�|�i ������}�t �i�i�|���}�|�i �d�d�|��d�|��}�|�i �d�d�|��d�|��}�g��} �|�D]�} �| �| �i����|�q��~ �}�x*�|�D]"�}�|��i�|�i�i�|�|�����q��W|��|�f�S(���Ni����s���Could not locate s#���(?i)^\s*MODULE\s+(?!PROCEDURE)(\w+)s���$FORTRANMODSUFFIXt���targetR���s���$FORTRANMODDIR(���t���rfilet���existst ���is_derivedR���t���namet���ret���compilet���Mt���findallt���get_text_contentst���SConst���Utilt���uniquet���substt���lowert���appendt���fst���File(���R ���R���R���t���nodet ���mod_regext���cret���modulest���suffixt���moddirt���_[1]t���xt���m(����(����s;���install/lib/scons-2.0.0.final.0/SCons/Tool/FortranCommon.pyt���_fortranEmitter=���s����+� c���������C���s.���t��|��|�|���\�}��}�t�i�i�|��|�|���S(���N(���R(���R���t���Defaultst���StaticObjectEmitter(���R ���R���R���(����(����s;���install/lib/scons-2.0.0.final.0/SCons/Tool/FortranCommon.pyt���FortranEmitterP���s����c���������C���s.���t��|��|�|���\�}��}�t�i�i�|��|�|���S(���N(���R(���R���R)���t���SharedObjectEmitter(���R ���R���R���(����(����s;���install/lib/scons-2.0.0.final.0/SCons/Tool/FortranCommon.pyt���ShFortranEmitterT���s����c���������C���s����t��|����d�j�p�t���|��d�}�|�i����}�g��}�|��D]�}�|�|�i����q;�~�}�t�i�i�|�|���o�|�i�|���n�|��i�|���d�S(���sz���suffixes are fortran source files, and ppsuffixes the ones to be pre-processed. Both should be sequences, not strings.i����N(���t���lent���AssertionErrort���upperR���R���t���case_sensitive_suffixest���extend(���t���suffixest ���ppsuffixesR ���t���supR%���t���_t���upper_suffixes(����(����s;���install/lib/scons-2.0.0.final.0/SCons/Tool/FortranCommon.pyt���ComputeFortranSuffixesX���s���� 'c���������C���s����t��i�i�d�|��d�|����}�t��i�i�d�|��d�|����}�t��i�i�d�|��d�|����}�t��i�i�d�|��d�|����}�|�|�|�|�f�S( ���s ���Create dialect specific actions.s���$%sCOM s ���$%sCOMSTRs ���$%sPPCOM s���$%sPPCOMSTRs ���$SH%sCOM s���$SH%sCOMSTRs���$SH%sPPCOM s ���$SH%sPPCOMSTR(���R���t���Action(���t���dialectt ���CompActiont���CompPPActiont���ShCompActiont���ShCompPPAction(����(����s;���install/lib/scons-2.0.0.final.0/SCons/Tool/FortranCommon.pyt���CreateDialectActionsd���s ����i����c��� ��� ���C���s���t��|�|���t�i�i�i�d�|���}�x(�|�|�D]�}�t�i�i�i�|�|���q1�W|��i�d�|�|���t �|���\�}�}�} �} �t�i�i �|����\�}�}�xN�|�D]F�}�|�i�|�|���|�i�|�| ���|�i�|�t ���|�i�|�t���q��WxN�|�D]F�}�|�i�|�|���|�i�|�| ���|�i�|�t ���|�i�|�t���q��Wd�|�|��j�o�t�i�i�d���|��d�|�<n�d�|�|��j�o"�t�i�i�d�|���|��d�|�<n�d�|�|��j�o�d�|��d�|�<n�d �|�|��j�o�d �|��d �|�<n�d�|�|�|�f�|��d�|�<|�d �j�op�d�|�|�|�f�|��d�|�<d�|�|�|�f�|��d�|�<d�|�|�|�f�|��d�|�<d�|�|�|�f�|��d�|�<nm�d�|�|�|�f�|��d�|�<d�|�|�|�f�|��d�|�<d�|�|�|�f�|��d�|�<d�|�|�|�f�|��d�|�<d�S(���s,���Add dialect specific construction variables.s���%sPATHR����s���%sFLAGSt����s ���SH%sFLAGSs���$%sFLAGSs���INC%sPREFIXs ���$INCPREFIXs���INC%sSUFFIXs ���$INCSUFFIXsR���$( ${_concat(INC%sPREFIX, %sPATH, INC%sSUFFIX, __env__, RDirs, TARGET, SOURCE)} $)s���_%sINCFLAGSi���sA���$%s -o $TARGET -c $%sFLAGS $_%sINCFLAGS $_FORTRANMODFLAG $SOURCESs���%sCOMsY���$%s -o $TARGET -c $%sFLAGS $CPPFLAGS $_CPPDEFFLAGS $_%sINCFLAGS $_FORTRANMODFLAG $SOURCESs���%sPPCOMsE���$SH%s -o $TARGET -c $SH%sFLAGS $_%sINCFLAGS $_FORTRANMODFLAG $SOURCESs���SH%sCOMs]���$SH%s -o $TARGET -c $SH%sFLAGS $CPPFLAGS $_CPPDEFFLAGS $_%sINCFLAGS $_FORTRANMODFLAG $SOURCESs ���SH%sPPCOMs0���$%s -o $TARGET -c $%sFLAGS $_%sINCFLAGS $SOURCESsH���$%s -o $TARGET -c $%sFLAGS $CPPFLAGS $_CPPDEFFLAGS $_%sINCFLAGS $SOURCESs4���$SH%s -o $TARGET -c $SH%sFLAGS $_%sINCFLAGS $SOURCESsL���$SH%s -o $TARGET -c $SH%sFLAGS $CPPFLAGS $_CPPDEFFLAGS $_%sINCFLAGS $SOURCESN(���R8���R���t���Scannert���Fortrant���FortranScant���Toolt���SourceFileScannert���add_scannert���AppendUniqueR?���t���createObjBuilderst ���add_actiont���add_emitterR+���R-���R���t���CLVar( ���R���R:���R3���R4���t���support_modulet���fscanR#���t ���compactiont���compppactiont���shcompactiont���shcompppactiont ���static_objt ���shared_obj(����(����s;���install/lib/scons-2.0.0.final.0/SCons/Tool/FortranCommon.pyt���DialectAddToEnvm���sL���� ���" c������ ���C���s����y�|��d�}�Wn"�t��j �o�d�d�d�g�}�n�Xy�|��d�}�Wn�t��j �o�d�d�g�}�n�Xt�|��d�|�|�d �d ��d�|��d�<d �|��d�<d�|��d�<d�|��d�<d�|��d�<d�|��d�<d�S(���sF���Add Builders and construction variables for Fortran to an Environment.t���FORTRANFILESUFFIXESs���.fs���.fors���.ftnt���FORTRANPPFILESUFFIXESs���.fpps���.FPPt���FORTRANRL���i���R@���t���FORTRANMODPREFIXs���.modt���FORTRANMODSUFFIXt ���FORTRANMODDIRt���FORTRANMODDIRPREFIXt���FORTRANMODDIRSUFFIXsi���$( ${_concat(FORTRANMODDIRPREFIX, FORTRANMODDIR, FORTRANMODDIRSUFFIX, __env__, RDirs, TARGET, SOURCE)} $)t���_FORTRANMODFLAGN(���R���RT���(���R���t���FortranSuffixest���FortranPPSuffixes(����(����s;���install/lib/scons-2.0.0.final.0/SCons/Tool/FortranCommon.pyt���add_fortran_to_env����s ���� c���������C���sn���y�|��d�}�Wn�t��j �o�d�g�}�n�Xy�|��d�}�Wn�t��j �o �g��}�n�Xt�|��d�|�|���d�S(���sB���Add Builders and construction variables for f77 to an Environment.t���F77FILESUFFIXESs���.f77t���F77PPFILESUFFIXESt���F77N(���R���RT���(���R���t���F77Suffixest ���F77PPSuffixes(����(����s;���install/lib/scons-2.0.0.final.0/SCons/Tool/FortranCommon.pyt���add_f77_to_env����s����c������ ���C���st���y�|��d�}�Wn�t��j �o�d�g�}�n�Xy�|��d�}�Wn�t��j �o �g��}�n�Xt�|��d�|�|�d�d��d�S(���sB���Add Builders and construction variables for f90 to an Environment.t���F90FILESUFFIXESs���.f90t���F90PPFILESUFFIXESt���F90RL���i���N(���R���RT���(���R���t���F90Suffixest ���F90PPSuffixes(����(����s;���install/lib/scons-2.0.0.final.0/SCons/Tool/FortranCommon.pyt���add_f90_to_env����s����c������ ���C���st���y�|��d�}�Wn�t��j �o�d�g�}�n�Xy�|��d�}�Wn�t��j �o �g��}�n�Xt�|��d�|�|�d�d��d�S(���sB���Add Builders and construction variables for f95 to an Environment.t���F95FILESUFFIXESs���.f95t���F95PPFILESUFFIXESt���F95RL���i���N(���R���RT���(���R���t���F95Suffixest ���F95PPSuffixes(����(����s;���install/lib/scons-2.0.0.final.0/SCons/Tool/FortranCommon.pyt���add_f95_to_env����s����c���������C���s,���t��|����t�|����t�|����t�|����d�S(���sO���Add builders and construction variables for all supported fortran dialects.N(���R`���Rf���Rl���Rr���(���R���(����(����s;���install/lib/scons-2.0.0.final.0/SCons/Tool/FortranCommon.pyt���add_all_to_env����s���� (���t���__doc__t���__revision__R���t���os.pathR���t���SCons.ActionR���t���SCons.Defaultst���SCons.Scanner.Fortrant ���SCons.Toolt ���SCons.UtilR���R(���R+���R-���R8���R?���RT���R`���Rf���Rl���Rr���Rs���(����(����(����s;���install/lib/scons-2.0.0.final.0/SCons/Tool/FortranCommon.pyt���<module>���s(��� 6