pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk Instead of removing error and warning messages, the...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/127779e8ca6c
branches:  trunk
changeset: 519608:127779e8ca6c
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Fri Oct 06 19:05:43 2006 +0000

description:
Instead of removing error and warning messages, they are collected in
.error-done and .warning-done, so they can be inspected later.

diffstat:

 mk/bsd.pkg.error.mk |  16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diffs (45 lines):

diff -r 313d633a9647 -r 127779e8ca6c mk/bsd.pkg.error.mk
--- a/mk/bsd.pkg.error.mk       Fri Oct 06 19:04:37 2006 +0000
+++ b/mk/bsd.pkg.error.mk       Fri Oct 06 19:05:43 2006 +0000
@@ -1,7 +1,9 @@
-# $NetBSD: bsd.pkg.error.mk,v 1.2 2006/06/14 15:09:34 jlam Exp $
+# $NetBSD: bsd.pkg.error.mk,v 1.3 2006/10/06 19:05:43 rillig Exp $
 
-ERROR_DIR=     ${WRKDIR}/.error
-WARNING_DIR=   ${WRKDIR}/.warning
+ERROR_DIR=             ${WRKDIR}/.error
+WARNING_DIR=           ${WRKDIR}/.warning
+_ERROR_DONE_DIR=       ${WRKDIR}/.error-done
+_WARNING_DONE_DIR=     ${WRKDIR}/.warning-done
 
 # Macros for outputting delayed error and warning messages that are
 # picked up by the error-check target and can be used in place of
@@ -10,8 +12,8 @@
 DELAYED_ERROR_MSG?=    ${ECHO} >> ${ERROR_DIR}/${.TARGET:T:C/^[.]*//:Q}
 DELAYED_WARNING_MSG?=  ${ECHO} >> ${WARNING_DIR}/${.TARGET:T:C/^[.]*//:Q}
 
-makedirs: ${ERROR_DIR} ${WARNING_DIR}
-${ERROR_DIR} ${WARNING_DIR}:
+makedirs: ${ERROR_DIR} ${WARNING_DIR} ${_ERROR_DONE_DIR} ${_WARNING_DONE_DIR}
+${ERROR_DIR} ${WARNING_DIR} ${_ERROR_DONE_DIR} ${_WARNING_DONE_DIR}:
        ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET}
 
 .PHONY: error-check
@@ -35,7 +37,7 @@
                break;                                                  \
        done;                                                           \
        ${CAT} ./* | ${WARNING_CAT};                                    \
-       ${RM} -f ./*
+       ${MV} -f ./* ${_WARNING_DONE_DIR}
 
        ${_PKG_SILENT}${_PKG_DEBUG}                                     \
        ${RM} -f ${ERROR_DIR}/*.tmp;                                    \
@@ -47,7 +49,7 @@
        done;                                                           \
        ${CAT} * | ${ERROR_CAT};                                        \
        if ${_NONZERO_FILESIZE_P} ./*; then                             \
-               ${RM} -f ./*;                                           \
+               ${MV} -f ./* ${_ERROR_DONE_DIR};                        \
                exit 1;                                                 \
        fi
 



Home | Main Index | Thread Index | Old Index