Subject: Adding more debugging support to pkgsrc
To: None <tech-pkg@netbsd.org>
From: Roland Illig <rillig@NetBSD.org>
List: tech-pkg
Date: 10/31/2005 23:42:51
This is a multi-part message in MIME format.
--------------080908030809080102010209
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Hi,

I've just written a little make(1) command to show the values of some 
variables that are commonly used for tracking bugs. Any chance that it 
might be integrated into pkgsrc?

To some degree, you can get the same information (and much more) using 
PKG_DEBUG_LEVEL=1 or =2, but the overhead of using that variable is 
quite big.

Roland

--------------080908030809080102010209
Content-Type: text/plain;
 name="pkgsrc.debug.mk"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="pkgsrc.debug.mk"

# $NetBSD$
#

# This file provides the `show-debugging-info' command, which outputs
# the values of some commonly used variables which are useful for
# tracking bugs.

_PRINTF?=	printf

.PHONY: show-debugging-info
show-debugging-info:
.for _p_ in configure build
	@${MAKE} ${MAKEFLAGS} PKG_PHASE=${_p_} _show-debugging-info-${_p_}
.endfor

.PHONY: _show-debugging-info-configure
_show-debugging-info-configure:
	@${_PRINTF} "CONFIGURE_ENV=\\n"
	@${_PRINTF} "\\t%s\\n" ${CONFIGURE_ENV}
	@${_PRINTF} "CONFIGURE_SCRIPT=%s\\n" ${CONFIGURE_SCRIPT:Q}
	@${_PRINTF} "CONFIGURE_ARGS=\\n"
	@${_PRINTF} "\\t%s\\n" ${CONFIGURE_ARGS}
.PHONY: _show-debugging-info-build
_show-debugging-info-build:
	@${_PRINTF} "BUILD_ENV=\\n"
	@${_PRINTF} "\\t%s\\n" ${BUILD_ENV}
	@${_PRINTF} "BUILD_MAKE_FLAGS=\\n"
	@${_PRINTF} "\\t%s\\n" ${BUILD_MAKE_FLAGS}

--------------080908030809080102010209--