Subject: Re: AUTOMAKE_OVERRIDE=YES by default?
To: Nick Hudson <skrll@netbsd.org>
From: Johnny Lam <jlam@jgrind.org>
List: tech-pkg
Date: 12/10/2001 11:47:50
On Mon, Dec 10, 2001 at 05:50:11PM +0000, Nick Hudson wrote:
>
> I not so sure this is the right thing to do (or maybe I don't understand).
> For example this is causing problems in the KDE pkgs which come with patches
> to both Makefile.am and Makefile.in created from a known to work version of
> automake. touch(1)'ing the configure.in and configure.in.in (yes, KDE has
> extended auto{make,conf}) breaks the build for kdelibs.
>
> Why would you ever want to touch these files as they are used to create
> configure, etc?
This was a bug and I've just committed a fix. We want to touch the configure
script last so it's _not_ regenerated. If this doesn't fix the KDE2 packages
then we need to add "AUTOMAKE_OVERRIDE=NO" to the KDE2 package Makefiles.
> I still believe that patches to Makefile.am, configure.in{,.in} *and* the
> generated versions from working versions of auto{conf,make} should be
> commited to pkgsrc. Perhaps an AUTOMAKE_OVERIDE that touches all
> Makefile.in's, a AUTOCONF_OVERRIDE that touches configure, and an
> AUTOHEADER_OVERRIDE that touches config.h.in should be created to make sure
> the timestamps are correct.
It's easy to extend what's in bsd.pkg.mk. So what you're describing is
replacing the AUTOMAKE_OVERRIDE code with something like:
AUTOMAKE_OVERRIDE?= YES
.if defined(AUTOMAKE_OVERRIDE) && (${AUTOMAKE_OVERRIDE} == "YES")
AUTOMAKE_PATTERNS+= Makefile.in configure.in *.m4 config.h.in
AUTOCONF_PATTERNS+= ${CONFIGURE_SCRIPT:T}
_AUTOMAKE_PATTERNS_FIND= \
\( ${AUTOMAKE_PATTERNS:S/$/!/:S/^/-o -name !/:S/!/"/g:S/-o//1} \)
_AUTOCONF_PATTERNS_FIND= \
\( ${AUTOCONF_PATTERNS:S/$/!/:S/^/-o -name !/:S/!/"/g:S/-o//1} \)
_CONFIGURE_PREREQ+= suppress-automake
suppress-automake:
. if defined(HAS_CONFIGURE)
${_PKG_SILENT}${_PKG_DEBUG} \
cd ${WRKSRC}; \
${FIND} . ${_AUTOMAKE_PATTERNS_FIND} -print | \
${XARGS} ${TOUCH} ${TOUCH_ARGS}
${FIND} . ${_AUTOCONF_PATTERNS_FIND} -print | \
${XARGS} ${TOUCH} ${TOUCH_ARGS}
. else
${_PKG_SILENT}${_PKG_DEBUG}${TRUE}
. endif
.endif # AUTOMAKE_OVERRIDE
This makes a distinction between the files generated by automake and the
file generated by autoconf and ensures that the autoconf files are touched
last.
> Final thing is that some pkgs are going to come with autoconf 2.52 generated
> configures (including KDE) which our current pkgsrc autoconf (2.32) just will
> not handle. The same may be true of automake 1.5/1.4p5. Another reason to
> commit generated configures, etc...
I fully agree. We need to sweep though pkgsrc so as not to depend on
autoconf during build.
-- Johnny Lam <jlam@jgrind.org>