Skip to content

Commit

Permalink
Replaced _PKG_SILENT and _PKG_DEBUG with RUN.
Browse files Browse the repository at this point in the history
  • Loading branch information
rillig committed Feb 7, 2008
1 parent 63a160e commit 22dcefe
Show file tree
Hide file tree
Showing 24 changed files with 120 additions and 122 deletions.
8 changes: 4 additions & 4 deletions mk/bsd.pkg.barrier.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: bsd.pkg.barrier.mk,v 1.15 2007/11/30 18:54:40 rillig Exp $
# $NetBSD: bsd.pkg.barrier.mk,v 1.16 2008/02/07 21:36:13 rillig Exp $

_COOKIE.barrier= ${WRKDIR}/.barrier_cookie

Expand Down Expand Up @@ -63,7 +63,7 @@ barrier: ${_BARRIER_PRE_TARGETS} ${_COOKIE.barrier}
. if defined(PKG_VERBOSE)
@${PHASE_MSG} "Invoking \`\`"${_BARRIER_CMDLINE_TARGETS:Q}"'' after barrier for ${PKGNAME}"
. endif
${_PKG_SILENT}${_PKG_DEBUG} \
${RUN} \
cd ${.CURDIR} \
&& ${RECURSIVE_MAKE} ${MAKEFLAGS} _PKGSRC_BARRIER=yes ALLOW_VULNERABLE_PACKAGES= ${_BARRIER_CMDLINE_TARGETS} \
|| { \
Expand All @@ -82,5 +82,5 @@ barrier: ${_BARRIER_PRE_TARGETS} ${_COOKIE.barrier}
### barrier-cookie creates the "barrier" cookie file.
###
${_COOKIE.barrier}:
${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
${_PKG_SILENT}${_PKG_DEBUG}${ECHO} ${PKGNAME} > ${.TARGET}
${RUN}${MKDIR} ${.TARGET:H}
${RUN}${ECHO} ${PKGNAME} > ${.TARGET}
8 changes: 4 additions & 4 deletions mk/bsd.pkg.debug.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: bsd.pkg.debug.mk,v 1.20 2007/09/27 12:49:14 rillig Exp $
# $NetBSD: bsd.pkg.debug.mk,v 1.21 2008/02/07 21:36:13 rillig Exp $
#
# Public targets:
#
Expand Down Expand Up @@ -42,7 +42,7 @@ debug: \

_show-dbginfo-file-versions:
@${PRINTF} "File versions:\\n"
${_PKG_SILENT}${_PKG_DEBUG} set -e; \
${RUN} \
sedexpr='s,^.*\([$$]NetBSD:[^$$]*\$$\).*,\1,p'; \
${FIND} * -type f -print \
| while read fname; do \
Expand Down Expand Up @@ -73,7 +73,7 @@ _show-dbginfo-configure:

_show-dbginfo-config.status:
.if !empty(CONFIGURE_DIRS:M*)
${_PKG_SILENT}${_PKG_DEBUG} set -e; \
${RUN} \
if ${TEST} -d ${WRKSRC:Q}; then cd ${WRKSRC:Q}; \
for cs in ${CONFIGURE_DIRS:=/config.status}; do \
if ${TEST} ! -f "$${cs}"; then continue; fi; \
Expand All @@ -97,7 +97,7 @@ _show-dbginfo-config.status:

_show-dbginfo-config.h:
.if !empty(CONFIGURE_DIRS:M*)
${_PKG_SILENT}${_PKG_DEBUG} set -e; \
${RUN} \
[ -d ${WRKSRC} ] || exit 0; \
print_config_h() { \
printf "%s:\\n" "`pwd`/$$1"; \
Expand Down
10 changes: 5 additions & 5 deletions mk/bsd.pkg.error.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: bsd.pkg.error.mk,v 1.3 2006/10/06 19:05:43 rillig Exp $
# $NetBSD: bsd.pkg.error.mk,v 1.4 2008/02/07 21:36:13 rillig Exp $

ERROR_DIR= ${WRKDIR}/.error
WARNING_DIR= ${WRKDIR}/.warning
Expand All @@ -14,7 +14,7 @@ DELAYED_WARNING_MSG?= ${ECHO} >> ${WARNING_DIR}/${.TARGET:T:C/^[.]*//:Q}

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}
${RUN}${MKDIR} ${.TARGET}

.PHONY: error-check

Expand All @@ -28,7 +28,7 @@ ${ERROR_DIR} ${WARNING_DIR} ${_ERROR_DONE_DIR} ${_WARNING_DONE_DIR}:
### directory, then the target will fail.
###
error-check: .USE
${_PKG_SILENT}${_PKG_DEBUG} \
${RUN} \
${RM} -f ${WARNING_DIR}/*.tmp; \
${TEST} -d ${WARNING_DIR} || exit 0; \
cd ${WARNING_DIR}; \
Expand All @@ -39,7 +39,7 @@ error-check: .USE
${CAT} ./* | ${WARNING_CAT}; \
${MV} -f ./* ${_WARNING_DONE_DIR}

${_PKG_SILENT}${_PKG_DEBUG} \
${RUN} \
${RM} -f ${ERROR_DIR}/*.tmp; \
${TEST} -d ${ERROR_DIR} || exit 0; \
cd ${ERROR_DIR}; \
Expand All @@ -59,4 +59,4 @@ error-check: .USE
### error-clean removes the error and warning directory and files.
###
error-clean:
${_PKG_SILENT}${_PKG_DEBUG}${RM} -fr ${ERROR_DIR} ${WARNING_DIR}
${RUN}${RM} -fr ${ERROR_DIR} ${WARNING_DIR}
10 changes: 5 additions & 5 deletions mk/bsd.pkg.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: bsd.pkg.mk,v 1.1935 2008/01/16 01:01:26 joerg Exp $
# $NetBSD: bsd.pkg.mk,v 1.1936 2008/02/07 21:36:13 rillig Exp $
#
# This file is in the public domain.
#
Expand Down Expand Up @@ -805,14 +805,14 @@ PKG_ERROR_HANDLER.${_class_}?= { \
#
.for _phase_ in ${_ALL_PHASES}
${_MAKEVARS_MK.${_phase_}}: ${WRKDIR}
${_PKG_SILENT}${_PKG_DEBUG}${RM} -f ${.TARGET}.tmp
${RUN}${RM} -f ${.TARGET}.tmp
. for _var_ in ${MAKEVARS:O:u}
. if defined(${_var_})
${_PKG_SILENT}${_PKG_DEBUG} \
${RUN} \
${ECHO} ${_var_}"= "${${_var_}:Q} >> ${.TARGET}.tmp
. endif
. endfor
${_PKG_SILENT}${_PKG_DEBUG} \
${RUN} \
if ${TEST} -f ${.TARGET}.tmp; then \
( ${ECHO} ".if !defined(_MAKEVARS_MK)"; \
${ECHO} "_MAKEVARS_MK= defined"; \
Expand All @@ -823,7 +823,7 @@ ${_MAKEVARS_MK.${_phase_}}: ${WRKDIR}
) > ${.TARGET}; \
${RM} -f ${.TARGET}.tmp; \
fi
${_PKG_SILENT}${_PKG_DEBUG}${TOUCH} ${TOUCH_FLAGS} ${.TARGET}
${RUN}${TOUCH} ${TOUCH_FLAGS} ${.TARGET}
.endfor
.if make(pbulk-index) || make(pbulk-index-item) || make(pbulk-save-wrkdir)
Expand Down
4 changes: 2 additions & 2 deletions mk/bsd.pkg.readme.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: bsd.pkg.readme.mk,v 1.16 2008/01/03 20:51:21 adrianp Exp $
# $NetBSD: bsd.pkg.readme.mk,v 1.17 2008/02/07 21:36:13 rillig Exp $
#
# This Makefile fragment is included by bsd.pkg.mk and encapsulates the
# code to produce README.html files in each package directory.
Expand Down Expand Up @@ -239,7 +239,7 @@ SED_HOMEPAGE_EXPR= -e 's|%%HOMEPAGE%%||'
#
.PHONY: show-vulnerabilities-html
show-vulnerabilities-html:
${_PKG_SILENT}${_PKG_DEBUG} \
${RUN} \
if ${PKG_ADMIN} pmatch 'pkg_install<20070714' pkg_install-${PKGTOOLS_VERSION}; then \
if [ -f ${PKGVULNDIR}/pkg-vulnerabilities ]; then \
${AWK} '/^${PKGBASE}[-<>=]+[0-9]/ { gsub("\<", "\\&lt;", $$1); \
Expand Down
6 changes: 3 additions & 3 deletions mk/bsd.pkg.update.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: bsd.pkg.update.mk,v 1.13 2007/09/07 16:47:05 rillig Exp $
# $NetBSD: bsd.pkg.update.mk,v 1.14 2008/02/07 21:36:13 rillig Exp $
#
# This Makefile fragment is included by bsd.pkg.mk and contains the targets
# and variables for "make update".
Expand Down Expand Up @@ -60,7 +60,7 @@ update:
. endif
.endif
${RUN} ${RECURSIVE_MAKE} ${MAKEFLAGS} ${UPDATE_TARGET} KEEP_WRKDIR=YES DEPENDS_TARGET=${DEPENDS_TARGET:Q}
${_PKG_SILENT}${_PKG_DEBUG} \
${RUN} \
[ ! -s ${_DDIR} ] || for dep in `${CAT} ${_DDIR}` ; do \
(if cd ../.. && cd "$${dep}" ; then \
${PHASE_MSG} "Installing in $${dep}" && \
Expand All @@ -83,7 +83,7 @@ update:
.PHONY: clean-update
clean-update:
${RUN} ${RECURSIVE_MAKE} ${MAKEFLAGS} update-create-ddir
${_PKG_SILENT}${_PKG_DEBUG} \
${RUN} \
if [ -s ${_DDIR} ] ; then \
for dep in `${CAT} ${_DDIR}` ; do \
(if cd ../.. && cd "$${dep}" ; then \
Expand Down
8 changes: 4 additions & 4 deletions mk/build/bsd.build.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: bsd.build.mk,v 1.10 2008/01/04 01:46:26 rillig Exp $
# $NetBSD: bsd.build.mk,v 1.11 2008/02/07 21:36:13 rillig Exp $
#
# This Makefile fragment is included by bsd.pkg.mk and provides all
# variables and targets related to building sources for a package.
Expand Down Expand Up @@ -51,6 +51,6 @@ build: barrier
###
.PHONY: build-cookie
build-cookie:
${_PKG_SILENT}${_PKG_DEBUG}${TEST} ! -f ${_COOKIE.build} || ${FALSE}
${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${_COOKIE.build:H}
${_PKG_SILENT}${_PKG_DEBUG}${ECHO} ${PKGNAME} > ${_COOKIE.build}
${RUN}${TEST} ! -f ${_COOKIE.build} || ${FALSE}
${RUN}${MKDIR} ${_COOKIE.build:H}
${RUN}${ECHO} ${PKGNAME} > ${_COOKIE.build}
6 changes: 3 additions & 3 deletions mk/build/build.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: build.mk,v 1.15 2007/12/01 11:11:54 rillig Exp $
# $NetBSD: build.mk,v 1.16 2008/02/07 21:36:13 rillig Exp $
#
# This file defines what happens in the build phase, excluding the
# self-test, which is defined in test.mk.
Expand Down Expand Up @@ -141,7 +141,7 @@ build-check-interactive:
.if !target(do-build)
do-build:
. for _dir_ in ${BUILD_DIRS}
${_PKG_SILENT}${_PKG_DEBUG}${_ULIMIT_CMD} \
${RUN}${_ULIMIT_CMD} \
cd ${WRKSRC} && cd ${_dir_} && \
${BUILD_MAKE_CMD} ${BUILD_TARGET}
. endfor
Expand All @@ -161,7 +161,7 @@ BUILD_ENV_SHELL?= ${SH}
.if defined(_PKGSRC_BARRIER)
build-env: .PHONY configure
@${STEP_MSG} "Entering the build environment for ${PKGNAME}"
${_PKG_SILENT}${_PKG_DEBUG} \
${RUN} \
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${BUILD_ENV_SHELL}
.else
build-env: barrier
Expand Down
10 changes: 5 additions & 5 deletions mk/build/test.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: test.mk,v 1.13 2007/12/01 11:11:54 rillig Exp $
# $NetBSD: test.mk,v 1.14 2008/02/07 21:36:13 rillig Exp $
#
# After the "build" phase, many packages provide some sort of self-test
# that can be run on the not-yet installed package. To enable these
Expand Down Expand Up @@ -129,7 +129,7 @@ test-check-interactive:
. if defined(TEST_TARGET) && !empty(TEST_TARGET)
do-test:
. for _dir_ in ${TEST_DIRS}
${_PKG_SILENT}${_PKG_DEBUG}${_ULIMIT_CMD} \
${RUN}${_ULIMIT_CMD} \
cd ${WRKSRC} && cd ${_dir_} && \
${TEST_MAKE_CMD} ${TEST_TARGET}
. endfor
Expand All @@ -156,6 +156,6 @@ post-test:
###
.PHONY: test-cookie
test-cookie:
${_PKG_SILENT}${_PKG_DEBUG}${TEST} ! -f ${_COOKIE.test} || ${FALSE}
${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${_COOKIE.test:H}
${_PKG_SILENT}${_PKG_DEBUG}${ECHO} ${PKGNAME} > ${_COOKIE.test}
${RUN}${TEST} ! -f ${_COOKIE.test} || ${FALSE}
${RUN}${MKDIR} ${_COOKIE.test:H}
${RUN}${ECHO} ${PKGNAME} > ${_COOKIE.test}
44 changes: 22 additions & 22 deletions mk/buildlink3/bsd.buildlink3.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: bsd.buildlink3.mk,v 1.199 2007/12/05 21:36:43 tron Exp $
# $NetBSD: bsd.buildlink3.mk,v 1.200 2008/02/07 21:36:13 rillig Exp $
#
# Copyright (c) 2004 The NetBSD Foundation, Inc.
# All rights reserved.
Expand Down Expand Up @@ -497,14 +497,14 @@ LIBS+= ${_flag_}
.PHONY: buildlink-directories
do-buildlink: buildlink-directories
buildlink-directories:
${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${BUILDLINK_DIR}
${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${BUILDLINK_BINDIR}
${RUN}${MKDIR} ${BUILDLINK_DIR}
${RUN}${MKDIR} ${BUILDLINK_BINDIR}
.if defined(USE_X11) && ${X11_TYPE} != "modular"
${_PKG_SILENT}${_PKG_DEBUG}${RM} -f ${BUILDLINK_X11_DIR}
${_PKG_SILENT}${_PKG_DEBUG}${LN} -sf ${BUILDLINK_DIR} ${BUILDLINK_X11_DIR}
${RUN}${RM} -f ${BUILDLINK_X11_DIR}
${RUN}${LN} -sf ${BUILDLINK_DIR} ${BUILDLINK_X11_DIR}
.endif
${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${BUILDLINK_DIR}/include
${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${BUILDLINK_DIR}/lib${LIBABISUFFIX}
${RUN}${MKDIR} ${BUILDLINK_DIR}/include
${RUN}${MKDIR} ${BUILDLINK_DIR}/lib${LIBABISUFFIX}

# The following variables are all optionally defined and control which
# package files are symlinked into ${BUILDLINK_DIR} and how their names
Expand Down Expand Up @@ -546,12 +546,12 @@ buildlink-${_pkg_}: ${_BLNK_TARGETS.${_pkg_}}

.PHONY: buildlink-${_pkg_}-message
buildlink-${_pkg_}-message:
${_PKG_SILENT}${_PKG_DEBUG} \
${RUN} \
${ECHO_BUILDLINK_MSG} "=> Linking ${_pkg_} files into ${BUILDLINK_DIR}."

.PHONY: buildlink-${_pkg_}-cookie
buildlink-${_pkg_}-cookie:
${_PKG_SILENT}${_PKG_DEBUG} \
${RUN} \
${TOUCH} ${TOUCH_FLAGS} ${_BLNK_COOKIE.${_pkg_}}

. if (${PKG_INSTALLATION_TYPE} == "pkgviews") && \
Expand Down Expand Up @@ -581,7 +581,7 @@ _BLNK_FILES_CMD.${_pkg_}+= )
_BLNK_FILES_CMD.${_pkg_}+= | ${SORT} -u

${_BLNK_COOKIE.${_pkg_}}:
${_PKG_SILENT}${_PKG_DEBUG} \
${RUN} \
case ${BUILDLINK_PREFIX.${_pkg_}} in \
*not_found) \
${ERROR_MSG} "${_pkg_} is not installed; can't buildlink files."; \
Expand Down Expand Up @@ -1059,8 +1059,8 @@ _WRAP_EXTRA_ARGS.LIBTOOL+= ${_BLNK_LDFLAGS}
_WRAP_EXTRA_ARGS.SHLIBTOOL+= ${_BLNK_LDFLAGS}
${WRAPPER_TMPDIR}/libtool-fix-la: ${BUILDLINK_SRCDIR}/libtool-fix-la
${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} \
${RUN}${MKDIR} ${.TARGET:H}
${RUN}${CAT} ${.ALLSRC} \
| ${SED} -e "s|@_BLNK_WRAP_LT_UNTRANSFORM_SED@|"${_BLNK_WRAP_LT_UNTRANSFORM_SED:Q}"|g" \
-e "s|@BUILDLINK_DIR@|${BUILDLINK_DIR}|g" \
-e "s|@DEPOTBASE@|${DEPOTBASE}|g" \
Expand All @@ -1075,32 +1075,32 @@ ${WRAPPER_TMPDIR}/libtool-fix-la: ${BUILDLINK_SRCDIR}/libtool-fix-la
| ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET}
${WRAPPER_TMPDIR}/buildcmd-libtool: ${BUILDLINK_SRCDIR}/buildcmd-libtool
${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} \
${RUN}${MKDIR} ${.TARGET:H}
${RUN}${CAT} ${.ALLSRC} \
| ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET}
${WRAPPER_TMPDIR}/cleanup-libtool: \
${BUILDLINK_SRCDIR}/cleanup-libtool \
${_BLNK_LIBTOOL_FIX_LA}
${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
${_PKG_SILENT}${_PKG_DEBUG} \
${RUN}${MKDIR} ${.TARGET:H}
${RUN} \
${CAT} ${BUILDLINK_SRCDIR}/cleanup-libtool \
| ${SED} -e "s|@_BLNK_LIBTOOL_FIX_LA@|"${_BLNK_LIBTOOL_FIX_LA:Q}"|g" \
| ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET}
${WRAPPER_TMPDIR}/cmd-sink-libtool: ${BUILDLINK_SRCDIR}/cmd-sink-libtool
${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} \
${RUN}${MKDIR} ${.TARGET:H}
${RUN}${CAT} ${.ALLSRC} \
| ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET}
${WRAPPER_TMPDIR}/scan-libtool: ${BUILDLINK_SRCDIR}/scan-libtool
${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} \
${RUN}${MKDIR} ${.TARGET:H}
${RUN}${CAT} ${.ALLSRC} \
| ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET}
${WRAPPER_TMPDIR}/transform-libtool: ${BUILDLINK_SRCDIR}/transform-libtool
${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} \
${RUN}${MKDIR} ${.TARGET:H}
${RUN}${CAT} ${.ALLSRC} \
| ${SED} -e "s|@BUILDLINK_DIR@|${BUILDLINK_DIR}|g" \
-e "s|@WRKSRC@|${WRKSRC}|g" \
-e "s|@BASENAME@|"${BASENAME:Q}"|g" \
Expand Down
4 changes: 2 additions & 2 deletions mk/bulk/bsd.bulk-pkg.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: bsd.bulk-pkg.mk,v 1.148 2008/01/04 15:49:07 rillig Exp $
# $NetBSD: bsd.bulk-pkg.mk,v 1.149 2008/02/07 21:36:13 rillig Exp $

#
# Copyright (c) 1999, 2000 Hubert Feyrer <[email protected]>
Expand Down Expand Up @@ -550,7 +550,7 @@ bulk-package:
fi; \
exit $$exitcode
.if ${BULKFILESDIR} != ${PKGSRCDIR}
${_PKG_SILENT}${_PKG_DEBUG} \
${RUN} \
${RMDIR} ${_BULK_PKGLOGDIR:Q} 2>/dev/null 1>&2 || ${TRUE}
.endif

Expand Down
Loading

0 comments on commit 22dcefe

Please sign in to comment.