;ò
�ü?c           @   s®   d  Z  d Z d k Z d k Z d k Z d k Td k l Z l Z l	 Z	 l
 Z
 l Z d k l Z l Z l Z d k Z d k Z d k l Z d k Z d e f d „  ƒ  YZ d S(	   s¶   distutils.mwerkscompiler

Contains MWerksCompiler, an implementation of the abstract CCompiler class
for MetroWerks CodeWarrior on the Macintosh. Needs work to support CW on
Windows.sA   $Id: mwerkscompiler.py,v 1.12 2002/11/19 13:12:27 akuchling Exp $N(   s   *(   s   DistutilsExecErrors   DistutilsPlatformErrors   CompileErrors   LibErrors	   LinkError(   s	   CCompilers   gen_preprocess_optionss   gen_lib_options(   s   logs   MWerksCompilerc           B   sþ   t  Z d  Z d Z h  Z d g Z d d d g Z d g Z d Z e e e Z	 d Z
 d	 Z d
 Z d Z d Z Z d Z d d d d „ Z e e e d e e e d „ Z e e e e e d e e e e d „
 Z d „  Z d „  Z d „  Z d „  Z d d „ Z RS(   sy   Concrete class that implements an interface to MetroWerks CodeWarrior,
       as defined by the CCompiler abstract class.s   mwerkss   .cs   .ccs   .cpps   .cxxs   .rs   .exps   .rsrcs   .objs   .libs   .slbs   %s%ss    i    c         C   s   t  i |  | | | ƒ d  S(   N(   s	   CCompilers   __init__s   selfs   verboses   dry_runs   force(   s   selfs   verboses   dry_runs   force(    (    s5   /mit/python/lib/python2.3/distutils/mwerkscompiler.pys   __init__6   s    c	   	      C   sA   |  i | | | ƒ \ } } } | |  _ | |  _ | |  _ g  Sd  S(   N(	   s   selfs   _fix_compile_argss
   output_dirs   macross   include_dirss   sourcess   _MWerksCompiler__sourcess   _MWerksCompiler__macross   _MWerksCompiler__include_dirs(	   s   selfs   sourcess
   output_dirs   macross   include_dirss   debugs   extra_preargss   extra_postargss   depends(    (    s5   /mit/python/lib/python2.3/distutils/mwerkscompiler.pys   compile>   s
    				c   %      C   s3  |  i | | ƒ \ } } |  i | | | ƒ \ } } } | |  i	 |  i
 f j o t d ‚ n | o t d ‚ n |
 p | o t d ‚ n t | ƒ d j o t d ‚ n t |  i |  i ƒ } t |  i |  i ƒ } | o t |  i | ƒ } n g  } | o |  i | ƒ } n t i ƒ  } | o t i i | | ƒ } n |  i | ƒ } t i i | ƒ \ } } | d d j o | d  } n6 | d d j o | d  } n t i i | ƒ d	 } | d
 } | } | d } | d } d | } t$ i% i& | d |  i' ƒt$ i% i& | d |  i' ƒh  }  | |  d <| |  d <| |  d <| |  d <t) i* |  d <d |  d <g  } g  } xV | | D]J } t i i | ƒ \ } } | i/ | ƒ | | j o | i/ | ƒ qvqvW| |  d <| |  d <| | | |  d <|  i' oC d Gt i0 ƒ  GHx) |  i1 ƒ  D] \ } }! d | |! f GHqWd  Sn t i i | | ƒ }$ t5 i6 d |$ ƒ t7 |$ d ƒ } | i9 d | d	 ƒ | i: ƒ  |  i; o± t i i t i0 ƒ  t i i | | ƒ ƒ }" t7 |" d ƒ } | i9 d ƒ xP |  i; D]E \ } }! |! t> j o | i9 d | ƒ qä| i9 d  | |! f ƒ qäW| i: ƒ  | |  d! <n t i i t i0 ƒ  t i i | | ƒ ƒ } t5 i6 d" | ƒ t@ iA iB |  ƒ } | iD ƒ  |  d# } t7 | d ƒ } | i9 | ƒ | i: ƒ  t i i t i0 ƒ  t i i | | ƒ ƒ }# t5 i6 d$ |# ƒ t@ iG | |# ƒ t5 i6 d% ƒ t@ iH |# ƒ d  S(&   Ns@   Can only make SHARED_LIBRARY or SHARED_OBJECT targets on the Macs(   Runtime library dirs not implemented yeti   s   Need exactly one export symboliøÿÿÿs   .ppc.slbiõÿÿÿs   .carbon.slbi    s   .mcps   .xmls   .mcp.exps   mwerks_%s_config.hs   dry_runs   mac_exportnames   mac_outputdirs   mac_dllnames   mac_targetnames	   sysprefixs   Absolutes   mac_sysprefixtypes   sourcess	   librariess   extrasearchdirss   CALLING LINKER INs
   %20.20s %ss   	Create export file %ss   ws   %s
