summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorjlam <jlam>2006-01-03 00:41:51 +0000
committerjlam <jlam>2006-01-03 00:41:51 +0000
commitffe18c8fb90279084e76bb45f88401e81335cce3 (patch)
tree935843a36cce74c02a3ed2dfa898a15c7191f2cb /mk
parentae833a2fa25cffaba3d7f78aa4fba75d1b7042d9 (diff)
downloadpkgsrc-ffe18c8fb90279084e76bb45f88401e81335cce3.tar.gz
Instead of patching the generated config.status script, patch the GNU
configure script itself so that the generated config.status script does what we want (just exit if asked to "recheck"). This ensures the timestamp for config.status is earlier than the timestamps for the files that config.status generates (Makefile, config.h, etc.). This fixes some problems where some packages end up "rebuilding" as part of the install target, which makes the rebuilt files owned by root and makes cleaning the work directory fail.
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.pkg.mk56
1 files changed, 27 insertions, 29 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index b98d18bb178..6940c9bf26d 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1780 2006/01/02 23:24:58 dmcmahill Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1781 2006/01/03 00:41:51 jlam Exp $
#
# This file is in the public domain.
#
@@ -690,13 +690,11 @@ CONFIG_SUB_OVERRIDE?= \
config.sub */config.sub */*/config.sub
CONFIG_RPATH_OVERRIDE?= # set by platform file as needed
#
-# By default, override config.status for GNU configure packages. We
-# never want it to execute after the configure phase has ended as it
-# might overwrite any post-configure changes we might have made to the
-# generated files.
+# By default, override GNU configure scripts so that the generated
+# config.status scripts never do anything on "recheck".
#
-CONFIG_STATUS_OVERRIDE?= \
- config.status */config.status */*/config.status
+CONFIGURE_SCRIPTS_OVERRIDE?= \
+ configure */configure */*/configure
.endif
#
@@ -1761,6 +1759,28 @@ do-config-star-override:
. endif
.endif
+.if defined(CONFIGURE_SCRIPTS_OVERRIDE)
+_CONFIGURE_PREREQ+= do-configure-scripts-override
+.PHONY: do-configure-scripts-override
+do-configure-scripts-override:
+. for _pattern_ in ${CONFIGURE_SCRIPTS_OVERRIDE}
+ ${_PKG_SILENT}${_PKG_DEBUG}cd ${WRKSRC}; \
+ for file in ${_pattern_}; do \
+ if ${TEST} -f "$$file"; then \
+ ${AWK} '/ *-recheck *\| *--recheck.*\)/ { \
+ print; \
+ print " # Avoid regenerating for rechecks on pkgsrc"; \
+ print " exit 0"; \
+ next; \
+ } \
+ { print }' $$file > $$file.override && \
+ ${CHMOD} +x $$file.override && \
+ ${MV} -f $$file.override $$file; \
+ fi; \
+ done
+. endfor
+.endif
+
PKGCONFIG_OVERRIDE_SED= \
'/^Libs:.*[ ]/s|-L\([ ]*[^ ]*\)|${COMPILER_RPATH_FLAG}\1 -L\1|g'
PKGCONFIG_OVERRIDE_STAGE?= pre-configure
@@ -1848,28 +1868,6 @@ do-libtool-override:
. endif
.endif
-.if defined(CONFIG_STATUS_OVERRIDE)
-_CONFIGURE_POSTREQ+= do-config-status-override
-.PHONY: do-config-status-override
-do-config-status-override:
-. for _pattern_ in ${CONFIG_STATUS_OVERRIDE}
- ${_PKG_SILENT}${_PKG_DEBUG}cd ${WRKSRC}; \
- for file in ${_pattern_}; do \
- if [ -f "$$file" ]; then \
- ${MV} -f $$file $$file.overridden; \
- ${AWK} '/ *-recheck *\| *--recheck.*\)/ { \
- print; \
- print " exit 0"; \
- next; \
- } \
- { print } \
- ' $$file.overridden > $$file; \
- ${CHMOD} +x $$file; \
- fi; \
- done
-. endfor
-.endif
-
.PHONY: post-configure
post-configure: ${_CONFIGURE_POSTREQ}