Subject: Re: PKG_DEBUG_LEVEL>=1 breaks some targets
To: Johnny C. Lam <jlam@NetBSD.org>
From: Kouichirou Hiratsuka <hira@po6.nsk.ne.jp>
List: tech-pkg
Date: 10/03/2004 05:48:38
Hello,

At Fri, 1 Oct 2004 13:16:00 +0000,
Johnny C. Lam wrote:
> 
> For those targets whose output is used by other targets, we could
> simply replace "${_PKG_SILENT}${_PKG_DEBUG}" with "@".  This would
> seem to be the simplest solution.
> 
I see.  Certainly, some targets are using "@".
Well, for the following targets, that replacement is needed.

  - show-depends-dirs
  - show-all-depends-dirs
  - show-all-depends-dirs-excl
  - show-shlib-type

If the following patch is good, I'd like to commit this.

best regards.
--
 Kouichirou Hiratsuka
   hira@po6.nsk.ne.jp

Index: bsd.pkg.mk
===================================================================
RCS file: /cvs/cvsroot/pkgsrc/mk/bsd.pkg.mk,v
retrieving revision 1.1504
diff -u -r1.1504 bsd.pkg.mk
--- bsd.pkg.mk	1 Oct 2004 00:23:18 -0000	1.1504
+++ bsd.pkg.mk	2 Oct 2004 18:36:43 -0000
@@ -1693,8 +1693,7 @@
 .PHONY: show-depends-dirs
 .if !target(show-depends-dirs)
 show-depends-dirs:
-	${_PKG_SILENT}${_PKG_DEBUG}					\
-	dlist="";							\
+	@dlist="";							\
 	thisdir=`${PWD_CMD}`;						\
 	for reldir in "" ${DEPENDS:C/^[^:]*://:C/:.*$//} ${BUILD_DEPENDS:C/^[^:]*://:C/:.*$//} ;\
 	do								\
@@ -1758,13 +1757,13 @@
 .PHONY: show-all-depends-dirs
 .if make(show-all-depends-dirs)
 show-all-depends-dirs:
-	${_PKG_SILENT}${_PKG_DEBUG}${AWK} '${_RECURSE_DEPENDS_DIRS}'
+	@${AWK} '${_RECURSE_DEPENDS_DIRS}'
 .endif
 
 .PHONY: show-all-depends-dirs-excl
 .if make(show-all-depends-dirs-excl)
 show-all-depends-dirs-excl:
-	${_PKG_SILENT}${_PKG_DEBUG}${AWK} -v NonSelf=1 '${_RECURSE_DEPENDS_DIRS}'
+	@${AWK} -v NonSelf=1 '${_RECURSE_DEPENDS_DIRS}'
 .endif
 
 .PHONY: show-root-dirs
@@ -2955,10 +2954,9 @@
 .PHONY: show-shlib-type
 show-shlib-type:
 .  if empty(USE_LANGUAGES)
-	${_PKG_SILENT}${_PKG_DEBUG}${ECHO} "none"
+	@${ECHO} "none"
 .  elif ${_OPSYS_SHLIB_TYPE} == "ELF/a.out"
-	${_PKG_SILENT}${_PKG_DEBUG}					\
-	cd ${WRKDIR} &&							\
+	@cd ${WRKDIR} &&						\
 	sotype=none;							\
 	if [ "X${MKPIC}" != "Xno" -a "X${NOPIC}" = "X" ]; then		\
 		${ECHO} "int main() { return(0); }" > a.$$$$.c;		\
@@ -2976,7 +2974,7 @@
 	${ECHO} "$$sotype";						\
 	${RM} -f a.$$$$.c a.$$$$.out
 .  else
-	${_PKG_SILENT}${_PKG_DEBUG}${ECHO} ${_OPSYS_SHLIB_TYPE}
+	@${ECHO} ${_OPSYS_SHLIB_TYPE}
 .  endif   # USE_LANGUAGES
 .endif