pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk Default to overriding config.status after GNU confi...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/2019474e649f
branches:  trunk
changeset: 468485:2019474e649f
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Sat Feb 14 13:54:28 2004 +0000

description:
Default to overriding config.status after GNU configure has been run.  We
don't want it to execute during the build phase as it might overwrite
post-configure changes we might have made to the generated files.  Packages
that don't want this behaviour can simply set:

        CONFIG_STATUS_OVERRIDE= # empty

in the package Makefile.

diffstat:

 mk/bsd.pkg.mk |  27 ++++++++++++++++++++-------
 1 files changed, 20 insertions(+), 7 deletions(-)

diffs (49 lines):

diff -r f1c59fae3c23 -r 2019474e649f mk/bsd.pkg.mk
--- a/mk/bsd.pkg.mk     Sat Feb 14 13:49:25 2004 +0000
+++ b/mk/bsd.pkg.mk     Sat Feb 14 13:54:28 2004 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.pkg.mk,v 1.1399 2004/02/14 03:26:09 grant Exp $
+#      $NetBSD: bsd.pkg.mk,v 1.1400 2004/02/14 13:54:28 jlam Exp $
 #
 # This file is in the public domain.
 #
@@ -1290,6 +1290,14 @@
 #
 CONFIG_GUESS_OVERRIDE?=        ${WRKSRC}/config.guess
 CONFIG_SUB_OVERRIDE?=  ${WRKSRC}/config.sub
+#
+# 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.
+#
+CONFIG_STATUS_OVERRIDE?=       \
+       config.status */config.status */*/config.status
 .endif
 
 #
@@ -2442,13 +2450,18 @@
 _CONFIGURE_POSTREQ+=   do-config-status-override
 .PHONY: do-config-status-override
 do-config-status-override:
-.  for file in ${CONFIG_STATUS_OVERRIDE}
+.  for _pattern_ in ${CONFIG_STATUS_OVERRIDE}
        ${_PKG_SILENT}${_PKG_DEBUG}                                     \
-       if [ -f ${WRKSRC}/${file} ]; then                               \
-               ${RM} -f ${WRKSRC}/${file};                             \
-               ( ${ECHO} '#!${SH}'; ${ECHO} 'exit 0' ) > ${WRKSRC}/${file}; \
-               ${CHMOD} +x ${WRKSRC}/${file};                          \
-       fi
+       for file in ${_pattern_}; do                                    \
+               if [ -f "${WRKSRC}/$$file" ]; then                      \
+                       ${RM} -f ${WRKSRC}/$$file;                      \
+                       (${ECHO} '#!${SH}';                             \
+                        ${ECHO} '${ECHO} "$$0 $$@" >> ${WRKLOG}';      \
+                        ${ECHO} 'exit 0';                              \
+                       ) > ${WRKSRC}/$$file;                           \
+                       ${CHMOD} +x ${WRKSRC}/$$file;                   \
+               fi;                                                     \
+       done
 .  endfor
 .endif
 



Home | Main Index | Thread Index | Old Index