[Python-checkins] python/dist/src/Lib/distutils/command build_ext.py,1.83,1.84

jhylton@users.sourceforge.net jhylton@users.sourceforge.net
Thu, 13 Jun 2002 10:32:29 -0700


Update of /cvsroot/python/python/dist/src/Lib/distutils/command
In directory usw-pr-cvs1:/tmp/cvs-serv31001

Modified Files:
	build_ext.py 
Log Message:
Extend dependency tracking so that .o files are rebuilt.

Two new tests are needed:

Don't skip building an extension if any of the depends files are newer
than the target.

Pass ext.depends to compiler.compile() so that it can track individual
files.




Index: build_ext.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/command/build_ext.py,v
retrieving revision 1.83
retrieving revision 1.84
diff -C2 -d -r1.83 -r1.84
*** build_ext.py	12 Jun 2002 20:08:56 -0000	1.83
--- build_ext.py	13 Jun 2002 17:32:20 -0000	1.84
***************
*** 389,393 ****
  
      def build_extensions(self):
- 
          # First, sanity-check the 'extensions' list
          self.check_extensions_list(self.extensions)
--- 389,392 ----
***************
*** 397,401 ****
  
      def build_extension(self, ext):
- 
          sources = ext.sources
          if sources is None or type(sources) not in (ListType, TupleType):
--- 396,399 ----
***************
*** 422,426 ****
              ext_filename = os.path.join(self.build_lib,
                                          self.get_ext_filename(fullname))
- 
          depends = sources + ext.depends
          if not (self.force or newer_group(depends, ext_filename, 'newer')):
--- 420,423 ----
***************
*** 468,472 ****
                                          include_dirs=ext.include_dirs,
                                          debug=self.debug,
!                                         extra_postargs=extra_args)
  
          # XXX -- this is a Vile HACK!
--- 465,470 ----
                                          include_dirs=ext.include_dirs,
                                          debug=self.debug,
!                                         extra_postargs=extra_args,
!                                         depends=ext.depends)
  
          # XXX -- this is a Vile HACK!