code: def add_fortran_to_env(env):
      
      try:
          FortranSuffixes = env['FORTRANFILESUFFIXES']
      except KeyError:
          FortranSuffixes = ['.f', '.for', '.ftn']
  
      #print("Adding %s to fortran suffixes" % FortranSuffixes)
      try:
          FortranPPSuffixes = env['FORTRANPPFILESUFFIXES']
      except KeyError:
          FortranPPSuffixes = ['.fpp', '.FPP']
  
      DialectAddToEnv(env, "FORTRAN", FortranSuffixes,
                      FortranPPSuffixes, support_module = 1)
  
      env['FORTRANMODPREFIX'] = ''     # like $LIBPREFIX
      env['FORTRANMODSUFFIX'] = '.mod' # like $LIBSUFFIX
  
      env['FORTRANMODDIR'] = ''          # where the compiler should place .mod files
      env['FORTRANMODDIRPREFIX'] = ''    # some prefix to $FORTRANMODDIR - similar to $INCPREFIX
      env['FORTRANMODDIRSUFFIX'] = ''    # some suffix to $FORTRANMODDIR - similar to $INCSUFFIX
      env['_FORTRANMODFLAG'] = '$( ${_concat(FORTRANMODDIRPREFIX, FORTRANMODDIR, FORTRANMODDIRSUFFIX, __env__, RDirs, TARGET, SOURCE)} $)'
docs: Add Builders and construction variables for Fortran to an Environment.