summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorjlam <jlam>2001-10-26 17:03:04 +0000
committerjlam <jlam>2001-10-26 17:03:04 +0000
commit257b4f0530a37e857346b5a13998c90ede7e7167 (patch)
treedf3d09fa2f101f4524f95eb147c76bd6cc4c3c84 /mk
parent661f446f923a2fb0cade7e11ecb10fb9fe2d51e2 (diff)
downloadpkgsrc-257b4f0530a37e857346b5a13998c90ede7e7167.tar.gz
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.
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.pkg.mk26
1 files changed, 24 insertions, 2 deletions
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}