pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/regress/make-quoting Found a new bug in make(1).



details:   https://anonhg.NetBSD.org/pkgsrc/rev/23f530d3d75b
branches:  trunk
changeset: 497614:23f530d3d75b
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Mon Aug 01 00:40:30 2005 +0000

description:
Found a new bug in make(1).

diffstat:

 regress/make-quoting/Makefile       |   6 +++---
 regress/make-quoting/files/bug2.mk  |  22 ++++++++++++++++++++++
 regress/make-quoting/files/bug2.out |   4 ++++
 3 files changed, 29 insertions(+), 3 deletions(-)

diffs (56 lines):

diff -r 35acdf703d38 -r 23f530d3d75b regress/make-quoting/Makefile
--- a/regress/make-quoting/Makefile     Mon Aug 01 00:37:21 2005 +0000
+++ b/regress/make-quoting/Makefile     Mon Aug 01 00:40:30 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2005/05/19 10:59:10 rillig Exp $
+# $NetBSD: Makefile,v 1.4 2005/08/01 00:40:30 rillig Exp $
 #
 
 DISTNAME=      regress-make-1.0
@@ -6,10 +6,10 @@
 DISTFILES=     # empty
 
 MAINTAINER=    rillig%NetBSD.org@localhost
-COMMENT=       Test Makefile quoting
+COMMENT=       Test Makefile quoting and make(1) bugs
 
 REGRESS_TESTS= continue dblquote for ltarget nestfor quoting sglquote  \
-       vtarget bug1
+       vtarget bug1 bug2
 
 do-regress:
 .for t in ${REGRESS_TESTS}
diff -r 35acdf703d38 -r 23f530d3d75b regress/make-quoting/files/bug2.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/regress/make-quoting/files/bug2.mk        Mon Aug 01 00:40:30 2005 +0000
@@ -0,0 +1,22 @@
+# $NetBSD: bug2.mk,v 1.1 2005/08/01 00:40:30 rillig Exp $
+#
+# This file demonstrates a subtle inconsistency that only occurs when an
+# undefined variable is used in another, which is then quoted and copied
+# by using the := assignment operator.
+
+.undef UNDEFINED
+
+# this variable references the undefined variable
+UNDEF_REF=     ${UNDEFINED}
+
+# here the reference is quoted
+VARS+=         ${UNDEF_REF:Q}
+
+# and the current value is assigned to another variable
+VARS_VALUE:=   ${VARS}
+
+all:
+       @echo UNDEFINED=${UNDEFINED:Q}""
+       @echo UNDEF_REF=${UNDEF_REF:Q}""
+       @echo VARS=${VARS:Q}""
+       @echo VARS_VALUE=${VARS_VALUE:Q}""
diff -r 35acdf703d38 -r 23f530d3d75b regress/make-quoting/files/bug2.out
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/regress/make-quoting/files/bug2.out       Mon Aug 01 00:40:30 2005 +0000
@@ -0,0 +1,4 @@
+UNDEFINED=
+UNDEF_REF=
+VARS=
+VARS_VALUE=\{UNDEFINED\}



Home | Main Index | Thread Index | Old Index