quote variables in the gmake version of getvars() so that stuff that

looks like (FOO|BAR) works.
This commit is contained in:
mrg 2006-05-17 03:27:19 +00:00
parent 5d136667c4
commit 4e2cace64a

View File

@ -1,4 +1,4 @@
# $NetBSD: mknative.common,v 1.6 2006/05/15 21:01:42 mrg Exp $
# $NetBSD: mknative.common,v 1.7 2006/05/17 03:27:19 mrg Exp $
#
# from: NetBSD: mknative,v 1.12 2003/03/05 06:17:17 mrg Exp
#
@ -26,7 +26,7 @@ getvars()
*gmake)
env MAKEFLAGS= $MAKE -f - -f "$_TMPDIR/$_mf" _x_ <<EOF || bomb "getvars $_mf $* failed"
define echo_var
@echo G_\${var}=\${\${var}} | sed -e 's,\([^\.]\)\./\([a-zA-Z0-9_-]*\.o\),\1\2,g' -e 's,$_VPATH,\$\${GNUHOSTDIST},g' -e 's,$_GNU_DIST,\$\${GNUHOSTDIST},g'
@echo G_\${var}="\${\${var}}" | sed -e 's,\([^\.]\)\./\([a-zA-Z0-9_-]*\.o\),\1\2,g' -e 's,$_VPATH,\$\${GNUHOSTDIST},g' -e 's,$_GNU_DIST,\$\${GNUHOSTDIST},g'
endef
_x_:
@ -52,7 +52,7 @@ write_c()
echo '/* This file is automatically generated. DO NOT EDIT! */' >$_TOP/$1.tmp || \
bomb "cannot create $1"
grep '$''NetBSD' $0 | sed 's,[#$],,g;s,.*,/* Generated from: & */,' >>$_TOP/$1.tmp
echo '$NetBSD: mknative.common,v 1.6 2006/05/15 21:01:42 mrg Exp $' | sed 's,[#$],,g;s,.*,/* and from: & */,' >>$_TOP/$1.tmp
echo '$NetBSD: mknative.common,v 1.7 2006/05/17 03:27:19 mrg Exp $' | sed 's,[#$],,g;s,.*,/* and from: & */,' >>$_TOP/$1.tmp
echo '' >>$_TOP/$1.tmp
writefile $1
}
@ -64,7 +64,7 @@ write_mk()
echo '# This file is automatically generated. DO NOT EDIT!' >$_TOP/$1.tmp || \
bomb "cannot create $1"
grep '$''NetBSD' $0 | sed 's,[#$],,g;s,.*,# Generated from: &,' >>$_TOP/$1.tmp
echo '$NetBSD: mknative.common,v 1.6 2006/05/15 21:01:42 mrg Exp $' | sed 's,[#$],,g;s,.*,# and from: &,' >>$_TOP/$1.tmp
echo '$NetBSD: mknative.common,v 1.7 2006/05/17 03:27:19 mrg Exp $' | sed 's,[#$],,g;s,.*,# and from: &,' >>$_TOP/$1.tmp
echo '#' >>$_TOP/$1.tmp
writefile $1
}