diff options
author | rillig <rillig@pkgsrc.org> | 2005-05-15 22:50:13 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2005-05-15 22:50:13 +0000 |
commit | f58a634f12f4103724a307c1808abf7c208f58dc (patch) | |
tree | 4dbacdb8cf75bb782c8002a603f445712fe418e1 /regress/make-quoting/files | |
parent | 2205e39726505c9e70263fed52e9bd57a644e62b (diff) | |
download | pkgsrc-f58a634f12f4103724a307c1808abf7c208f58dc.tar.gz |
Found a bug in the pkgsrc bmake and NetBSD-1.6.2 /usr/bin/make, which has
been fixed at least in NetBSD-2.99.15. Wrote a testcase for it.
Diffstat (limited to 'regress/make-quoting/files')
-rw-r--r-- | regress/make-quoting/files/bug1.mk | 36 | ||||
-rw-r--r-- | regress/make-quoting/files/bug1.out | 1 |
2 files changed, 37 insertions, 0 deletions
diff --git a/regress/make-quoting/files/bug1.mk b/regress/make-quoting/files/bug1.mk new file mode 100644 index 00000000000..a1bdf7e8a23 --- /dev/null +++ b/regress/make-quoting/files/bug1.mk @@ -0,0 +1,36 @@ +# $NetBSD: bug1.mk,v 1.1 2005/05/15 22:50:13 rillig Exp $ +# +# This file demonstrates a parsing bug in make(1) from NetBSD-1.6.2 and +# the current pkgsrc bmake. The make from NetBSD-2.99.15 has been fixed. +# +# The bug is that one of the closing braces is parsed twice -- once as +# terminator for a variable and once as literal character, which is +# appended to PKG_OPTIONS. + +PKG_OPTIONS= a b c +.for _o_ in -b -c +_opt_:= ${_o_} # .for variables cannot be used in modifiers +. if !empty(_opt_:M-*) +PKG_OPTIONS:= ${PKG_OPTIONS:N${_opt_:C/-//}} # <-- the bug +. endif +.endfor + +PASSED?= no + +# /usr/bin/make from NetBSD 2.99.15 or similar +.if !empty(MAKE_VERSION:Mnetbsd-2005*) && ${PKG_OPTIONS} == "a" +PASSED= yes + +# /usr/bin/make from NetBSD 1.6.2 +.elif !empty(MAKE_VERSION:Mnetbsd-20040210) && ${PKG_OPTIONS} == "a b c}}" +PASSED= yes + +# bmake from pkgsrc +.elif !empty(MAKE_VERSION:Mbmake-3.1.12*) && ${PKG_OPTIONS} == "a b c}}" +PASSED= yes + +.endif + +.PHONY: all +all: + @echo ${PASSED} diff --git a/regress/make-quoting/files/bug1.out b/regress/make-quoting/files/bug1.out new file mode 100644 index 00000000000..7cfab5b05d6 --- /dev/null +++ b/regress/make-quoting/files/bug1.out @@ -0,0 +1 @@ +yes |