[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 2nd possibly silly question: XTRA_foo_SOURCES
From: |
Tom Tromey |
Subject: |
Re: 2nd possibly silly question: XTRA_foo_SOURCES |
Date: |
07 Apr 2001 14:36:27 -0600 |
>>>>> "Robert" == Robert Collins <address@hidden> writes:
Robert> 1) The
Robert> http://www.gnu.org/manual/automake/html_mono/automake.html
Robert> documentation implies that _SOURCES can take the same style of
Robert> late bound entries as _PROGRAMS and _LIBRARIES can, as long as
Robert> EXTRA_foo_SOURCES contains all possible entries.
Thanks. Can you suggest a doc patch?
Robert> 2) I don't understand why there is a fundamental difference between
Robert> _PROGRAMS (allows configure substitutions both directly and indirectly
Robert> ($(CONFGSUBSTVAR)) and _SOURCES wihch doesn't.
Robert> - Working on the principle of least surprise, this fails :].
Yeah, that's a tough one.
However the two cases are different. Suppose you have @FOO@ in
_PROGRAMS. When configure computes FOO, it is putting program names
in there. These can be directly substituted into the Makefile,
because those same program names will be actual targets.
Now consider @FOO@ in a _SOURCES variable. In this case configure
will compute `FOO = something.c' -- but the actual target name is
`something.o', and there is no portable way (I think) to do the .c ->
.o mapping at make time. (Maybe $(FOO:.c=.o) is portable. But that
neglects .cc, .f77, .java, etc, etc.)
In essence the difference is that automake has to do more processing
of _SOURCES than _PROGRAMS. I agree this distinction is confusing for
the user though.
Tom