summaryrefslogtreecommitdiff
path: root/mk/bsd.pkg.debug.mk
diff options
context:
space:
mode:
authorrillig <rillig>2007-02-19 12:19:49 +0000
committerrillig <rillig>2007-02-19 12:19:49 +0000
commit66cee57a94ca66b9a7f7cd9f9e0368fc42edb292 (patch)
treedac30daa76ade1a394c54016c8f7b2d6857b2234 /mk/bsd.pkg.debug.mk
parentff95dc382be24325585bf745a8ad544b524da0df (diff)
downloadpkgsrc-66cee57a94ca66b9a7f7cd9f9e0368fc42edb292.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: