[Python-checkins] python/dist/src/Lib/distutils emxccompiler.py,1.4,1.5
jhylton@users.sourceforge.net
jhylton@users.sourceforge.net
Tue, 18 Jun 2002 11:46:46 -0700
Update of /cvsroot/python/python/dist/src/Lib/distutils
In directory usw-pr-cvs1:/tmp/cvs-serv11186
Modified Files:
emxccompiler.py
Log Message:
Add implementation of _compile() and use default compile() method.
Index: emxccompiler.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/emxccompiler.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** emxccompiler.py 13 Jun 2002 17:28:18 -0000 1.4
--- emxccompiler.py 18 Jun 2002 18:46:44 -0000 1.5
***************
*** 77,115 ****
# __init__ ()
! # not much different of the compile method in UnixCCompiler,
! # but we have to insert some lines in the middle of it, so
! # we put here a adapted version of it.
! # (If we would call compile() in the base class, it would do some
! # initializations a second time, this is why all is done here.)
!
! def compile(self, sources,
! output_dir=None, macros=None, include_dirs=None, debug=0,
! extra_preargs=None, extra_postargs=None, depends=None):
!
! macros, objects, extra_postargs, pp_opts, build = \
! self._setup_compile(output_dir, macros, include_dirs, sources,
! depends, extra_postargs)
! cc_args = self._get_cc_args(pp_opts, debug, extra_preargs)
!
! for obj, (src, ext) in build.items():
! if ext == '.rc':
! # gcc requires '.rc' compiled to binary ('.res') files !!!
! try:
! self.spawn (["rc","-r",src])
! except DistutilsExecError, msg:
! raise CompileError, msg
! else: # for other files use the C-compiler
! try:
! self.spawn (self.compiler_so + cc_args +
! [src, '-o', obj] +
! extra_postargs)
! except DistutilsExecError, msg:
! raise CompileError, msg
!
! # Return *all* object filenames, not just the ones we just built.
! return objects
!
! # compile ()
!
def link (self,
--- 77,93 ----
# __init__ ()
! def _compile(self, obj, src, ext, cc_args, extra_postargs):
! if ext == '.rc':
! # gcc requires '.rc' compiled to binary ('.res') files !!!
! try:
! self.spawn(["rc", "-r", src])
! except DistutilsExecError, msg:
! raise CompileError, msg
! else: # for other files use the C-compiler
! try:
! self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
! extra_postargs)
! except DistutilsExecError, msg:
! raise CompileError, msg
def link (self,