diff options
Diffstat (limited to 'mk/check/check-files.mk')
-rw-r--r-- | mk/check/check-files.mk | 49 |
1 files changed, 24 insertions, 25 deletions
diff --git a/mk/check/check-files.mk b/mk/check/check-files.mk index 976a76c3e92..3def14b5745 100644 --- a/mk/check/check-files.mk +++ b/mk/check/check-files.mk @@ -1,4 +1,4 @@ -# $NetBSD: check-files.mk,v 1.2 2006/06/07 20:28:59 jlam Exp $ +# $NetBSD: check-files.mk,v 1.3 2006/06/09 13:59:08 jlam Exp $ .if defined(PKG_DEVELOPER) CHECK_FILES?= yes @@ -65,7 +65,7 @@ _CHECK_FILES_SKIP_FILTER= ${GREP} -vx ${CHECK_FILES_SKIP:@f@-e ${f:Q}@} # These are the files generated and used by the check-files implementation # used across several check-files targets. # -# _CHECK_FILES_COOKIE.* are the cookie files that contain the error +# _CHECK_FILES_ERRMSG.* are the files that contain the error # messages discovered during each stage of file-checking. # # _CHECK_FILES_PRE.* are the file lists generated before any files @@ -77,23 +77,23 @@ _CHECK_FILES_SKIP_FILTER= ${GREP} -vx ${CHECK_FILES_SKIP:@f@-e ${f:Q}@} # The "pre" and "post" file lists are compared against each other to # determine if the package is installing files where it shouldn't be. # -_CHECK_FILES_COOKIE.prefix= ${WRKDIR}/.check_files_prefix_cookie +_CHECK_FILES_ERRMSG.prefix= ${ERROR_DIR}/check-files-prefix _CHECK_FILES_PRE.prefix= ${WRKDIR}/.prefix.pre _CHECK_FILES_POST.prefix= ${WRKDIR}/.prefix.post -_CHECK_FILES_COOKIE.sysconfdir= ${WRKDIR}/.check_files_sysconfdir_cookie +_CHECK_FILES_ERRMSG.sysconfdir= ${ERROR_DIR}/.check-files-sysconfdir _CHECK_FILES_PRE.sysconfdir= ${WRKDIR}/.sysconfdir.pre _CHECK_FILES_POST.sysconfdir= ${WRKDIR}/.sysconfdir.post -_CHECK_FILES_COOKIE.varbase= ${WRKDIR}/.check_files_varbase_cookie +_CHECK_FILES_ERRMSG.varbase= ${ERROR_DIR}/.check-files-varbase _CHECK_FILES_PRE.varbase= ${WRKDIR}/.varbase.pre _CHECK_FILES_POST.varbase= ${WRKDIR}/.varbase.post -_CHECK_FILES_COOKIES= # empty -_CHECK_FILES_COOKIES+= ${_CHECK_FILES_COOKIE.prefix} +_CHECK_FILES_ERRMSGS= # empty +_CHECK_FILES_ERRMSGS+= ${_CHECK_FILES_ERRMSG.prefix} .if empty(CHECK_FILES_STRICT:M[nN][oO]) -_CHECK_FILES_COOKIES+= ${_CHECK_FILES_COOKIE.sysconfdir} -_CHECK_FILES_COOKIES+= ${_CHECK_FILES_COOKIE.varbase} +_CHECK_FILES_ERRMSGS+= ${_CHECK_FILES_ERRMSG.sysconfdir} +_CHECK_FILES_ERRMSGS+= ${_CHECK_FILES_ERRMSG.varbase} .endif ########################################################################### @@ -164,9 +164,9 @@ ${_CHECK_FILES_PRE.varbase} ${_CHECK_FILES_POST.varbase}: # check-files targets and subtargets # .PHONY: check-files-prefix check-files-sysconfdir check-files-varbase -check-files-prefix: ${_CHECK_FILES_COOKIE.prefix} -check-files-sysconfdir: ${_CHECK_FILES_COOKIE.sysconfdir} -check-files-varbase: ${_CHECK_FILES_COOKIE.varbase} +check-files-prefix: ${_CHECK_FILES_ERRMSG.prefix} +check-files-sysconfdir: ${_CHECK_FILES_ERRMSG.sysconfdir} +check-files-varbase: ${_CHECK_FILES_ERRMSG.varbase} # The check-files target looks at the cookie files generated by the # check-files-* subtargets, and if they are non-empty, then they @@ -174,12 +174,11 @@ check-files-varbase: ${_CHECK_FILES_COOKIE.varbase} # subtarget. # .PHONY: check-files -check-files: ${_CHECK_FILES_COOKIES} - ${_PKG_SILENT}${_PKG_DEBUG}${STEP_MSG} \ - "Checking file-check results for ${PKGNAME}" - @${CAT} ${_CHECK_FILES_COOKIES} | ${ERROR_CAT} - ${_PKG_SILENT}${_PKG_DEBUG} \ - ${_ZERO_FILESIZE_P} ${_CHECK_FILES_COOKIES} || exit 1 +check-files: check-files-message ${_CHECK_FILES_ERRMSGS} error-check + +.PHONY: check-files-message +check-files-message: + @${STEP_MSG} "Checking file-check results for ${PKGNAME}" # Check ${PREFIX} for files which are not listed in the generated ${PLIST} # and vice-versa. @@ -253,10 +252,10 @@ ${_CHECK_FILES_EXTRA}: ${_CHECK_FILES_EXPECTED} ${_CHECK_FILES_ADDED} ${_PKG_SILENT}${_PKG_DEBUG}${MV} -f ${.TARGET}.tmp ${.TARGET} .if defined(NO_PKG_REGISTER) -${_CHECK_FILES_COOKIE.prefix}: +${_CHECK_FILES_ERRMSG.prefix}: ${_PKG_SILENT}${_PKG_DEBUG}${TOUCH} ${TOUCH_FLAGS} ${.TARGET} .else -${_CHECK_FILES_COOKIE.prefix}: \ +${_CHECK_FILES_ERRMSG.prefix}: \ ${_CHECK_FILES_DELETED} \ ${_CHECK_FILES_MISSING} \ ${_CHECK_FILES_MISSING_REAL} \ @@ -297,10 +296,10 @@ ${_CHECK_FILES_COOKIE.prefix}: \ # not copied into place by the INSTALL scripts. # .if defined(NO_PKG_REGISTER) -${_CHECK_FILES_COOKIE.sysconfdir}: +${_CHECK_FILES_ERRMSG.sysconfdir}: ${_PKG_SILENT}${_PKG_DEBUG}${TOUCH} ${TOUCH_FLAGS} ${.TARGET} .else -${_CHECK_FILES_COOKIE.sysconfdir}: \ +${_CHECK_FILES_ERRMSG.sysconfdir}: \ ${_CHECK_FILES_PRE.sysconfdir} \ ${_CHECK_FILES_POST.sysconfdir} ${_PKG_SILENT}${_PKG_DEBUG} \ @@ -323,10 +322,10 @@ ${_CHECK_FILES_COOKIE.sysconfdir}: \ # not created by the INSTALL scripts. # .if defined(NO_PKG_REGISTER) -${_CHECK_FILES_COOKIE.varbase}: +${_CHECK_FILES_ERRMSG.varbase}: ${_PKG_SILENT}${_PKG_DEBUG}${TOUCH} ${TOUCH_FLAGS} ${.TARGET} .else -${_CHECK_FILES_COOKIE.varbase}: \ +${_CHECK_FILES_ERRMSG.varbase}: \ ${_CHECK_FILES_PRE.varbase} \ ${_CHECK_FILES_POST.varbase} ${_PKG_SILENT}${_PKG_DEBUG} \ @@ -353,7 +352,7 @@ ${_CHECK_FILES_COOKIE.varbase}: \ check-clean: check-files-clean check-files-clean: ${_PKG_SILENT}${_PKG_DEBUG} \ - ${RM} -f ${_CHECK_FILES_COOKIES} \ + ${RM} -f ${_CHECK_FILES_ERRMSGS} \ ${_CHECK_FILES_PRE} ${_CHECK_FILES_POST} \ ${_CHECK_FILES_DIFF} ${_CHECK_FILES_ADDED} \ ${_CHECK_FILES_DELETED} ${_CHECK_FILES_EXPECTED} \ |