pkgsrc/mk/buildlink3/show-buildlink3.sh
jlam c16221a4db Change the format of BUILDLINK_ORDER to contain depth information as well,
and add a new helper target and script, "show-buildlink3", that outputs
a listing of the buildlink3.mk files included as well as the depth at
which they are included.

For example, "make show-buildlink3" in fonts/Xft2 displays:

	zlib
	fontconfig
	    iconv
	    zlib
	    freetype2
	    expat
	freetype2
	Xrender
	    renderproto
2006-07-08 23:10:35 +00:00

23 lines
488 B
Bash

#!/bin/sh
#
# $NetBSD: show-buildlink3.sh,v 1.1 2006/07/08 23:11:17 jlam Exp $
#
# This script is a helper for the show-buildlink3 target and outputs
# the arguments, each on a new line with any leading "+" signs replaced
# with four spaces.
#
while test $# -gt 0; do
pkg="$1"
pkg="${pkg#+}"
prefix=
stripped=no
while test $stripped = no; do
case $pkg in
+*) prefix=" $prefix"; pkg="${pkg#+}"; stripped=no ;;
*) stripped=yes ;;
esac
done
echo "$prefix$pkg"
shift
done