s$   #include "mwerks_shcarbon_config.h"
s   #define %s
s   #define %s %s
s
   prefixnames   	Create XML file %ss   tmp_projectxmldatas   	Create project file %ss   	Build project(I   s   selfs   _fix_object_argss   objectss
   output_dirs   _fix_lib_argss	   librariess   library_dirss   runtime_library_dirss   target_descs   SHARED_LIBRARYs   SHARED_OBJECTs   DistutilsPlatformErrors   extra_preargss   extra_postargss   lens   export_symbolss   maps   _filename_to_abss   _MWerksCompiler__sourcess   sourcess   _MWerksCompiler__include_dirss   include_dirss
   build_temps   oss   curdirs   paths   joins   output_filenames   splits   basenames   strips   projectnames
   targetnames   xmlnames
   exportnames
   prefixnames	   distutilss   dir_utils   mkpaths   dry_runs   settingss   syss   prefixs   sourcefilenamess   sourcefiledirss   filenames   dirnames   appends   getcwds   itemss   keys   values   exportfilenames   logs   debugs   opens   fps   writes   closes   _MWerksCompiler__macross   prefixfilenames   names   Nones   xmlfilenames   mkcwprojects   cwxmlgens   ProjectBuilders
   xmlbuilders   generates   xmldatas   projectfilenames   makeprojects   buildproject(%   s   selfs   target_descs   objectss   output_filenames
   output_dirs	   librariess   library_dirss   runtime_library_dirss   export_symbolss   debugs   extra_preargss   extra_postargss
   build_temps   target_langs   basenames   sourcess   xmldatas
   xmlbuilders
   targetnames   xmlfilenames   dirnames   projectnames
   exportnames   filenames   xmlnames   fps   sourcefilenamess   keys
   prefixnames   sourcefiledirss   include_dirss   names   settingss   values   prefixfilenames   projectfilenames   exportfilename(    (    s5   /mit/python/lib/python2.3/distutils/mwerkscompiler.pys   linkO   s®    








 


 

*
 
*


*c         C   s°   t  i i | ƒ } t i i | ƒ o% t i ƒ  } t i i	 | | ƒ } n t
 i | d ƒ } x< t d t | ƒ ƒ D]% } | | d j o d | | <qs qs Wt
 i	 | d ƒ Sd  S(   Ns   :i   s   ..s    (   s	   distutilss   utils   convert_paths   filenames   oss   paths   isabss   getcwds   curdirs   joins   strings   splits
   componentss   ranges   lens   i(   s   selfs   filenames   is   curdirs
   components(    (    s5   /mit/python/lib/python2.3/distutils/mwerkscompiler.pys   _filename_to_absÍ   s     c         C   s   d Sd S(   sk   Return the compiler option to add 'dir' to the list of
        directories searched for libraries.
        N(    (   s   selfs   dir(    (    s5   /mit/python/lib/python2.3/distutils/mwerkscompiler.pys   library_dir_optionÞ   s     c         C   s   d Sd S(   ss   Return the compiler option to add 'dir' to the list of
        directories searched for runtime libraries.
        N(    (   s   selfs   dir(    (    s5   /mit/python/lib/python2.3/distutils/mwerkscompiler.pys   runtime_library_dir_optionä   s     c         C   s   d Sd S(   s   Return the compiler option to add 'dir' to the list of libraries
        linked into the shared library or executable.
        N(    (   s   selfs   lib(    (    s5   /mit/python/lib/python2.3/distutils/mwerkscompiler.pys   library_optionë   s     c         C   s   d Sd S(   sH  Search the specified list of directories for a static or shared
        library file 'lib' and return the full path to that file.  If
        'debug' true, look for a debugging version (if that makes sense on
        the current platform).  Return None if 'lib' wasn't found in any of
        the specified directories.
        i    N(    (   s   selfs   dirss   libs   debug(    (    s5   /mit/python/lib/python2.3/distutils/mwerkscompiler.pys   find_library_fileñ   s     (   s   __name__s
   __module__s   __doc__s   compiler_types   executabless   _c_extensionss   _cpp_extensionss   _rc_extensionss   _exp_extensions   src_extensionss   res_extensions   obj_extensions   static_lib_extensions   shared_lib_extensions   static_lib_formats   shared_lib_formats   exe_extensions   __init__s   Nones   compiles   links   _filename_to_abss   library_dir_options   runtime_library_dir_options   library_options   find_library_file(    (    (    s5   /mit/python/lib/python2.3/distutils/mwerkscompiler.pys   MWerksCompiler   s,    		
'~				(   s   __doc__s   __revision__s   syss   oss   strings   typess   distutils.errorss   DistutilsExecErrors   DistutilsPlatformErrors   CompileErrors   LibErrors	   LinkErrors   distutils.ccompilers	   CCompilers   gen_preprocess_optionss   gen_lib_optionss   distutils.utils	   distutilss   distutils.dir_utils   logs   mkcwprojects   MWerksCompiler(   s	   CCompilers   DistutilsPlatformErrors   __revision__s   DistutilsExecErrors   strings   gen_preprocess_optionss	   distutilss   gen_lib_optionss	   LinkErrors   syss   MWerksCompilers   mkcwprojects   CompileErrors   oss   LibErrors   log(    (    s5   /mit/python/lib/python2.3/distutils/mwerkscompiler.pys   ?   s   %			