Clean up debug knobs.

This commit is contained in:
uebayasi 2009-12-15 06:18:07 +00:00
parent 4a8d8a88f8
commit 930c6ee6c5
2 changed files with 39 additions and 16 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.77 2009/12/11 15:25:05 uebayasi Exp $
# $NetBSD: Makefile,v 1.78 2009/12/15 06:18:07 uebayasi Exp $
# The `all' target must appear before bsd.own.mk is pulled in.
all:
@ -8,8 +8,7 @@ all:
.include <bsd.own.mk>
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
SETSCMD= cd ${.CURDIR} && \
DESTDIR=${DESTDIR:Q} \
SETSENV= DESTDIR=${DESTDIR:Q} \
MACHINE=${MACHINE:Q} \
MACHINE_ARCH=${MACHINE_ARCH:Q} \
AWK=${TOOL_AWK:Q} \
@ -22,7 +21,9 @@ SETSCMD= cd ${.CURDIR} && \
PAX=${TOOL_PAX:Q} \
PKG_CREATE=${TOOL_PKG_CREATE:Q} \
SED=${TOOL_SED:Q} \
TSORT=${TSORT:Q} \
TSORT=${TSORT:Q}
SETSCMD= cd ${.CURDIR} && \
${SETSENV} \
${HOST_SH}
MAKETARS_FLAGS=
@ -68,8 +69,12 @@ print_object_fmt: .PHONY
print_toolchain_missing: .PHONY
@echo "${TOOLCHAIN_MISSING}"
print_mkvars: .PHONY
@env SETS_SUBR_DEBUG=dumpmkvars rundir="${.CURDIR}" ${HOST_SH} sets.subr
print_mkvars \
print_set_lists_base print_set_lists_x print_set_lists_ext \
list_set_lists_base list_set_lists_x list_set_lists_ext \
list_set_files_base list_set_files_x list_set_files_ext \
: .PHONY
@${SETSENV}; rundir="${.CURDIR}"; . ./sets.subr; ${.TARGET}
#
# METALOG MANIPULATION TARGETS

View File

@ -1,4 +1,4 @@
# $NetBSD: sets.subr,v 1.116 2009/12/15 05:11:08 uebayasi Exp $
# $NetBSD: sets.subr,v 1.117 2009/12/15 06:18:07 uebayasi Exp $
#
#
@ -126,16 +126,9 @@ IFS=$oIFS
MKVARS="$( ${MAKE} -B -f ${rundir}/mkvars.mk mkvars | sed -e 's,=.*,,' | xargs )"
if [ "$SETS_SUBR_DEBUG" = "dumpmkvars" ]; then
for v in $MKVARS; do
eval echo $v=\$$v
done
exit 0
fi
#####
setsdir=${0%/*}
setsdir=${rundir}
obsolete=0
module=yes
if [ "${MKKMOD}" = "no" ]; then
@ -173,7 +166,7 @@ SUBST="${SUBST};s#@MACHINE@#${MACHINE}#g"
# In each file, a record consists of a path and a System Package name,
# separated by whitespace. E.g.,
#
# # $NetBSD: sets.subr,v 1.116 2009/12/15 05:11:08 uebayasi Exp $
# # $NetBSD: sets.subr,v 1.117 2009/12/15 06:18:07 uebayasi Exp $
# . base-sys-root [keyword[,...]]
# ./altroot base-sys-root
# ./bin base-sys-root
@ -379,6 +372,7 @@ list_set_lists()
list_set_lists_shl $setname
list_set_lists_module $setname
list_set_lists_rescue $setname
return 0
}
list_set_lists_mi()
@ -507,3 +501,27 @@ all:
@echo \${TARGET_ENDIANNESS}
EOMAKE
}
#####
# print_mkvars
print_mkvars()
{
for v in $MKVARS; do
eval echo $v=\$$v
done
}
# print_set_lists_{base,x,ext}
# list_set_lists_{base,x,ext}
# list_set_files_{base,x,ext}
for func in print_set_lists list_set_lists list_set_files; do
for x in base x ext; do
if [ $x = base ]; then
list=nlists
else
list=${x}lists
fi
eval ${func}_${x} \(\) \{ $func \$$list \; \}
done
done