diff options
author | rillig <rillig@pkgsrc.org> | 2006-06-09 06:02:33 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2006-06-09 06:02:33 +0000 |
commit | 98b01c2c5017596506b5b806ede60666b7cc718b (patch) | |
tree | 8c686687cac2ddbd86abcb495a606706e40245f9 /mk/buildlink3 | |
parent | 250173f09cd157ec4d85832e1ed3ee04df99a2ad (diff) | |
download | pkgsrc-98b01c2c5017596506b5b806ede60666b7cc718b.tar.gz |
pkglint says, the :Q operator should not be used in double quotes.
The code here only worked due to many conincidences: Let's assume a
variable has the value "a b" and is used with the :Q operator, which
results in "a\ b" (a, backslash, space, b). When used in double quotes,
the shell command looks like:
echo "a\ b"
which, depending on the shell, may output the backslash literally or
not. In the case of this file, the ":Q" string was not passed to
echo(1), but to sed(1). sed(1) in turn interprets (backslash, space) in
the replacement text as equivalent to (space), and that's where the
backslash finally disappears. So it's only to this coincident that the
code worked although it was not correct.
Diffstat (limited to 'mk/buildlink3')
-rw-r--r-- | mk/buildlink3/bsd.buildlink3.mk | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/mk/buildlink3/bsd.buildlink3.mk b/mk/buildlink3/bsd.buildlink3.mk index da2c4c5f165..fdf2c7e6e4c 100644 --- a/mk/buildlink3/bsd.buildlink3.mk +++ b/mk/buildlink3/bsd.buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.buildlink3.mk,v 1.178 2006/06/07 17:35:49 jlam Exp $ +# $NetBSD: bsd.buildlink3.mk,v 1.179 2006/06/09 06:02:33 rillig Exp $ # # Copyright (c) 2004 The NetBSD Foundation, Inc. # All rights reserved. @@ -109,7 +109,7 @@ BUILDLINK_BUILTIN_MK.${_pkg_}?= ${BUILDLINK_PKGSRCDIR.${_pkg_}}/builtin.mk . sinclude "${BUILDLINK_BUILTIN_MK.${_pkg_}}" .endfor -# Set IGNORE_PKG.<pkg> if <pkg> is the current package we're building. +# Set IGNORE_PKG.<pkg> if <pkg> is the current package we're building. # We can then check for this value to avoid build loops. # .for _pkg_ in ${BUILDLINK_PACKAGES} @@ -149,7 +149,7 @@ _BLNK_RECURSIVE_DEPENDS+= ${_pkg_} # the built-in software and hence need to add a dependency. # _BLNK_DEPENDS= # empty -.for _pkg_ in ${BUILDLINK_DEPENDS} +.for _pkg_ in ${BUILDLINK_DEPENDS} USE_BUILTIN.${_pkg_}?= no . if empty(_BLNK_DEPENDS:M${_pkg_}) && !defined(IGNORE_PKG.${_pkg_}) && \ !empty(_BLNK_PACKAGES:M${_pkg_}) && \ @@ -1028,17 +1028,17 @@ _WRAP_EXTRA_ARGS.SHLIBTOOL+= ${_BLNK_LDFLAGS} ${WRAPPER_TMPDIR}/libtool-fix-la: ${BUILDLINK_SRCDIR}/libtool-fix-la ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H} ${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} \ - | ${SED} -e "s|@_BLNK_WRAP_LT_UNTRANSFORM_SED@|${_BLNK_WRAP_LT_UNTRANSFORM_SED:Q}|g" \ - -e "s|@BUILDLINK_DIR@|${BUILDLINK_DIR:Q}|g" \ - -e "s|@DEPOTBASE@|${DEPOTBASE:Q}|g" \ - -e "s|@LOCALBASE@|${LOCALBASE:Q}|g" \ - -e "s|@WRKSRC@|${WRKSRC:Q}|g" \ - -e "s|@BASENAME@|${BASENAME:Q}|g" \ - -e "s|@DIRNAME@|${DIRNAME:Q}|g" \ - -e "s|@EGREP@|${EGREP:Q}|g" \ - -e "s|@MV@|${MV:Q}|g" \ - -e "s|@PWD@|${PWD_CMD:Q}|g" \ - -e "s|@RM@|${RM:Q}|g" \ + | ${SED} -e "s|@_BLNK_WRAP_LT_UNTRANSFORM_SED@|"${_BLNK_WRAP_LT_UNTRANSFORM_SED:Q}"|g" \ + -e "s|@BUILDLINK_DIR@|${BUILDLINK_DIR}|g" \ + -e "s|@DEPOTBASE@|${DEPOTBASE}|g" \ + -e "s|@LOCALBASE@|${LOCALBASE}|g" \ + -e "s|@WRKSRC@|${WRKSRC}|g" \ + -e "s|@BASENAME@|"${BASENAME:Q}"|g" \ + -e "s|@DIRNAME@|"${DIRNAME:Q}"|g" \ + -e "s|@EGREP@|"${EGREP:Q}"|g" \ + -e "s|@MV@|"${MV:Q}"|g" \ + -e "s|@PWD@|"${PWD_CMD:Q}"|g" \ + -e "s|@RM@|"${RM:Q}"|g" \ | ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET} ${WRAPPER_TMPDIR}/buildcmd-libtool: ${BUILDLINK_SRCDIR}/buildcmd-libtool @@ -1052,7 +1052,7 @@ ${WRAPPER_TMPDIR}/cleanup-libtool: \ ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H} ${_PKG_SILENT}${_PKG_DEBUG} \ ${CAT} ${BUILDLINK_SRCDIR}/cleanup-libtool \ - | ${SED} -e "s|@_BLNK_LIBTOOL_FIX_LA@|${_BLNK_LIBTOOL_FIX_LA:Q}|g" \ + | ${SED} -e "s|@_BLNK_LIBTOOL_FIX_LA@|"${_BLNK_LIBTOOL_FIX_LA:Q}"|g" \ | ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET} ${WRAPPER_TMPDIR}/cmd-sink-libtool: ${BUILDLINK_SRCDIR}/cmd-sink-libtool @@ -1068,11 +1068,11 @@ ${WRAPPER_TMPDIR}/scan-libtool: ${BUILDLINK_SRCDIR}/scan-libtool ${WRAPPER_TMPDIR}/transform-libtool: ${BUILDLINK_SRCDIR}/transform-libtool ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H} ${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} \ - | ${SED} -e "s|@BUILDLINK_DIR@|${BUILDLINK_DIR:Q}|g" \ - -e "s|@WRKSRC@|${WRKSRC:Q}|g" \ - -e "s|@BASENAME@|${BASENAME:Q}|g" \ - -e "s|@DIRNAME@|${DIRNAME:Q}|g" \ - -e "s|@PWD@|${PWD_CMD:Q}|g" \ + | ${SED} -e "s|@BUILDLINK_DIR@|${BUILDLINK_DIR}|g" \ + -e "s|@WRKSRC@|${WRKSRC}|g" \ + -e "s|@BASENAME@|"${BASENAME:Q}"|g" \ + -e "s|@DIRNAME@|"${DIRNAME:Q}"|g" \ + -e "s|@PWD@|"${PWD_CMD:Q}"|g" \ | ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET} WRAPPER_TARGETS+= do-buildlink |