From 257b4f0530a37e857346b5a13998c90ede7e7167 Mon Sep 17 00:00:00 2001 From: jlam Date: Fri, 26 Oct 2001 17:03:04 +0000 Subject: If AUTOMAKE_OVERRIDE=YES then we touch files in ${WRKSRC} in such a way that GNU autoconf/automake are not executed during the build process, even if the tools exist in the build environment. This prevents the build process from overwriting any changes made to the configure script or to the Makefile.in files. --- mk/bsd.pkg.mk | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'mk') diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index c31403d791e..ab6aa798fab 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.834 2001/10/26 16:03:26 agc Exp $ +# $NetBSD: bsd.pkg.mk,v 1.835 2001/10/26 17:03:04 jlam Exp $ # # This file is in the public domain. # @@ -1515,6 +1515,29 @@ do-libtool: ${_PKG_SILENT}${_PKG_DEBUG}${TRUE} .endif +.if defined(AUTOMAKE_OVERRIDE) && (${AUTOMAKE_OVERRIDE} == "YES") +# +# Prevent invocation of GNU "auto*" during the build process driven by the +# generated Makefiles by touching various auto{conf,make} source files to +# make them up-to-date. +# +AUTOMAKE_PATTERNS+= *.m4 +AUTOMAKE_PATTERNS+= *.in +AUTOMAKE_PATTERNS+= configure +_AUTOMAKE_PATTERNS_FIND= \ + ${AUTOMAKE_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} | ${XARGS} ${TOUCH} ${TOUCH_ARGS} +. else + ${_PKG_SILENT}${_PKG_DEBUG}${TRUE} +. endif +.endif # AUTOMAKE_OVERRIDE + .if !target(do-configure) do-configure: ${_CONFIGURE_PREREQ} . if defined(HAS_CONFIGURE) @@ -1527,7 +1550,6 @@ do-configure: ${_CONFIGURE_PREREQ} INSTALL_PROGRAM="${INSTALL_PROGRAM}" \ INSTALL_SCRIPT="${INSTALL_SCRIPT}" \ ${CONFIGURE_ENV} ${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS} - . endif . if defined(USE_IMAKE) ${_PKG_SILENT}${_PKG_DEBUG}cd ${WRKSRC} && ${SETENV} ${SCRIPTS_ENV} XPROJECTROOT=${X11BASE} ${XMKMF} -- cgit v1.2.3