[Python-Dev] addressing distutils inability to track file dependencies

Martin v. Loewis martin@v.loewis.de
18 Jun 2002 00:03:12 +0200


Guido van Rossum <guido@python.org> writes:

> I don't recall that you explained the meaning of the
> SUNPRO_DEPENDENCIES variable, only that it was undocumented and did
> something similar to GCC's -M.  That's hardly enough. :-)

I see :-) Suppose you have a file x.c, and you invoke

   env SUNPRO_DEPENDENCIES="x.deps build/x.o" gcc -c -o x.o x.c

then a file x.deps is generated, and has, on the left-hand side of the
dependency rule, build/x.o. It works the same way for compilers
identifying themselves as

cc: Sun WorkShop 6 update 1 C 5.2 2000/09/11

when invoked with -V. I can't give a complete list of compilers that
support that feature, but setting the variable can't hurt - the worst
case is that it is ignored.

Regards,
Martin