Subject: bug#26100: Switch from Automake to GNU Make

From: Glenn Morris <[email-masked]>
Date: Wed, 15 Mar 2017 20:10:25 -0400

Paul Eggert wrote:

> Attached is a patch to change the Emacs build procedure to use GNU
> Make instead of Automake

Thanks, great news! Nitpicks below.

> --- a/Makefile.in
> +++ b/Makefile.in
> @@ -73,10 +73,6 @@ CDPATH=
>  cache_file = @cache_file@
>  CONFIGURE_FLAGS = --cache-file=$(cache_file)
>  
> -AUTOCONF = @AUTOCONF@
[...]
> -AUTOCONF_INPUTS = $(srcdir)/configure.ac $(srcdir)/aclocal.m4
> -
> -$(srcdir)/configure: $(AUTOCONF_INPUTS)
> -	cd ${srcdir} && ${AUTOCONF}
> -
[...]
> +$(srcdir)/configure $(srcdir)/src/stamp-h.in: \
> +  $(srcdir)/configure.ac $(srcdir)/m4/*.m4
> +	cd $(srcdir) && ./autogen.sh autoconf

autogen.sh passes "-f" to autoreconf, so the new version will be more
aggressive about updating than the old version was. (Also, this hunk
isn't directly related to the overall change, is it?)

>  $(srcdir)/src/config.in: $(srcdir)/src/stamp-h.in
>  	@ # Usually, there's no need to rebuild src/config.in just
>  	@ # because stamp-h.in has changed (since building stamp-h.in
>  	@ # refreshes config.in as well), but if config.in is missing
>  	@ # then we really need to do something more.
> -	$(if $(wildcard $@),,cd $(srcdir) && $(AUTOHEADER))
> -$(srcdir)/src/stamp-h.in: $(AUTOCONF_INPUTS)
> -	cd ${srcdir} && ${AUTOHEADER}
> -	rm -f $@
> -	echo timestamp > $@
> +	$(if $(wildcard $@),,cd $(srcdir) && ./autogen.sh autoconf)

Likewise?

> diff --git a/autogen.sh b/autogen.sh
> index bb3f818..f8e71cb 100755
> --- a/autogen.sh
> +++ b/autogen.sh
[...]
> -  autoreconf -fi -I m4 || exit $?
> +  autoreconf -fi -I m4 || exit

Also unrelated?

[New files:]
> build-aux/config.guess
> build-aux/config.sub
> build-aux/install-sh

It's a tiny bit disappointing that we need to version these again
(you removed them in 2011).