Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src - Introduce :q modifier for make variables and make it doubl...
details: https://anonhg.NetBSD.org/src/rev/0b2391f5fc4b
branches: trunk
changeset: 319342:0b2391f5fc4b
user: christos <christos%NetBSD.org@localhost>
date: Sun May 27 01:14:50 2018 +0000
description:
- Introduce :q modifier for make variables and make it double escape $'s so
that passing variables to recursive makes with :q works as expected.
- Revert :Q to work as before.
- Adjust makefiles that use recursive make to use :q
Discussed on tech-toolchain@
XXX: pullup 8
diffstat:
external/mit/xorg/xorg-pkg-ver.mk | 4 +-
sys/arch/acorn32/stand/lib/Makefile.inc | 14 +++++-----
sys/arch/hppa/spmath/Makefile.inc | 16 ++++++------
sys/arch/i386/stand/lib/Makefile.inc | 14 +++++-----
sys/arch/ia64/stand/efi/libefi/Makefile.inc | 14 +++++-----
sys/arch/m68k/fpsp/Makefile.inc | 26 +++++++++++-----------
sys/compat/common/Makefile.inc | 28 +++++++++++-----------
sys/lib/libgnuefi/Makefile.inc | 30 ++++++++++++------------
sys/lib/libkern/Makefile.inc | 34 ++++++++++++++--------------
sys/lib/libsa/Makefile.inc | 28 +++++++++++-----------
sys/lib/libz/Makefile.inc | 28 +++++++++++-----------
usr.bin/make/make.1 | 11 +++++++-
usr.bin/make/unit-tests/varquote.exp | 1 +
usr.bin/make/unit-tests/varquote.mk | 7 +++--
usr.bin/make/var.c | 16 +++++++-----
15 files changed, 141 insertions(+), 130 deletions(-)
diffs (truncated from 561 to 300 lines):
diff -r 2ff13869aa3a -r 0b2391f5fc4b external/mit/xorg/xorg-pkg-ver.mk
--- a/external/mit/xorg/xorg-pkg-ver.mk Sun May 27 00:36:56 2018 +0000
+++ b/external/mit/xorg/xorg-pkg-ver.mk Sun May 27 01:14:50 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: xorg-pkg-ver.mk,v 1.8 2015/08/09 10:09:07 aymeric Exp $
+# $NetBSD: xorg-pkg-ver.mk,v 1.9 2018/05/27 01:14:51 christos Exp $
# when including this make sure PROG is set so that $X11SRCDIR.$PROG
# is a valid setting. set XORG_PKG_VER_PROG if PROG is wrong.
@@ -19,7 +19,7 @@
}' ${X11SRCDIR.${XORG_PKG_VER_PROG}}/configure
.if !empty(XORG_PKG_PACKAGE_VERSION)
CPPFLAGS+= -DPACKAGE_VERSION=\"${XORG_PKG_PACKAGE_VERSION:Q}\"
-CPPFLAGS+= -DVERSION=\"${XORG_PKG_PACKAGE_VERSION:Q}\"
+CPPFLAGS+= -DVERSION=\"${XORG_PKG_PACKAGE_VERSION:q}\"
.endif
XORG_PKG_PACKAGE_STRING!= \
diff -r 2ff13869aa3a -r 0b2391f5fc4b sys/arch/acorn32/stand/lib/Makefile.inc
--- a/sys/arch/acorn32/stand/lib/Makefile.inc Sun May 27 00:36:56 2018 +0000
+++ b/sys/arch/acorn32/stand/lib/Makefile.inc Sun May 27 01:14:50 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.3 2016/03/22 08:25:22 mrg Exp $
+# $NetBSD: Makefile.inc,v 1.4 2018/05/27 01:14:50 christos Exp $
#
# Configuration variables (default values are below):
#
@@ -22,12 +22,12 @@
RISCOSMAKE= \
cd ${RISCOSDIR} && MAKEOBJDIRPREFIX= && unset MAKEOBJDIRPREFIX && \
MAKEOBJDIR=${RISCOSDST} ${MAKE} \
- CC=${CC:Q} CFLAGS=${CFLAGS:Q} \
- AS=${AS:Q} AFLAGS=${AFLAGS:Q} \
- LD=${LD:Q} STRIP=${STRIP:Q} \
- MACHINE=${MACHINE} MACHINE_ARCH=${MACHINE_ARCH:Q} \
- RISCOSCPPFLAGS=${CPPFLAGS:S@^-I.@-I../../.@g:Q} \
- RISCOSMISCCPPFLAGS=${RISCOSMISCCPPFLAGS:Q} \
+ CC=${CC:q} CFLAGS=${CFLAGS:q} \
+ AS=${AS:q} AFLAGS=${AFLAGS:q} \
+ LD=${LD:q} STRIP=${STRIP:q} \
+ MACHINE=${MACHINE} MACHINE_ARCH=${MACHINE_ARCH:q} \
+ RISCOSCPPFLAGS=${CPPFLAGS:S@^-I.@-I../../.@g:q} \
+ RISCOSMISCCPPFLAGS=${RISCOSMISCCPPFLAGS:q} \
${RISCOSMISCMAKEFLAGS}
${RISCOSLIB}: .NOTMAIN .MAKE __always_make_riscoslib
diff -r 2ff13869aa3a -r 0b2391f5fc4b sys/arch/hppa/spmath/Makefile.inc
--- a/sys/arch/hppa/spmath/Makefile.inc Sun May 27 00:36:56 2018 +0000
+++ b/sys/arch/hppa/spmath/Makefile.inc Sun May 27 01:14:50 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.9 2016/03/22 08:25:22 mrg Exp $
+# $NetBSD: Makefile.inc,v 1.10 2018/05/27 01:14:50 christos Exp $
# $OpenBSD: Makefile.inc,v 1.4 2001/03/29 03:58:17 mickey Exp $
#
@@ -15,13 +15,13 @@
SPMATHMAKE= \
cd ${SPMATHDIR} && MAKEOBJDIRPREFIX= && unset MAKEOBJDIRPREFIX && \
MAKEOBJDIR=${SPMATHDST} ${MAKE} \
- CC=${CC:Q} CFLAGS=${CFLAGS:Q} \
- SPMATHCPPFLAGS=${CPPFLAGS:S@^-I.@-I. -I../../.@g:Q} \
- AS=${AS:Q} AFLAGS=${AFLAGS:Q} \
- LD=${LD:Q} STRIP=${STRIP:Q} \
- CPP=${CPP:Q} STRIP=${STRIP:Q} AR=${AR:Q} \
- NM=${NM:Q} LORDER=${LORDER:Q} \
- XMACHINE=${MACHINE:Q} XMACHINE_ARCH=${MACHINE_ARCH:Q}
+ CC=${CC:q} CFLAGS=${CFLAGS:q} \
+ SPMATHCPPFLAGS=${CPPFLAGS:S@^-I.@-I. -I../../.@g:q} \
+ AS=${AS:q} AFLAGS=${AFLAGS:q} \
+ LD=${LD:q} STRIP=${STRIP:q} \
+ CPP=${CPP:q} STRIP=${STRIP:q} AR=${AR:q} \
+ NM=${NM:q} LORDER=${LORDER:q} \
+ XMACHINE=${MACHINE:q} XMACHINE_ARCH=${MACHINE_ARCH:q}
${SPMATH}: .NOTMAIN .MAKE __always_make_spmath
@echo making sure the spmath library is up to date...
diff -r 2ff13869aa3a -r 0b2391f5fc4b sys/arch/i386/stand/lib/Makefile.inc
--- a/sys/arch/i386/stand/lib/Makefile.inc Sun May 27 00:36:56 2018 +0000
+++ b/sys/arch/i386/stand/lib/Makefile.inc Sun May 27 01:14:50 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.16 2016/03/22 08:25:22 mrg Exp $
+# $NetBSD: Makefile.inc,v 1.17 2018/05/27 01:14:50 christos Exp $
#
# Configuration variables (default values are below):
#
@@ -24,12 +24,12 @@
I386MAKE= \
cd ${I386DIR} && MAKEOBJDIRPREFIX= && unset MAKEOBJDIRPREFIX && \
MAKEOBJDIR=${I386DST} ${MAKE} \
- CC=${CC:Q} CFLAGS=${CFLAGS:Q} \
- AS=${AS:Q} AFLAGS=${AFLAGS:Q} \
- LD=${LD:Q} STRIP=${STRIP:Q} \
- MACHINE=${MACHINE} MACHINE_ARCH=${MACHINE_ARCH:Q} \
- I386CPPFLAGS=${CPPFLAGS:S@^-I.@-I../../.@g:Q} \
- I386MISCCPPFLAGS=${I386MISCCPPFLAGS:Q} \
+ CC=${CC:q} CFLAGS=${CFLAGS:q} \
+ AS=${AS:q} AFLAGS=${AFLAGS:q} \
+ LD=${LD:q} STRIP=${STRIP:q} \
+ MACHINE=${MACHINE} MACHINE_ARCH=${MACHINE_ARCH:q} \
+ I386CPPFLAGS=${CPPFLAGS:S@^-I.@-I../../.@g:q} \
+ I386MISCCPPFLAGS=${I386MISCCPPFLAGS:q} \
${I386MISCMAKEFLAGS}
${I386LIB}: .NOTMAIN __always_make_i386lib
diff -r 2ff13869aa3a -r 0b2391f5fc4b sys/arch/ia64/stand/efi/libefi/Makefile.inc
--- a/sys/arch/ia64/stand/efi/libefi/Makefile.inc Sun May 27 00:36:56 2018 +0000
+++ b/sys/arch/ia64/stand/efi/libefi/Makefile.inc Sun May 27 01:14:50 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.4 2016/03/22 08:25:22 mrg Exp $
+# $NetBSD: Makefile.inc,v 1.5 2018/05/27 01:14:50 christos Exp $
#
# Configuration variables (default values are below):
#
@@ -22,12 +22,12 @@
EFIMAKE= \
cd ${EFIDIR} && MAKEOBJDIRPREFIX= && unset MAKEOBJDIRPREFIX && \
MAKEOBJDIR=${EFIDST} ${MAKE} \
- CC=${CC:Q} CFLAGS=${CFLAGS:Q} \
- AS=${AS:Q} AFLAGS=${AFLAGS:Q} \
- LD=${LD:Q} STRIP=${STRIP:Q} \
- MACHINE=${MACHINE} MACHINE_ARCH=${MACHINE_ARCH:Q} \
- EFICPPFLAGS=${CPPFLAGS:S@^-I.@-I../../.@g:Q} \
- EFIMISCCPPFLAGS=${EFIMISCCPPFLAGS:Q} \
+ CC=${CC:q} CFLAGS=${CFLAGS:q} \
+ AS=${AS:q} AFLAGS=${AFLAGS:q} \
+ LD=${LD:q} STRIP=${STRIP:q} \
+ MACHINE=${MACHINE} MACHINE_ARCH=${MACHINE_ARCH:q} \
+ EFICPPFLAGS=${CPPFLAGS:S@^-I.@-I../../.@g:q} \
+ EFIMISCCPPFLAGS=${EFIMISCCPPFLAGS:q} \
${EFIMISCMAKEFLAGS}
${EFILIB}: .NOTMAIN __always_make_efilib
diff -r 2ff13869aa3a -r 0b2391f5fc4b sys/arch/m68k/fpsp/Makefile.inc
--- a/sys/arch/m68k/fpsp/Makefile.inc Sun May 27 00:36:56 2018 +0000
+++ b/sys/arch/m68k/fpsp/Makefile.inc Sun May 27 01:14:50 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.20 2016/03/22 08:25:22 mrg Exp $
+# $NetBSD: Makefile.inc,v 1.21 2018/05/27 01:14:50 christos Exp $
#
# Configuration variables (default values are below):
#
@@ -18,27 +18,27 @@
FPSPDST?= ${.OBJDIR}/lib/fpsp
FPSPDOTDIR?= ../../.
-FPSPDIR= ${S:S@^.@${FPSPDOTDIR}@:Q}/arch/m68k/fpsp
+FPSPDIR= ${S:S@^.@${FPSPDOTDIR}@:q}/arch/m68k/fpsp
FPSPOBJ= ${FPSPDST}/fpsp.o
HAS_FPSP!= grep '^\#define FPSP 1$$' opt_fpsp.h || echo
.if !empty(HAS_FPSP)
FPSP= ${FPSPOBJ}
.endif
-# CC=${CC:Q} CFLAGS=${CFLAGS:Q} \
-# AS=${AS:Q} AFLAGS=${AFLAGS:Q} \
-# LD=${LD:Q} STRIP=${STRIP:Q} \
+# CC=${CC:q} CFLAGS=${CFLAGS:q} \
+# AS=${AS:q} AFLAGS=${AFLAGS:q} \
+# LD=${LD:q} STRIP=${STRIP:q} \
FPSPMAKE= \
- cd ${FPSPDST} && ${MAKE} -f ${FPSPDIR:Q}/Makefile \
- FPSPDIR=${FPSPDIR:Q} \
- CC=${CC:Q} CFLAGS=${CFLAGS:Q} \
- LD=${LD:Q} STRIP=${STRIP:Q} \
+ cd ${FPSPDST} && ${MAKE} -f ${FPSPDIR:q}/Makefile \
+ FPSPDIR=${FPSPDIR:q} \
+ CC=${CC:q} CFLAGS=${CFLAGS:q} \
+ LD=${LD:q} STRIP=${STRIP:q} \
MACHINE=${MACHINE} \
- MACHINE_ARCH=${MACHINE_ARCH:Q} \
- FPSPCPPFLAGS=${CPPFLAGS:S@^-I.@-I${FPSPDOTDIR}@g:Q} \
- FPSPMISCCPPFLAGS=${FPSPMISCCPPFLAGS:Q} \
- FPSPDIR=${FPSPDIR:Q} \
+ MACHINE_ARCH=${MACHINE_ARCH:q} \
+ FPSPCPPFLAGS=${CPPFLAGS:S@^-I.@-I${FPSPDOTDIR}@g:q} \
+ FPSPMISCCPPFLAGS=${FPSPMISCCPPFLAGS:q} \
+ FPSPDIR=${FPSPDIR:q} \
${FPSPMISCMAKEFLAGS}
${FPSP}: .NOTMAIN __always_make_fpsp
diff -r 2ff13869aa3a -r 0b2391f5fc4b sys/compat/common/Makefile.inc
--- a/sys/compat/common/Makefile.inc Sun May 27 00:36:56 2018 +0000
+++ b/sys/compat/common/Makefile.inc Sun May 27 01:14:50 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.24 2018/04/12 20:36:59 christos Exp $
+# $NetBSD: Makefile.inc,v 1.25 2018/05/27 01:14:50 christos Exp $
#
# Configuration variables (default values are below):
#
@@ -37,19 +37,19 @@
COMPATLIBLN= ${COMPATDST}/${LIBCOMPATLNBN}
COMPATMAKE= \
- cd ${COMPATDST} && ${MAKE} -f ${COMPATDIR:Q}/Makefile \
- COMPATDIR=${COMPATDIR:Q} \
- CC=${CC:Q} CFLAGS=${CFLAGS:Q} \
- AS=${AS:Q} AFLAGS=${AFLAGS:Q} \
- AR=${AR:Q} NM=${NM:Q} \
- LORDER=${LORDER:Q} \
- TSORT=${TSORT:Q} \
- RANLIB=${RANLIB:Q} \
- LD=${LD:Q} LDFLAGS=${LDFLAGS:Q} \
- STRIP=${STRIP:Q} \
- MACHINE=${MACHINE} MACHINE_ARCH=${MACHINE_ARCH:Q} \
- COMPATCPPFLAGS=${CPPFLAGS:S@^-I.@-I${COMPATDOTDIR}@g:Q} \
- LINTFLAGS=${KERNLINTFLAGS:Q} \
+ cd ${COMPATDST} && ${MAKE} -f ${COMPATDIR:q}/Makefile \
+ COMPATDIR=${COMPATDIR:q} \
+ CC=${CC:q} CFLAGS=${CFLAGS:q} \
+ AS=${AS:q} AFLAGS=${AFLAGS:q} \
+ AR=${AR:q} NM=${NM:q} \
+ LORDER=${LORDER:q} \
+ TSORT=${TSORT:q} \
+ RANLIB=${RANLIB:q} \
+ LD=${LD:q} LDFLAGS=${LDFLAGS:q} \
+ STRIP=${STRIP:q} \
+ MACHINE=${MACHINE} MACHINE_ARCH=${MACHINE_ARCH:q} \
+ COMPATCPPFLAGS=${CPPFLAGS:S@^-I.@-I${COMPATDOTDIR}@g:q} \
+ LINTFLAGS=${KERNLINTFLAGS:q} \
${COMPATMISCMAKEFLAGS}
${COMPATLIB}: .NOTMAIN .MAKE __always_make_compatlib
diff -r 2ff13869aa3a -r 0b2391f5fc4b sys/lib/libgnuefi/Makefile.inc
--- a/sys/lib/libgnuefi/Makefile.inc Sun May 27 00:36:56 2018 +0000
+++ b/sys/lib/libgnuefi/Makefile.inc Sun May 27 01:14:50 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.4 2017/01/24 11:09:14 nonaka Exp $
+# $NetBSD: Makefile.inc,v 1.5 2018/05/27 01:14:50 christos Exp $
#
# Configuration variables (default values are below):
#
@@ -23,7 +23,7 @@
CWARNFLAGS.clang+= -Wno-format-extra-args
-GNUEFIDIR= ${S:S@^.@${GNUEFIDOTDIR}@:Q}/lib/libgnuefi
+GNUEFIDIR= ${S:S@^.@${GNUEFIDOTDIR}@:q}/lib/libgnuefi
.if (${GNUEFI_AS} == "obj")
GNUEFILIB= ${GNUEFIDST}/libgnuefi.o
GNUEFILIB_PROF= ${GNUEFIDST}/libgnuefi.po
@@ -35,19 +35,19 @@
GNUEFIMISCCPPFLAGS+=-I${ZLIBSRCDIR}
GNUEFIMAKE= \
- cd ${GNUEFIDST} && ${MAKE} -f ${GNUEFIDIR:Q}/Makefile \
- GNUEFIDIR=${GNUEFIDIR:Q} \
- CC=${CC:Q} CFLAGS=${CFLAGS:Q} CPUFLAGS= \
- AS=${AS:Q} AFLAGS=${AFLAGS:Q} \
- LORDER=${LORDER:Q} \
- TSORT=${TSORT:Q} \
- LD=${LD:Q} STRIP=${STRIP:Q} \
- AR=${AR:Q} NM=${NM:Q} \
- RANLIB=${RANLIB:Q} SIZE=${SIZE:Q} \
- MACHINE=${MACHINE} MACHINE_ARCH=${MACHINE_ARCH:Q} \
- GNUEFICPPFLAGS=${CPPFLAGS:S@^-I.@-I${GNUEFIDOTDIR}@g:Q} \
- GNUEFIMISCCPPFLAGS=${GNUEFIMISCCPPFLAGS:Q} \
- LIBGNUEFI_ARCH=${LIBGNUEFI_ARCH:Q} \
+ cd ${GNUEFIDST} && ${MAKE} -f ${GNUEFIDIR:q}/Makefile \
+ GNUEFIDIR=${GNUEFIDIR:q} \
+ CC=${CC:q} CFLAGS=${CFLAGS:q} CPUFLAGS= \
+ AS=${AS:q} AFLAGS=${AFLAGS:q} \
+ LORDER=${LORDER:q} \
+ TSORT=${TSORT:q} \
+ LD=${LD:q} STRIP=${STRIP:q} \
+ AR=${AR:q} NM=${NM:q} \
+ RANLIB=${RANLIB:q} SIZE=${SIZE:q} \
+ MACHINE=${MACHINE} MACHINE_ARCH=${MACHINE_ARCH:q} \
+ GNUEFICPPFLAGS=${CPPFLAGS:S@^-I.@-I${GNUEFIDOTDIR}@g:q} \
+ GNUEFIMISCCPPFLAGS=${GNUEFIMISCCPPFLAGS:q} \
+ LIBGNUEFI_ARCH=${LIBGNUEFI_ARCH:q} \
${GNUEFIMISCMAKEFLAGS}
${GNUEFILIB}: .NOTMAIN .MAKE __always_make_gnuefilib
diff -r 2ff13869aa3a -r 0b2391f5fc4b sys/lib/libkern/Makefile.inc
--- a/sys/lib/libkern/Makefile.inc Sun May 27 00:36:56 2018 +0000
+++ b/sys/lib/libkern/Makefile.inc Sun May 27 01:14:50 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.44 2015/10/29 00:18:55 mrg Exp $
+# $NetBSD: Makefile.inc,v 1.45 2018/05/27 01:14:50 christos Exp $
#
# Configuration variables (default values are below):
#
@@ -21,7 +21,7 @@
KERN_AS?= library
KERNDOTDIR?= ../../.
-KERNDIR= ${S:S@^.@${KERNDOTDIR}@:Q}/lib/libkern
+KERNDIR= ${S:S@^.@${KERNDOTDIR}@:q}/lib/libkern
.if (${KERN_AS} == "obj")
KERNLIB= ${KERNDST}/libkern.o
KERNLIB_PROF= ${KERNDST}/libkern.po
@@ -34,21 +34,21 @@
KERNLIBLN= ${KERNDST}/${LIBKERNLNBN}
KERNMAKE= \
- cd ${KERNDST} && ${MAKE} -f ${KERNDIR:Q}/Makefile \
- KERNDIR=${KERNDIR:Q} \
- CC=${CC:Q} CFLAGS=${CFLAGS:Q} CPUFLAGS= \
- AS=${AS:Q} AFLAGS=${AFLAGS:Q} \
Home |
Main Index |
Thread Index |
Old Index