summaryrefslogtreecommitdiff
path: root/mk/buildlink3/show-buildlink3.sh
diff options
context:
space:
mode:
authorjlam <jlam>2006-07-08 23:10:35 +0000
committerjlam <jlam>2006-07-08 23:10:35 +0000
commitb96729a13e6502c6d9d1c2912a698e23f57d3965 (patch)
tree04459b5ed42b41d60b93766832b84b0beb86ba13 /mk/buildlink3/show-buildlink3.sh
parentca350efeb1663d3b4c0ce5fc5880e2237d7a7d39 (diff)
downloadpkgsrc-b96729a13e6502c6d9d1c2912a698e23f57d3965.tar.gz
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
Diffstat (limited to 'mk/buildlink3/show-buildlink3.sh')
-rw-r--r--mk/buildlink3/show-buildlink3.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/mk/buildlink3/show-buildlink3.sh b/mk/buildlink3/show-buildlink3.sh
new file mode 100644
index 00000000000..1d2255158d2
--- /dev/null
+++ b/mk/buildlink3/show-buildlink3.sh
@@ -0,0 +1,23 @@
+#!/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