This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: 3rd PATCH to pre-select languages to be built
Thanks to all who commented on this patch.
On nil, 26 October 1998, 04:02:49, oliva@dcc.unicamp.br wrote:
> Manfred Hollstein <manfred@s-direktnet.de> writes:
>
> > +if test "${enable_languages+set}" != set; then
>
> Please make that:
>
> > +if test x"${enable_languages+set}" != xset; then
>
> This avoids ugly errors if enable_languages happens to be set to
> something that starts with `-' or `!'.
>
> Similarly for other tests.
>
Yep, I'll do.
>
> WRT to the problem of empty Makefiles, how about using a trick similar
> to the one that automake uses in order to create conditional blocks
> within Makefiles.
As Dave and Jeff mentionened, the empty Makefile is a bad idea (it
wasn't obvious to me, as I'm always building completely outside of
${srcdir}, hence I don't need a "make distclean" - rm -rf ... is
sufficient ;-). I'll re-work the stuff to get something like this:
# This will be set by configure to "enabled" if the compiler for
# this particular language has been built, or to "disabled" if not.
LANG_ENABLED = @lang_enabled@
all: all.$(LANG_ENABLED)
all.enabled: <list of all dependencies>
<commands for this target>
all.disabled:
@echo Nothing to be done for target `echo $@ | sed -e 's,\.disabled,,'` >&2
@true
Similar rules are necessary for the "check", "info", "install",
"install-info", ... targets.
How about that?
>
>
> Makefile.in could contain, for example:
>
> all: # just to make sure it is a valid target
> @CONDITIONAL@all: ...
> ...
>
> Then @CONDITIONAL@ could be AC_SUBSTed as an empty string or as
> `disabled-'. The same would apply to install, install-info and other
> targets I may have forgotten about
>
> --
> Alexandre Oliva
> mailto:oliva@dcc.unicamp.br mailto:oliva@gnu.org mailto:aoliva@acm.org
> http://www.dcc.unicamp.br/~oliva
> Universidade Estadual de Campinas, SP, Brasil
>