diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2001-06-19 21:23:11 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2001-06-19 21:23:11 (GMT) |
commit | 9020bcebc875463f1acec1b14949db35e1e68ad6 (patch) | |
tree | 93a1d063ab3655d4348a97f8fe764fda35f2ddcd /Lib | |
parent | 97df7b61f2873ad78760efd5c0ce182ef07be9ee (diff) | |
download | cpython-9020bcebc875463f1acec1b14949db35e1e68ad6.zip cpython-9020bcebc875463f1acec1b14949db35e1e68ad6.tar.gz cpython-9020bcebc875463f1acec1b14949db35e1e68ad6.tar.bz2 |
- _filename_to_abs() didn't cater for .. components in the pathname. Fixed.
- compile() didn't return a (empty) list of objects. Fixed.
- the various _fix_xxx_args() methods weren't called (are they new or did I overlook them?). Fixed.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/distutils/mwerkscompiler.py | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/Lib/distutils/mwerkscompiler.py b/Lib/distutils/mwerkscompiler.py index 1b41671..46e16e2 100644 --- a/Lib/distutils/mwerkscompiler.py +++ b/Lib/distutils/mwerkscompiler.py @@ -62,10 +62,13 @@ class MWerksCompiler (CCompiler) : debug=0, extra_preargs=None, extra_postargs=None): + (output_dir, macros, include_dirs) = \ + self._fix_compile_args (output_dir, macros, include_dirs) self.__sources = sources self.__macros = macros self.__include_dirs = include_dirs # Don't need extra_preargs and extra_postargs for CW + return [] def link (self, target_desc, @@ -80,6 +83,11 @@ class MWerksCompiler (CCompiler) : extra_preargs=None, extra_postargs=None, build_temp=None): + # First fixup. + (objects, output_dir) = self._fix_object_args (objects, output_dir) + (libraries, library_dirs, runtime_library_dirs) = \ + self._fix_lib_args (libraries, library_dirs, runtime_library_dirs) + # First examine a couple of options for things that aren't implemented yet if not target_desc in (self.SHARED_LIBRARY, self.SHARED_OBJECT): raise DistutilsPlatformError, 'Can only make SHARED_LIBRARY or SHARED_OBJECT targets on the Mac' @@ -200,6 +208,11 @@ class MWerksCompiler (CCompiler) : if not os.path.isabs(filename): curdir = os.getcwd() filename = os.path.join(curdir, filename) - return filename + # Finally remove .. components + components = string.split(filename, ':') + for i in range(1, len(components)): + if components[i] == '..': + components[i] = '' + return string.join(components, ':') |