[Mesa-dev] [PATCH 2/2] build: Enable maintainer mode
Michel Dänzer
michel at daenzer.net
Fri Sep 14 03:12:33 PDT 2012
On Fre, 2012-09-14 at 11:49 +0200, Thierry Reding wrote:
> On Fri, Sep 14, 2012 at 10:05:44AM +0200, Michel Dänzer wrote:
> > On Fre, 2012-09-14 at 09:58 +0200, Thierry Reding wrote:
> > > On Fri, Sep 14, 2012 at 09:45:54AM +0200, Michel Dänzer wrote:
> > > > On Fre, 2012-09-14 at 09:22 +0200, Thierry Reding wrote:
> > > > > When running the configure script from autogen.sh, enable the maintainer
> > > > > mode by passing --enable-maintainer-mode. This activates some rules to
> > > > > regenerate autotools files automatically.
> > > > > ---
> > > > > autogen.sh | 2 +-
> > > > > configure.ac | 1 +
> > > > > 2 files changed, 2 insertions(+), 1 deletion(-)
> > > > >
> > > > > diff --git a/autogen.sh b/autogen.sh
> > > > > index 626d213..9d3fb60 100755
> > > > > --- a/autogen.sh
> > > > > +++ b/autogen.sh
> > > > > @@ -10,5 +10,5 @@ autoreconf -v --install || exit 1
> > > > > cd $ORIGDIR || exit $?
> > > > >
> > > > > if test -z "$NOCONFIGURE"; then
> > > > > - "$srcdir"/configure "$@"
> > > > > + "$srcdir"/configure "$@" --enable-maintainer-mode
> > > > > fi
> > > > > diff --git a/configure.ac b/configure.ac
> > > > > index 184d1ed..1451e83 100644
> > > > > --- a/configure.ac
> > > > > +++ b/configure.ac
> > > > > @@ -12,6 +12,7 @@ AC_CONFIG_AUX_DIR([bin])
> > > > > AC_CONFIG_MACRO_DIR([m4])
> > > > > AC_CANONICAL_SYSTEM
> > > > > AM_INIT_AUTOMAKE([foreign])
> > > > > +AM_MAINTAINER_MODE
> > > >
> > > > AFAIK AM_MAINTAINER_MODE disables those rules by default in the first
> > > > place, requiring --enable-maintainer-mode to be passed to configure to
> > > > enable them again. AFAIR this is to avoid the rules triggering
> > > > spuriously from disted tarball trees. Is that still an issue these days?
> > > > If so, the change is probably fine, as it's what most autotools projects
> > > > seem to do. But the commit message is slightly misleading.
> > >
> > > You're right, the commit message could be a bit more explicit. How about
> > > something like this:
> > >
> > > build: Add support for maintainer mode
> > >
> > > The maintainer mode can be used to activate some rules that regenerate
> > > autotools files automatically. It is useful for developers working on
> > > Mesa because automatically takes care of for example regenerating
> > > Makefile.in and Makefile from a modified Makefile.am. The configure
> > > script is also one of the files that is automatically recreated and re-
> > > run if configure.ac is modified.
> > >
> > > By default, the maintainer mode is disabled. It can be enabled with the
> > > --enable-maintainer-mode configure script option. This commit updates
> > > the autogen.sh script to enable maintainer mode by default when
> > > bootstrapping from a git clone.
> >
> > That's more explicit, but it still sort of implies that the automatic
> > regeneration doesn't happen without this change. But it does, doesn't
> > it?
>
> Not as far as I know. Unless you add AM_MAINTAINER_MODE and run
> configure with --enable-maintainer-mode you won't get automatic
> regeneration.
>
> In fact that's the reason why I added this patch. While working on the
> cross-compile patch I noticed that the Makefile didn't get regenerated
> when the Makefile.am was modified.
Weird, that's working for me... I haven't had to re-run autogen.sh or
anything like that in a while.
So, I'm worrying that your change might actually cause problems, because
experience with other projects shows that some people will inevitably
end up losing --enable-maintainer-mode somehow and running into weird
breakage after updating from Git.
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Debian, X and DRI developer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20120914/23469b13/attachment.pgp>
More information about the mesa-dev
mailing list