summaryrefslogtreecommitdiff
path: root/mk/bsd.pkg.debug.mk
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2007-02-19 12:19:49 +0000
committerrillig <rillig@pkgsrc.org>2007-02-19 12:19:49 +0000
commit9ef7b40e37be6cbc8f04671da9bf8247b7e1326a (patch)
treedac30daa76ade1a394c54016c8f7b2d6857b2234 /mk/bsd.pkg.debug.mk
parent56ae0e7a97fa8e23d17d3fb5f4bdf7ba394cb3ee (diff)
downloadpkgsrc-9ef7b40e37be6cbc8f04671da9bf8247b7e1326a.tar.gz
Fixed "make debug" when CONFIGURE_ARGS contains a shell redirection for
stdin.
Diffstat (limited to 'mk/bsd.pkg.debug.mk')
-rw-r--r--mk/bsd.pkg.debug.mk18
1 files changed, 15 insertions, 3 deletions
diff --git a/mk/bsd.pkg.debug.mk b/mk/bsd.pkg.debug.mk
index c27aae445b4..110f14a7b10 100644
--- a/mk/bsd.pkg.debug.mk
+++ b/mk/bsd.pkg.debug.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.debug.mk,v 1.15 2007/02/07 23:10:23 rillig Exp $
+# $NetBSD: bsd.pkg.debug.mk,v 1.16 2007/02/19 12:19:49 rillig Exp $
#
# Public targets:
#
@@ -16,6 +16,15 @@
PRINTF?= printf
+# Note: In the many cases where ${x} is used, the quoting is left out
+# intentionally, since x is an element of a list of shell words, and
+# passing such a shell word to the shell should still result in one
+# word. That way, no extra level of quoting is introduced.
+#
+# The only exception is the "<" character in CONFIGURE_ARGS, where it
+# is often used to redirect the input coming from another source. That
+# character has to be quoted.
+
.PHONY: \
debug \
_show-dbginfo-file-versions \
@@ -43,7 +52,10 @@ _show-dbginfo-file-versions:
sedexpr='s,.*\([$$]NetBSD:[^$$]*\$$\).*,\1,p'; \
${FIND} * -type f -print \
| while read fname; do \
- ident=`${SED} -n "$${sedexpr}" "$${fname}"` || continue; \
+ ident=`${SED} -n \
+ -e 's,.*\\([$$]NetBSD:[^$$]*\\$$\\).*,\\1,p' \
+ -e 's,.*\\([$$]Id:[^$$]*\\$$\\).*,\\1,p' \
+ "$${fname}"` || continue; \
case $${ident} in \
*?*) ${PRINTF} "\\t%s: %s\\n" "$${fname}" "$${ident}";; \
esac; \
@@ -62,7 +74,7 @@ _show-dbginfo-configure:
@${PRINTF} "\\n"
@${PRINTF} "CONFIGURE_SCRIPT:\\n\\t%s\\n" ${CONFIGURE_SCRIPT}
@${PRINTF} "\\n"
- @${PRINTF} "CONFIGURE_ARGS:\\n"; ${CONFIGURE_ARGS:@x@${PRINTF} "\\t%s\\n" ${x};@}
+ @${PRINTF} "CONFIGURE_ARGS:\\n"; ${CONFIGURE_ARGS:@x@${PRINTF} "\\t%s\\n" ${x:S,<,\<,};@}
@${PRINTF} "\\n"
_show-dbginfo-config.status: