[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 2nd possibly silly question: XTRA_foo_SOURCES

From: Robert Collins
Subject: Re: 2nd possibly silly question: XTRA_foo_SOURCES
Date: Fri, 6 Apr 2001 08:01:19 +1000

----- Original Message -----
From: "Tom Tromey" <address@hidden>
To: "Robert Collins" <address@hidden>
Cc: <address@hidden>
Sent: Friday, April 06, 2001 3:25 AM
Subject: Re: 2nd possibly silly question: XTRA_foo_SOURCES

> >>>>> "Robert" == Robert Collins <address@hidden>
> Robert> squid_SOURCES = \
> Robert> access_log.c acl.c asn.c auth_modules.c authenticate.c
> Robert> cf_parser.h \
> Robert> disk.c @DNS_SOURCE@ errorpage.c
> You can't use a configure substitution in a _SOURCES variable.
> This is a very common mistake :-(
> One workaround would be to use automake conditionals instead of
> configure substitutions.
> Tom

I'm now using conditionals. And I have a Makefile > 6000 lines lone
(170Kb).  (I'm not whining about that in this email :} as I understand a
fix is in the pipeline.) [and I understand pipelines :]

I'm throwing peanuts from the gallery here (and I know that I'm doing
that :]).

1) The
documentation implies that _SOURCES can take the same style of late
bound entries as _PROGRAMS and _LIBRARIES can, as long as
EXTRA_foo_SOURCES contains all possible entries.
- This probably leads to the common mistake.
(relevant quote:
Automake must know all the source files that could possibly go into a
program, even if not all the files are built in every circumstance. Any
files which are only conditionally built should be listed in the
appropriate `EXTRA_' variable. For instance, if `hello-linux.c' were
conditionally included in hello, the `' would contain:
EXTRA_hello_SOURCES = hello-linux.c
Similarly, sometimes it is useful to determine the programs that are to
be built at configure time. For instance, GNU cpio only builds mt and
rmt under special circumstances. In this case, you must notify automake
of all the programs that can possibly be built, but at the same time
cause the generated `' to use the programs specified by
configure. This is done by having configure substitute values into each
`_PROGRAMS' definition, while listing all optionally built programs in

2) I don't understand why there is a fundamental difference between
_PROGRAMS (allows configure substitutions both directly and indirectly
($(CONFGSUBSTVAR)) and _SOURCES wihch doesn't.
- Working on the principle of least surprise, this fails :].


reply via email to

[Prev in Thread] Current Thread [Next in Thread]