[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Couldn't depcomp use SUNPRO_DEPENDENCIES for GCC 2.x?
From: |
Jamie Lokier |
Subject: |
Couldn't depcomp use SUNPRO_DEPENDENCIES for GCC 2.x? |
Date: |
Sat, 21 Feb 2004 02:54:09 +0000 |
User-agent: |
Mutt/1.4.1i |
Dear Automake maintains,
Automake includes a script called "depcomp" which is used to compile
programs and simultaneously maintain automatic makefile dependencies.
In the script are these comments, for GCC 2.x:
gcc)
## There are various ways to get dependency output from gcc. Here's
## why we pick this rather obscure method:
## - Don't want to use -MD because we'd like the dependencies to end
## up in a subdir. Having to rename by hand is ugly.
## (We might end up doing this anyway to support other compilers.)
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
## -MM, not -M (despite what the docs say).
## - Using -M directly means running the compiler twice (even worse
## than renaming).
It then proceeds to do something very complicated involving a lot of
assumptions about the format of paths.
In my own makefiles, I have used the SUNPRO_DEPENDENCIES environment
variable to maintain dependencies with GCC 2.x, with no need for
complex post-processing.
Probably the author of "depcomp" didn't use SUNPRO_DEPENDENCIES
because until recently it wasn't documented. However, it's been in
GCC since very long ago - I was using it as far back as 1995, and it
hasn't changed meaning in that time.
SUNPRO_DEPENDENCIES is like DEPENDENCIES_OUTPUT, except it is more
like -M than -MM. Therefore it might be exactly the right thing for
"depcomp", allowing the "rather obscure method" to be discarded and
using much simpler code, just like the GCC 3.x case a few lines
above.
Regards,
-- Jamie
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Couldn't depcomp use SUNPRO_DEPENDENCIES for GCC 2.x?,
Jamie Lokier <=