
Consider the object_filenames method: def object_filenames (self, source_filenames, strip_dir=0, output_dir=''): if output_dir is None: output_dir = '' obj_names = [] for src_name in source_filenames: (base, ext) = os.path.splitext (src_name) if ext not in self.src_extensions: continue ^^^^^^^^^ Problem is here if strip_dir: base = os.path.basename (base) obj_names.append (os.path.join (output_dir, base + self.obj_extension)) return obj_names # object_filenames () If you specify a source-file with an unknown extension in the sources list, you later get a traceback later saying something like 'sources and targets must have the same length'. IMO we have two possibilities here: - assume that 'ext' is something which should be passed to the linker - raise an error like 'Don't know how to compile this file' Thomas Heller ION-TOF GmbH

On 23 June 2000, Thomas Heller said:
Consider the object_filenames method: [...] if ext not in self.src_extensions: continue ^^^^^^^^^ Problem is here [...] If you specify a source-file with an unknown extension in the sources list, you later get a traceback later saying something like 'sources and targets must have the same length'. IMO we have two possibilities here: - assume that 'ext' is something which should be passed to the linker - raise an error like 'Don't know how to compile this file'
I like the second option: if X is a source file, then the linker almost by definition doesn't know what to do with it. Linkers don't deal with source, that's what compilers are for. (At least on the platforms that I'm familiar with, which is not many!) And of course, there's a precedent in your resource-file patch... ;-) Greg -- Greg Ward - Linux weenie gward@python.net http://starship.python.net/~gward/ Quick!! Act as if nothing has happened!
participants (2)
-
Greg Ward
-
Thomas Heller