[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AM_SILENT_RULES has no effect
From: |
Bruno Haible |
Subject: |
Re: AM_SILENT_RULES has no effect |
Date: |
Fri, 22 May 2009 12:50:11 +0200 |
User-agent: |
KMail/1.9.9 |
Ralf Wildenhues wrote:
> Try not setting `silent-rules' in Makefile.am at all. It is sufficient
> to only use the macro AM_SILENT_RULES in configure.ac.
>
> The setting in Makefile.am has been turned into an error
So there's definitely two things to fix:
1) The error message is misleading. It is even claiming wrong facts. In this
case, I do have 'silent-rules' as an argument of AM_INIT_AUTOMAKE, and
automake tells me that I should use 'silent-rules' as an argument of
AM_INIT_AUTOMAKE:
$ gnulib-tool --create-testdir --dir=ttt stdint
$ cd ttt
# Edit gllib/Makefile.am, setting AUTOMAKE_OPTIONS = 1.11 gnits
silent-rules
# Edit configure.ac, changing the AM_INIT_AUTOMAKE invocation
# to AM_INIT_AUTOMAKE([silent-rules])
$ aclocal -I glm4
$ autoconf
$ autoheader
$ automake
gllib/Makefile.am:13: option `silent-rules' must be an argument of
AM_INIT_AUTOMAKE
$ echo $?
1
The error message should say to *remove* 'silent-rules' from the Makefile.am
in the first place.
2) The 'silent-rules' option is described in an 'info' section that starts like
this:
Various features of Automake can be controlled by options in the
`Makefile.am'. Such options are applied on a per-`Makefile' basis when
listed in a special `Makefile' variable named `AUTOMAKE_OPTIONS'. They
are applied globally to all processed `Makefiles' when listed in the
first argument of `AM_INIT_AUTOMAKE' in `configure.ac'. Currently
understood options are:
So it is the most natural thing for a user to try to enable it in a
Makefile.am. 'silent-rules' is probably the only automake option that
cannot be used in a Makefile.am? The doc should be explicit about this.
> when the developer has to touch
> configure.ac anyway, then there is little reason to build only part of
> the tree with silent rules
The documentation paragraph cited above gave me the impression that
- The silent-rules feature can be enabled on a per-Makefile basis,
- An additional modification of configure.ac is needed for it to take effect.
Just like for the 'subdir-objects' option, which
- can be enabled on a per-Makefile basis,
- requires the use of AM_PROG_CC_C_O in configure.ac.
So I got the impression that the normal way of using the feature is the one
which you say is impossible. Please fix the documentation! The doc and the
error message completely misled me.
Bruno