diff --git a/bin/sh/Makefile b/bin/sh/Makefile index 96169ae729d2..8bf47d6cdb0a 100644 --- a/bin/sh/Makefile +++ b/bin/sh/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.81 2007/03/25 06:30:37 apb Exp $ +# $NetBSD: Makefile,v 1.82 2008/10/19 22:05:19 apb Exp $ # @(#)Makefile 8.4 (Berkeley) 5/5/95 .include @@ -23,6 +23,10 @@ DPADD+= ${LIBL} ${LIBEDIT} ${LIBTERMCAP} LFLAGS= -8 # 8-bit lex scanner for arithmetic YFLAGS= -d +# Environment for scripts executed during build. +SCRIPT_ENV= \ + AWK=${TOOL_AWK:Q} \ + # The .depend file can get references to these temporary files .OPTIONAL: lex.yy.c y.tab.c @@ -52,25 +56,25 @@ CLEANFILES+= trace token.h: mktokens ${_MKTARGET_CREATE} - ${HOST_SH} ${.ALLSRC} + ${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC} builtins.h: builtins.c ${_MKTARGET_CREATE} builtins.c: mkbuiltins shell.h builtins.def ${_MKTARGET_CREATE} - ${HOST_SH} ${.ALLSRC} ${.OBJDIR} + ${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC} ${.OBJDIR} [ -f builtins.h ] init.c: mkinit.sh ${SHSRCS} ${_MKTARGET_CREATE} - ${HOST_SH} ${.ALLSRC} + ${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC} nodes.h: nodes.c nodes.c: mknodes.sh nodetypes nodes.c.pat ${_MKTARGET_CREATE} - ${HOST_SH} ${.ALLSRC} ${.OBJDIR} + ${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC} ${.OBJDIR} [ -f nodes.h ] .if ${USETOOLS} == "yes" diff --git a/crypto/dist/openssl/crypto/rc4/Makefile b/crypto/dist/openssl/crypto/rc4/Makefile index b3d4aa418c23..9b69e006803d 100644 --- a/crypto/dist/openssl/crypto/rc4/Makefile +++ b/crypto/dist/openssl/crypto/rc4/Makefile @@ -50,7 +50,8 @@ rc4-ia64.S: asm/rc4-ia64.pl $(PERL) asm/rc4-ia64.pl $(CFLAGS) > $@ rc4-ia64.s: rc4-ia64.S - @case `awk '/^#define RC4_INT/{print$$NF}' $(TOP)/include/openssl/opensslconf.h` in \ + @case `${TOOL_AWK} '/^#define RC4_INT/{print$$NF}' \ + $(TOP)/include/openssl/opensslconf.h` in \ int) set -x; $(CC) $(CFLAGS) -DSZ=4 -E rc4-ia64.S > $@ ;; \ char) set -x; $(CC) $(CFLAGS) -DSZ=1 -E rc4-ia64.S > $@ ;; \ *) exit 1 ;; \ diff --git a/distrib/acorn32/stand/Makefile b/distrib/acorn32/stand/Makefile index 0ae59956dceb..341e07a8c68d 100644 --- a/distrib/acorn32/stand/Makefile +++ b/distrib/acorn32/stand/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.25 2008/06/23 02:16:53 matt Exp $ +# $NetBSD: Makefile,v 1.26 2008/10/19 22:05:19 apb Exp $ # .include @@ -100,7 +100,7 @@ setup_tmp: settypes: setup_tmp .for file in ${SETTYPE_FILES} . if ${SETTYPE_FILE_${file}} == ffb - ${AWK} '{ printf "%5d %s\n", FNR * 10, $$0 }' \ + ${TOOL_AWK} '{ printf "%5d %s\n", FNR * 10, $$0 }' \ < tmp/BtNetBSD/${file} > tmp/BtNetBSD/${file}.tmp mv tmp/BtNetBSD/${file}.tmp tmp/BtNetBSD/${file} . endif diff --git a/distrib/common/Makefile.crunch b/distrib/common/Makefile.crunch index 1dab1732501b..dc6d939d8dfc 100644 --- a/distrib/common/Makefile.crunch +++ b/distrib/common/Makefile.crunch @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.crunch,v 1.23 2005/11/10 21:29:37 dsl Exp $ +# $NetBSD: Makefile.crunch,v 1.24 2008/10/19 22:05:19 apb Exp $ # # Makefile snippet to build a crunchgen(1)ed binary from the provided lists # @@ -26,6 +26,7 @@ .if !defined(_MAKEFILE_CRUNCH_) _MAKEFILE_CRUNCH_=1 +CRUNCHENV+= AWK=${TOOL_AWK:Q} SMALLPROG?= 1 SMALLPROG_INET6?= 0 diff --git a/distrib/common/Makefile.parselist b/distrib/common/Makefile.parselist index 3f20884d685d..f8b6dbf9b4c1 100644 --- a/distrib/common/Makefile.parselist +++ b/distrib/common/Makefile.parselist @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.parselist,v 1.5 2003/11/14 06:00:34 matt Exp $ +# $NetBSD: Makefile.parselist,v 1.6 2008/10/19 22:05:20 apb Exp $ # # Makefile snippet to setup parselist.awk related variables: # PARSELISTENV environment variables to pass to parselist.awk @@ -22,7 +22,7 @@ PARSELISTENV+= NETBSDSRCDIR=${NETBSDSRCDIR:Q} \ OBJDIR=${.OBJDIR:Q} PARSELISTDEP= ${DISTRIBDIR}/common/parselist.awk -PARSELIST= ${PARSELISTENV} ${AWK} -f ${PARSELISTDEP} +PARSELIST= ${PARSELISTENV} ${TOOL_AWK} -f ${PARSELISTDEP} .endif # _MAKEFILE_PARSELIST_ diff --git a/distrib/sets/Makefile b/distrib/sets/Makefile index 66c776ed1990..a20278a46e54 100644 --- a/distrib/sets/Makefile +++ b/distrib/sets/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.61 2008/08/31 00:19:33 lukem Exp $ +# $NetBSD: Makefile,v 1.62 2008/10/19 22:05:20 apb Exp $ # The `all' target must appear before bsd.own.mk is pulled in. all: @@ -12,6 +12,7 @@ GREP?= grep SETSCMD= cd ${.CURDIR} && \ DESTDIR=${DESTDIR:Q} \ MACHINE=${MACHINE:Q} MACHINE_ARCH=${MACHINE_ARCH:Q} \ + AWK=${TOOL_AWK:Q} \ CKSUM=${TOOL_CKSUM:Q} \ DB=${TOOL_DB:Q} \ HOST_SH=${HOST_SH:Q} \ diff --git a/distrib/syspkg/mk/bsd.syspkg.mk b/distrib/syspkg/mk/bsd.syspkg.mk index ec45099ed37f..fb4ebbb67b85 100644 --- a/distrib/syspkg/mk/bsd.syspkg.mk +++ b/distrib/syspkg/mk/bsd.syspkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.syspkg.mk,v 1.3 2004/03/02 23:25:05 xtraeme Exp $ +# $NetBSD: bsd.syspkg.mk,v 1.4 2008/10/19 22:05:20 apb Exp $ # # This file is derived from: # @@ -98,7 +98,7 @@ PKG_DEINSTALL_FILE= ${PKGDIR}/DEINSTALL MESSAGE_FILE= ${PKGDIR}/MESSAGE .endif -AWK?= /usr/bin/awk +AWK?= ${TOOL_AWK:U/usr/bin/awk} CAT?= /bin/cat CP?= /bin/cp DC?= /usr/bin/dc diff --git a/distrib/utils/sysinst/Makefile.inc b/distrib/utils/sysinst/Makefile.inc index 86b30bacc878..661b3f52af9a 100644 --- a/distrib/utils/sysinst/Makefile.inc +++ b/distrib/utils/sysinst/Makefile.inc @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.45 2008/08/29 00:02:22 gmcgarry Exp $ +# $NetBSD: Makefile.inc,v 1.46 2008/10/19 22:05:20 apb Exp $ # # Makefile for sysinst @@ -25,7 +25,7 @@ MSG_MD?= msg.md.${SYSINSTLANG} MENUS_MD?= menus.md.${SYSINSTLANG} .include # for mk.conf -.include # for HOST_SH +.include # for HOST_SH, TOOL_* .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib" _MKSHTARGET_CREATE?= ${_MKSHMSG_CREATE} ${.CURDIR:T}/${.TARGET} @@ -108,24 +108,24 @@ msgtouch: ${DISTRIBVERDEP} msg.def: msg.mi.${SYSINSTLANG} ${MSG_MD} msgtouch ${_MKTARGET_CREATE} sed "s/@@VERSION@@/${DISTRIBVER}/" ${.ALLSRC} | \ - awk -f ${UNIF_AWK} -v defines="${MD_OPTIONS}" > ${.TARGET} + ${TOOL_AWK} -f ${UNIF_AWK} -v defines="${MD_OPTIONS}" > ${.TARGET} menus.def: menus.mi ${MENUS_MD} msgtouch ${_MKTARGET_CREATE} sed "s/@@VERSION@@/${DISTRIBVER}/" ${.ALLSRC} | \ - awk -f ${UNIF_AWK} -v defines="${MD_OPTIONS}" > ${.TARGET} + ${TOOL_AWK} -f ${UNIF_AWK} -v defines="${MD_OPTIONS}" > ${.TARGET} sysinstmsgs.fmtcnt: msg.mi.${SYSINSTLANG} ${MSG_MD} msgtouch msg_defs.h ${_MKTARGET_CREATE} sed "s/@@VERSION@@/${DISTRIBVER}/" ${.ALLSRC:M*.${SYSINSTLANG}} | \ - awk -f ${UNIF_AWK} -v defines="${MD_OPTIONS}" | \ + ${TOOL_AWK} -f ${UNIF_AWK} -v defines="${MD_OPTIONS}" | \ ${HOST_SH} ${MSG_XLAT_SH} -c > ${.TARGET} .for LANG in ${LANGUAGES:N${SYSINSTLANG}} sysinstmsgs.${LANG}: msg.mi.${LANG} ${MSG_MD:S/.${SYSINSTLANG}$/.${LANG}/} msgtouch msg_defs.h sysinstmsgs.fmtcnt ${_MKTARGET_CREATE} sed "s/@@VERSION@@/${DISTRIBVER}/" ${.ALLSRC:M*.${LANG}} | \ - awk -f ${UNIF_AWK} -v defines="${MD_OPTIONS}" | \ + ${TOOL_AWK} -f ${UNIF_AWK} -v defines="${MD_OPTIONS}" | \ ${HOST_SH} ${MSG_XLAT_SH} -f sysinstmsgs.fmtcnt > ${.TARGET} DPSRCS+= sysinstmsgs.${LANG} diff --git a/etc/Makefile b/etc/Makefile index e4470132fc66..aea72b07de7d 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.358 2008/08/28 07:21:49 lukem Exp $ +# $NetBSD: Makefile,v 1.359 2008/10/19 22:05:20 apb Exp $ # from: @(#)Makefile 8.7 (Berkeley) 5/25/95 # Environment variables without default values: @@ -36,7 +36,7 @@ # For MK* vars .include -.include # for HOST_SH +.include # for HOST_SH, TOOL_AWK, ... .include # For KERNSRCDIR, KERNOBJDIR, ... .include # For TARGET_ENDIANNESS @@ -172,7 +172,8 @@ MAKEDEV: .EXEC ${_MKTARGET_CREATE} MACHINE=${MACHINE:Q} MACHINE_ARCH=${MACHINE_ARCH:Q} \ NETBSDSRCDIR=${NETBSDSRCDIR:Q} \ - awk -f ${.CURDIR}/MAKEDEV.awk ${.CURDIR}/MAKEDEV.tmpl > ${.TARGET} + ${TOOL_AWK} -f ${.CURDIR}/MAKEDEV.awk ${.CURDIR}/MAKEDEV.tmpl \ + > ${.TARGET} RELEASEVARS= BSDOBJDIR BSDSRCDIR BUILDID \ DESTDIR EXTERNAL_TOOLCHAIN HAVE_GCC HAVE_GDB \ @@ -402,7 +403,7 @@ distrib-dirs: .PHONY check_DESTDIR .if ${MKUNPRIVED} != "no" # { ${TOOL_MTREE} -def ${.CURDIR}/mtree/NetBSD.dist -N ${.CURDIR} \ -p ${DESTDIR}/ -C -k all | \ - awk '/ optional/ {next} // {print}' | ${METALOG.add} + ${TOOL_AWK} '/ optional/ {next} // {print}' | ${METALOG.add} .endif # MKUNPRIVED # } .endif # DISTRIBUTION_DONE # } @@ -537,7 +538,7 @@ snap_post: .PHONY .MAKE build_kernelsets build_releasekernels # ALL_KERNELS?= ${KERNEL_SETS} ${EXTRA_KERNELS} ${BUILD_KERNELS} -GETKERNELAWK= awk '/^config/ {print $$2; found=1} \ +GETKERNELAWK= ${TOOL_AWK} '/^config/ {print $$2; found=1} \ END{ if (found == 0) print "netbsd"; }' build_kernels: .PHONY diff --git a/etc/etc.sgimips/Makefile.inc b/etc/etc.sgimips/Makefile.inc index d2013361bc60..c47dda8a0535 100644 --- a/etc/etc.sgimips/Makefile.inc +++ b/etc/etc.sgimips/Makefile.inc @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.17 2008/03/18 04:20:37 lukem Exp $ +# $NetBSD: Makefile.inc,v 1.18 2008/10/19 22:05:20 apb Exp $ # # etc.sgimips/Makefile.inc -- sgimips-specific etc Makefile targets # @@ -25,10 +25,12 @@ iso-image-md-pre: SGI.image= ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/cdrom/netbsd-sgimips.img iso-image-md-post: - @SEEK=`awk '/SGI_BOOT_BLOCK_SIZE_VOLHDR/{print $$3}' \ + @SEEK=`${TOOL_AWK} '/SGI_BOOT_BLOCK_SIZE_VOLHDR/{print $$3}' \ ${DESTDIR}/usr/include/sys/bootblock.h` ; \ EST=`ls -l ${CDROM.image} \ - | awk '{ s += $$5} END { print int(('$${SEEK}'*512+s)/1024/1024/32+1)*32 }'` ; \ + | ${TOOL_AWK} '{ s += $$5 } \ + END { print int(('$${SEEK}'*512+s)/1024/1024/32+1)*32 \ + }'` ; \ echo "Estimated image size: $${EST} MB"; \ dd if=/dev/zero of=${SGI.image} bs=1024k count=$${EST}; \ ${TOOLDIR}/bin/nbsgivol -f -i ${SGI.image}; \ diff --git a/external/bsd/top/bin/Makefile b/external/bsd/top/bin/Makefile index 716420b36de5..f40a5ecc0ff9 100644 --- a/external/bsd/top/bin/Makefile +++ b/external/bsd/top/bin/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2008/07/17 10:46:56 lukem Exp $ +# $NetBSD: Makefile,v 1.2 2008/10/19 22:05:20 apb Exp $ .include @@ -20,8 +20,8 @@ DPADD+= ${LIBTERMCAP} ${LIBM} ${LIBKVM} sigdesc.h: ${TOPDIR}/sigconv.awk ${DESTDIR}/usr/include/sys/signal.h ${_MKTARGET_CREATE} - awk -f ${TOPDIR}/sigconv.awk ${DESTDIR}/usr/include/sys/signal.h > \ - ${.TARGET} + ${TOOL_AWK} -f ${TOPDIR}/sigconv.awk \ + ${DESTDIR}/usr/include/sys/signal.h > ${.TARGET} CLEANFILES+= sigdesc.h top.1 config.h top.1: top.1.in diff --git a/external/mit/xorg/server/drivers/Makefile.xf86-driver b/external/mit/xorg/server/drivers/Makefile.xf86-driver index e1af57c20089..c4fdd2b7b6ec 100644 --- a/external/mit/xorg/server/drivers/Makefile.xf86-driver +++ b/external/mit/xorg/server/drivers/Makefile.xf86-driver @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.xf86-driver,v 1.12 2008/10/13 11:11:35 rtr Exp $ +# $NetBSD: Makefile.xf86-driver,v 1.13 2008/10/19 22:05:20 apb Exp $ LIBISMODULE= yes SHLIB_MAJOR= ${PACKAGE_MAJOR} @@ -9,7 +9,7 @@ SHLIB_MAJOR= ${PACKAGE_MAJOR} LIB= ${DRIVER_NAME} LIBDIR= ${X11USRLIBDIR}/modules/drivers -PRINT_PACKAGE_VERSION= awk '/^PACKAGE_VERSION=/ { \ +PRINT_PACKAGE_VERSION= ${TOOL_AWK} '/^PACKAGE_VERSION=/ { \ match($$1, "[0-9]+\\.[0-9]+\\.[0-9]+"); \ version = substr($$1, RSTART, RLENGTH); \ } END { print version }' \ diff --git a/gnu/lib/libgcc4/libgcc/Makefile b/gnu/lib/libgcc4/libgcc/Makefile index 79f5866dd0ed..b4c4cbe43f63 100644 --- a/gnu/lib/libgcc4/libgcc/Makefile +++ b/gnu/lib/libgcc4/libgcc/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 2008/09/18 12:20:19 skrll Exp $ +# $NetBSD: Makefile,v 1.6 2008/10/19 22:05:20 apb Exp $ REQUIRETOOLS= yes NOLINT= # defined @@ -24,7 +24,8 @@ CLEANFILES+= ${SOBJS:=.tmp1} ${SOBJS:=.tmp2} .c.so: ${_MKTARGET_COMPILE} ${COMPILE.c} ${CSHLIBFLAGS} ${.IMPSRC} -o ${.TARGET}.tmp1 - ${NM} -pg ${.TARGET}.tmp1 | ${AWK} 'NF == 3 { print "\t.hidden", $$3 }' | \ + ${NM} -pg ${.TARGET}.tmp1 | \ + ${TOOL_AWK} 'NF == 3 { print "\t.hidden", $$3 }' | \ ${CC} -Wl,-x -r -nostdinc -nostdlib ${CPUFLAGS} -o ${.TARGET}.tmp2 ${.TARGET}.tmp1 -xassembler - .if defined(COPTS) && !empty(COPTS:M*-g*) mv ${.TARGET}.tmp2 ${.TARGET} @@ -37,7 +38,8 @@ CLEANFILES+= ${SOBJS:=.tmp1} ${SOBJS:=.tmp2} .S.so .s.so: ${_MKTARGET_COMPILE} ${COMPILE.S} ${CAPICFLAGS} ${CFLAGS:M-[ID]*} ${.IMPSRC} -o ${.TARGET}.tmp1 - ${NM} -pg ${.TARGET}.tmp1 | ${AWK} 'NF == 3 { print "\t.hidden", $$3 }' | \ + ${NM} -pg ${.TARGET}.tmp1 | \ + ${TOOL_AWK} 'NF == 3 { print "\t.hidden", $$3 }' | \ ${CC} -Wl,-x -r -nostdinc -nostdlib -o ${.TARGET}.tmp2 ${.TARGET}.tmp1 -xassembler - .if defined(COPTS) && !empty(COPTS:M*-g*) mv ${.TARGET}.tmp2 ${.TARGET} diff --git a/gnu/lib/libgcc4/libgcc_s/Makefile b/gnu/lib/libgcc4/libgcc_s/Makefile index 9abb3dc678c0..1f1a90e64526 100644 --- a/gnu/lib/libgcc4/libgcc_s/Makefile +++ b/gnu/lib/libgcc4/libgcc_s/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 2008/09/18 12:20:19 skrll Exp $ +# $NetBSD: Makefile,v 1.6 2008/10/19 22:05:20 apb Exp $ REQUIRETOOLS= yes NOLINT= # defined @@ -43,7 +43,7 @@ libgcc.map: ${LIBGCC_S_OBJS} ${G_SHLIB_MKMAP} ${G_SHLIB_MAPFILES} cat ${G_SHLIB_MAPFILES} | \ sed -e "/^[ ]*#/d" -e 's/^%\(if\|else\|elif\|endif\|define\)/#\1/' | \ ${CC} ${G_LIBGCC2_CFLAGS} ${G_INCLUDES} -E -xassembler-with-cpp -; \ - } | ${AWK} -f ${G_SHLIB_MKMAP} > ${.TARGET}.tmp + } | ${TOOL_AWK} -f ${G_SHLIB_MKMAP} > ${.TARGET}.tmp mv ${.TARGET}.tmp ${.TARGET} .else diff --git a/gnu/lib/libobjc4/Makefile b/gnu/lib/libobjc4/Makefile index 61a2902239c0..91362bb1a789 100644 --- a/gnu/lib/libobjc4/Makefile +++ b/gnu/lib/libobjc4/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.10 2008/02/09 01:03:38 mrg Exp $ +# $NetBSD: Makefile,v 1.11 2008/10/19 22:05:20 apb Exp $ REQUIRETOOLS= yes NOLINT= # defined @@ -97,10 +97,12 @@ CLEANFILES+= cs-tconfig.h tconfig.h unwind.h # XXX just while all platforms defs.mk are updated.. .if exists(${.CURDIR}/arch/${MACHINE_ARCH}/defs.mk) optionlist: ${G_ALL_OPT_FILES} ${LIBOBJCARCH}/defs.mk Makefile ${DIST}/gcc/opt-gather.awk - ${AWK} -f ${DIST}/gcc/opt-gather.awk ${G_ALL_OPT_FILES} > ${.TARGET} + ${TOOL_AWK} -f ${DIST}/gcc/opt-gather.awk ${G_ALL_OPT_FILES} \ + > ${.TARGET} options.h: optionlist ${DIST}/gcc/opt-functions.awk ${DIST}/gcc/opth-gen.awk - ${AWK} -f ${DIST}/gcc/opt-functions.awk -f ${DIST}/gcc/opth-gen.awk \ + ${TOOL_AWK} -f ${DIST}/gcc/opt-functions.awk \ + -f ${DIST}/gcc/opth-gen.awk \ < optionlist > ${.TARGET} CLEANFILES+= options.h optionlist diff --git a/gnu/usr.bin/gcc4/backend/Makefile b/gnu/usr.bin/gcc4/backend/Makefile index 436b4409c0d5..177f040b3e5e 100644 --- a/gnu/usr.bin/gcc4/backend/Makefile +++ b/gnu/usr.bin/gcc4/backend/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.11 2008/05/31 16:05:20 christos Exp $ +# $NetBSD: Makefile,v 1.12 2008/10/19 22:05:20 apb Exp $ LIBISPRIVATE= yes @@ -156,14 +156,14 @@ tm_p.h: Makefile CLEANFILES+= options.h options.c optionlist optionlist: ${G_ALL_OPT_FILES} ${GCCARCH}/defs.mk Makefile ${DIST}/gcc/opt-gather.awk - ${AWK} -f ${DIST}/gcc/opt-gather.awk ${G_ALL_OPT_FILES} > ${.TARGET} + ${TOOL_AWK} -f ${DIST}/gcc/opt-gather.awk ${G_ALL_OPT_FILES} > ${.TARGET} options.c: optionlist ${DIST}/gcc/opt-functions.awk ${DIST}/gcc/optc-gen.awk - ${AWK} -f ${DIST}/gcc/opt-functions.awk -f ${DIST}/gcc/optc-gen.awk \ + ${TOOL_AWK} -f ${DIST}/gcc/opt-functions.awk -f ${DIST}/gcc/optc-gen.awk \ -v header_name="config.h system.h coretypes.h tm.h" < optionlist > ${.TARGET} options.h: optionlist ${DIST}/gcc/opt-functions.awk ${DIST}/gcc/opth-gen.awk - ${AWK} -f ${DIST}/gcc/opt-functions.awk -f ${DIST}/gcc/opth-gen.awk \ + ${TOOL_AWK} -f ${DIST}/gcc/opt-functions.awk -f ${DIST}/gcc/opth-gen.awk \ < optionlist > ${.TARGET} options.o: options.c coretypes.h opts.h intl.h @@ -176,6 +176,7 @@ auto-build.h: Makefile rm -rf .ab && \ mkdir .ab && \ (cd .ab && \ + AWK=${TOOL_AWK:Q} \ CC=${HOST_CC:Q} \ MAKE=${MAKE:Q} \ CONFIG_SHELL=${HOST_SH:Q} \ diff --git a/gnu/usr.bin/groff/src/utils/indxbib/Makefile b/gnu/usr.bin/groff/src/utils/indxbib/Makefile index 396fdc0271e4..1bbc1a6f7816 100644 --- a/gnu/usr.bin/groff/src/utils/indxbib/Makefile +++ b/gnu/usr.bin/groff/src/utils/indxbib/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2006/10/09 08:32:54 mrg Exp $ +# $NetBSD: Makefile,v 1.5 2008/10/19 22:05:20 apb Exp $ # $FreeBSD: src/gnu/usr.bin/groff/src/utils/indxbib/Makefile,v 1.7 2003/05/01 13:22:21 ru Exp $ @@ -10,10 +10,11 @@ DPADD+= ${LIBBIB} ${LIBGROFF} ${LIBM} ${LIBSUPCXX} LDADD+= ${LIBBIB} ${LIBGROFF} -lm -lsupc++ CLEANFILES= ${MAN} -COMMON_WORDS_FILE!=awk -F\" '/COMMON_WORDS_FILE/ { print $$2 }' ${.CURDIR}/../../include/defs.h - .include +COMMON_WORDS_FILE!= ${TOOL_AWK} -F\" '/COMMON_WORDS_FILE/ { print $$2 }' \ + ${.CURDIR}/../../include/defs.h + .if ${MKSHARE} != "no" FILES=eign FILESNAME=${COMMON_WORDS_FILE:T} diff --git a/gnu/usr.sbin/postfix/postconf/Makefile b/gnu/usr.sbin/postfix/postconf/Makefile index 061c9bbf015a..f3406630fd9c 100644 --- a/gnu/usr.sbin/postfix/postconf/Makefile +++ b/gnu/usr.sbin/postfix/postconf/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.13 2008/06/22 14:38:13 christos Exp $ +# $NetBSD: Makefile,v 1.14 2008/10/19 22:05:20 apb Exp $ # XXX Note we aren't building ../conf/main.cf.default # The shipped makefiles construct it using postconf -d after building @@ -32,17 +32,15 @@ CPPFLAGS+= -I. DPADD+= ${LIBPGLOBAL} ${LIBPXSASL} ${LIBPUTIL} LDADD+= ${LIBPGLOBAL} ${LIBPXSASL} ${LIBPUTIL} -# XXX Note that there is no ${AWK} variable in our build system. This -# is probably a deficiency. ${GENSRCS}: postconf-hdrs.stamp CLEANFILES+= postconf-hdrs.stamp postconf-hdrs.stamp: ${DIST}/../global/mail_params.h ${DIST}/../global/mail_params.c ${_MKMSG_CREATE} ${GENSRCS} rm -f ${.TARGET} - awk -f ${DIST}/extract.awk ${DIST}/../*/*.c + ${TOOL_AWK} -f ${DIST}/extract.awk ${DIST}/../*/*.c touch ${.TARGET} auto_table.h auto_vars.h: ${DIST}/auto.awk - awk -f ${DIST}/auto.awk + ${TOOL_AWK} -f ${DIST}/auto.awk .include diff --git a/regress/sys/kern/extent/Makefile b/regress/sys/kern/extent/Makefile index 60ccfc642bbc..d22416e034b6 100644 --- a/regress/sys/kern/extent/Makefile +++ b/regress/sys/kern/extent/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 2002/09/18 04:16:02 lukem Exp $ +# $NetBSD: Makefile,v 1.6 2008/10/19 22:05:20 apb Exp $ NOMAN= # defined @@ -17,6 +17,6 @@ regress: ${PROG} tail +4 ${.CURDIR}/extest.exp | diff - extest.out extest.c: extest.awk tests - awk -f ${.CURDIR}/extest.awk <${.CURDIR}/tests >extest.c + ${TOOL_AWK} -f ${.CURDIR}/extest.awk <${.CURDIR}/tests >extest.c .include diff --git a/sbin/wsconsctl/Makefile b/sbin/wsconsctl/Makefile index 31f22542bc91..c852d3f02e14 100644 --- a/sbin/wsconsctl/Makefile +++ b/sbin/wsconsctl/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.12 2005/01/20 16:39:23 xtraeme Exp $ +# $NetBSD: Makefile,v 1.13 2008/10/19 22:05:20 apb Exp $ PROG= wsconsctl SRCS= display.c keyboard.c keysym.c map_parse.y map_scan.l \ @@ -12,7 +12,11 @@ CLEANFILES+= keysym.h .include +# Environment for scripts executed during build. +SCRIPT_ENV= \ + AWK=${TOOL_AWK:Q} \ + keysym.h: mkkeysym.sh ${DESTDIR}/usr/include/dev/wscons/wsksymdef.h ${_MKTARGET_CREATE} - ${HOST_SH} ${.CURDIR}/mkkeysym.sh \ + ${SCRIPT_ENV} ${HOST_SH} ${.CURDIR}/mkkeysym.sh \ ${DESTDIR}/usr/include/dev/wscons/wsksymdef.h > keysym.h diff --git a/share/doc/iso/wisc/Makefile b/share/doc/iso/wisc/Makefile index ad9d8d7cae99..4500128605e8 100644 --- a/share/doc/iso/wisc/Makefile +++ b/share/doc/iso/wisc/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2003/07/10 10:34:25 lukem Exp $ +# $NetBSD: Makefile,v 1.5 2008/10/19 22:05:20 apb Exp $ # # Makefile for the tp documents: # design: TP design/source guide @@ -59,12 +59,14 @@ appendix_c: ditroff -man -P$(PRINTER) ../man/man8/tpstat.8 appendix_a: - ctags -x $(SRCS) | awk '{printf("%s %s %s\n", $$1, $$3, $$2)}'\ + ctags -x $(SRCS) \ + | ${TOOL_AWK} '{printf("%s\t%s\t%s\n", $$1, $$3, $$2)}' \ | sed -e 's-../../sys/netargo/--' > index_by_func.nr format -P$(PRINTER) appendix_a.nr appendix_b: - ctags -x $(SRCS) | awk '{printf("%s %s %s\n", $$3, $$1, $$2)}'\ + ctags -x $(SRCS) \ + | ${TOOL_AWK} '{printf("%s\t%s\t%s\n", $$3, $$1, $$2)}' \ | sed -e 's-../../sys/netargo/--' \ | sort \ | fmtxref -w 80 \ diff --git a/share/doc/papers/sysperf/Makefile b/share/doc/papers/sysperf/Makefile index 44e66836a143..98c5838e4a9e 100644 --- a/share/doc/papers/sysperf/Makefile +++ b/share/doc/papers/sysperf/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2003/07/10 10:34:29 lukem Exp $ +# $NetBSD: Makefile,v 1.5 2008/10/19 22:05:20 apb Exp $ # # @(#)Makefile 1.6 (Berkeley) 6/8/93 @@ -16,9 +16,9 @@ paper.tmp: ${SRCS} ${TOOL_TBL} ${SRCS} | ${TOOL_EQN} > paper.tmp appendix.tmp: a1.t a2.t - ${TOOL_VGRIND} -f a1.t | awk '/\.\(\)/{ cnt = 2 } \ + ${TOOL_VGRIND} -f a1.t | ${TOOL_AWK} '/\.\(\)/{ cnt = 2 } \ { if (cnt) cnt -= 1; else print $$0; } ' > appendix.tmp - ${TOOL_VGRIND} -f -lcsh a2.t | awk '/\.\(\)/{ cnt = 2 } \ + ${TOOL_VGRIND} -f -lcsh a2.t | ${TOOL_AWK} '/\.\(\)/{ cnt = 2 } \ { if (cnt) cnt -= 1; else print $$0; } ' >> appendix.tmp .include diff --git a/share/misc/Makefile b/share/misc/Makefile index ce773ffffd84..7c3961802f1f 100644 --- a/share/misc/Makefile +++ b/share/misc/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.31 2007/09/29 15:40:31 hubertf Exp $ +# $NetBSD: Makefile,v 1.32 2008/10/19 22:05:20 apb Exp $ # @(#)Makefile 8.1 (Berkeley) 6/8/93 NOOBJ= # defined @@ -25,6 +25,6 @@ update-domains: ) > domains ; \ update-na.phone: - < /dev/null awk -f nanpa.awk > na.phone + < /dev/null ${TOOL_AWK} -f nanpa.awk > na.phone .include diff --git a/share/mk/bsd.kmod.mk b/share/mk/bsd.kmod.mk index 372332b4b677..b0f8e1fdccc5 100644 --- a/share/mk/bsd.kmod.mk +++ b/share/mk/bsd.kmod.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.kmod.mk,v 1.88 2008/08/24 06:27:00 gmcgarry Exp $ +# $NetBSD: bsd.kmod.mk,v 1.89 2008/10/19 22:05:21 apb Exp $ .include .include @@ -52,18 +52,20 @@ ${KMOD}_tmp.o: ${OBJS} ${DPADD} ${KMOD}_tramp.S: ${KMOD}_tmp.o $S/lkm/arch/${MACHINE_CPU}/lkmtramp.awk ${_MKTARGET_CREATE} ${OBJDUMP} --syms --reloc ${KMOD}_tmp.o | \ - awk -f $S/lkm/arch/${MACHINE_CPU}/lkmtramp.awk > tmp.S + ${TOOL_AWK} -f $S/lkm/arch/${MACHINE_CPU}/lkmtramp.awk \ + > tmp.S mv tmp.S ${.TARGET} ${PROG}: ${KMOD}_tmp.o ${KMOD}_tramp.o ${_MKTARGET_LINK} ${LD} -r \ `${OBJDUMP} --syms --reloc ${KMOD}_tmp.o | \ - awk -f $S/lkm/arch/${MACHINE_CPU}/lkmwrap.awk` \ + ${TOOL_AWK} -f $S/lkm/arch/${MACHINE_CPU}/lkmwrap.awk` \ -o tmp.o ${KMOD}_tmp.o ${KMOD}_tramp.o .if exists($S/lkm/arch/${MACHINE_CPU}/lkmhide.awk) ${OBJCOPY} \ - `${NM} tmp.o | awk -f $S/lkm/arch/${MACHINE_CPU}/lkmhide.awk` \ + `${NM} tmp.o | \ + ${TOOL_AWK} -f $S/lkm/arch/${MACHINE_CPU}/lkmhide.awk` \ tmp.o tmp1.o mv tmp1.o tmp.o .endif diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index daf442247ac6..117fa9eaadd2 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.lib.mk,v 1.288 2008/10/19 15:22:50 christos Exp $ +# $NetBSD: bsd.lib.mk,v 1.289 2008/10/19 22:05:21 apb Exp $ # @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94 .include @@ -76,6 +76,7 @@ SHLIB_TEENY != . ${SHLIB_VERSION_FILE} ; echo $$teeny exists(${NETBSDSRCDIR}/lib/checkver) checkver: @(cd ${.CURDIR} && \ + HOST_SH=${HOST_SH:Q} AWK=${TOOL_AWK:Q} \ ${HOST_SH} ${NETBSDSRCDIR}/lib/checkver -v ${SHLIB_VERSION_FILE} \ -d ${DESTDIR}${_LIBSODIR} ${LIB}) .endif diff --git a/share/mk/bsd.x11.mk b/share/mk/bsd.x11.mk index ca4ac7e804ce..aba48a92ef15 100644 --- a/share/mk/bsd.x11.mk +++ b/share/mk/bsd.x11.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.x11.mk,v 1.68 2008/10/14 23:33:55 cube Exp $ +# $NetBSD: bsd.x11.mk,v 1.69 2008/10/19 22:05:21 apb Exp $ .include @@ -150,7 +150,8 @@ PRINT_PACKAGE_VERSION= awk '/^PACKAGE_VERSION=/ { \ # Extract X11VERSION -PRINTX11VERSION=awk '/^\#define XF86_VERSION_MAJOR/ {major = $$3} \ +PRINTX11VERSION=${TOOL_AWK} ' \ + /^\#define XF86_VERSION_MAJOR/ {major = $$3} \ /^\#define XF86_VERSION_MINOR/ {minor = $$3} \ /^\#define XF86_VERSION_PATCH/ {patch = $$3} \ /^\#define XF86_VERSION_SNAP/ {snap = $$3} \ diff --git a/sys/arch/acorn32/conf/Makefile.acorn32 b/sys/arch/acorn32/conf/Makefile.acorn32 index daf8a97c34b8..ad15590138a5 100644 --- a/sys/arch/acorn32/conf/Makefile.acorn32 +++ b/sys/arch/acorn32/conf/Makefile.acorn32 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.acorn32,v 1.22 2008/02/14 00:35:56 joerg Exp $ +# $NetBSD: Makefile.acorn32,v 1.23 2008/10/19 22:05:21 apb Exp $ # Makefile for NetBSD # @@ -61,11 +61,12 @@ MD_CFILES+= modedefs.c .ifdef MONITOR modedefs.c: ${ARM}/iomd/makemodes.awk ${ACORN32}/conf/monitors/${MONITOR} Makefile ${_MKTARGET_CREATE} - awk -f ${ARM}/iomd/makemodes.awk ${ACORN32}/conf/monitors/${MONITOR} ${MODES} >modedefs.c + ${TOOL_AWK} -f ${ARM}/iomd/makemodes.awk \ + ${ACORN32}/conf/monitors/${MONITOR} ${MODES} >modedefs.c .else modedefs.c: ${ARM}/iomd/makemodes.awk Makefile ${_MKTARGET_CREATE} - awk -f ${ARM}/iomd/makemodes.awk modedefs.c + ${TOOL_AWK} -f ${ARM}/iomd/makemodes.awk modedefs.c .endif modedefs.o: modedefs.c diff --git a/sys/arch/amiga/stand/bootblock/ppcboot/Makefile b/sys/arch/amiga/stand/bootblock/ppcboot/Makefile index c4cb218fd083..60714b9d6477 100644 --- a/sys/arch/amiga/stand/bootblock/ppcboot/Makefile +++ b/sys/arch/amiga/stand/bootblock/ppcboot/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 2002/05/31 20:57:42 thorpej Exp $ +# $NetBSD: Makefile,v 1.6 2008/10/19 22:05:21 apb Exp $ ### what we need: @@ -91,7 +91,7 @@ CLEANFILES += kickstart.o kickstart.bin kickstart68.c ppcstart.o: kickstart68.c kickstart68.c: kickstart.bin hex2c.awk - hexdump kickstart.bin | awk -f ${.CURDIR}/hex2c.awk > $@ + hexdump kickstart.bin | ${TOOL_AWK} -f ${.CURDIR}/hex2c.awk > $@ kickstart.bin: kickstart.o $(PPCLD) -Ttext=0xfff00100 -o$@ --oformat binary $? diff --git a/sys/arch/atari/stand/bootxx/Makefile.bootxx b/sys/arch/atari/stand/bootxx/Makefile.bootxx index b6c76974d404..61913b9ff869 100644 --- a/sys/arch/atari/stand/bootxx/Makefile.bootxx +++ b/sys/arch/atari/stand/bootxx/Makefile.bootxx @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.bootxx,v 1.6 2006/11/21 18:31:44 dsl Exp $ +# $NetBSD: Makefile.bootxx,v 1.7 2008/10/19 22:05:21 apb Exp $ NOMAN= # defined @@ -42,11 +42,11 @@ DPADD= ${LIBSA} LDADD= ${LIBSA} beforeinstall: - @len=`${SIZE} ${PROG} | awk 'NR==2 { print $$1+$$2 }'`; \ - if [ "$$len" -gt 6656 ]; then \ + @len=`${SIZE} ${PROG} | ${TOOL_AWK} 'NR==2 { print $$1+$$2 }'`; \ + if [ "$$len" -gt 6656 ]; then \ ${SIZE} ${PROG}; \ - exit 1; \ - fi; \ + exit 1; \ + fi; ${OBJCOPY} -O binary ${PROG} ${PROG}XX @${TOOL_CAT} ${PROG}XX /dev/zero | dd of=${PROG}X \ bs=1 count=6656 2>/dev/null diff --git a/sys/arch/atari/stand/tostools/aptck/Makefile b/sys/arch/atari/stand/tostools/aptck/Makefile index aacb40edac03..293b7352f1c7 100644 --- a/sys/arch/atari/stand/tostools/aptck/Makefile +++ b/sys/arch/atari/stand/tostools/aptck/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2002/02/24 20:51:07 leo Exp $ +# $NetBSD: Makefile,v 1.4 2008/10/19 22:05:21 apb Exp $ PROG = aptck.ttp @@ -11,7 +11,7 @@ CLEAN = aptck.c include ../Makefile.inc aptck.c: aptck.in diskio.c disklbl.c - ${AWK} -f ./setrev.awk $^ > aptck.c + ${TOOL_AWK} -f ./setrev.awk $^ > aptck.c ${PROG}: ${OBJS} ${LDADD} ${CC} ${LDFLAGS} -o $@ ${OBJS} ${LDADD} ${LIBS} diff --git a/sys/arch/hp300/dev/Makefile b/sys/arch/hp300/dev/Makefile index 4511626976ea..f43cf0c65e0a 100644 --- a/sys/arch/hp300/dev/Makefile +++ b/sys/arch/hp300/dev/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.2 1997/01/30 09:18:33 thorpej Exp $ +# $NetBSD: Makefile,v 1.3 2008/10/19 22:05:21 apb Exp $ -AWK= awk +.include diodevs.h diodevs_data.h: diodevs devlist2h.awk /bin/rm -f diodevs.h diodevs_data.h - ${AWK} -f devlist2h.awk diodevs + ${TOOL_AWK} -f devlist2h.awk diodevs diff --git a/sys/arch/hp700/dev/Makefile b/sys/arch/hp700/dev/Makefile index 4ea802bea843..5bf14d84a7f5 100644 --- a/sys/arch/hp700/dev/Makefile +++ b/sys/arch/hp700/dev/Makefile @@ -1,10 +1,10 @@ -# $NetBSD: Makefile,v 1.1 2002/06/06 19:48:03 fredette Exp $ +# $NetBSD: Makefile,v 1.2 2008/10/19 22:05:21 apb Exp $ # $OpenBSD: Makefile,v 1.3 1999/04/20 20:19:37 mickey Exp $ -AWK?= awk +.include cpudevs.h cpudevs_data.h: cpudevs devlist2h.awk /bin/rm -f cpudevs.h cpudevs_data.h - ${AWK} -f devlist2h.awk cpudevs + ${TOOL_AWK} -f devlist2h.awk cpudevs diff --git a/sys/arch/hpc/hpc/platid_gen/Makefile b/sys/arch/hpc/hpc/platid_gen/Makefile index 54d27e53d657..1c179416db12 100644 --- a/sys/arch/hpc/hpc/platid_gen/Makefile +++ b/sys/arch/hpc/hpc/platid_gen/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2001/03/03 12:51:44 takemura Exp $ +# $NetBSD: Makefile,v 1.4 2008/10/19 22:05:21 apb Exp $ S= ../../../.. @@ -25,16 +25,20 @@ DEFFILE = $S/arch/hpc/conf/platid.def PLATIDGEN = $S/arch/hpc/hpc/platid_gen/${PROG} ${GENHDR}: ${DEFFILE} ${PROG} - awk -f ../platid_copyright.awk ${DEFFILE} > ${.TARGET} || rm ${.TARGET} + ${TOOL_AWK} -f ../platid_copyright.awk ${DEFFILE} > ${.TARGET} \ + || rm ${.TARGET} ${PLATIDGEN} -header < ${DEFFILE} >> ${GENHDR} || rm ${.TARGET} ${MASK_H}: ${DEFFILE} ${PROG} - awk -f ../platid_copyright.awk ${DEFFILE} > ${.TARGET} || rm ${.TARGET} + ${TOOL_AWK} -f ../platid_copyright.awk ${DEFFILE} > ${.TARGET} \ + || rm ${.TARGET} ${PLATIDGEN} -mask_h < ${DEFFILE} >> ${MASK_H} || rm ${.TARGET} ${MASK_C}: ${DEFFILE} ${PROG} - awk -f ../platid_copyright.awk ${DEFFILE} > ${.TARGET} || rm ${.TARGET} + ${TOOL_AWK} -f ../platid_copyright.awk ${DEFFILE} > ${.TARGET} \ + || rm ${.TARGET} ${PLATIDGEN} -mask_c < ${DEFFILE} >> ${MASK_C} || rm ${.TARGET} ${NAME_C}: ${DEFFILE} ${PROG} - awk -f ../platid_copyright.awk ${DEFFILE} > ${.TARGET} || rm ${.TARGET} + ${TOOL_AWK} -f ../platid_copyright.awk ${DEFFILE} > ${.TARGET} \ + || rm ${.TARGET} ${PLATIDGEN} -name_c < ${DEFFILE} >> ${NAME_C} || rm ${.TARGET} .include diff --git a/sys/arch/hpc/stand/Makefile b/sys/arch/hpc/stand/Makefile index cd4a50398753..38fdf61b06b3 100644 --- a/sys/arch/hpc/stand/Makefile +++ b/sys/arch/hpc/stand/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.23 2008/02/27 03:45:58 uwe Exp $ +# $NetBSD: Makefile,v 1.24 2008/10/19 22:05:21 apb Exp $ # .include # for HOST_SH @@ -99,10 +99,10 @@ install101: uuencode: find binary -name "hpcboot*.exe" -print | \ - awk '{ print "uuencode", $$1, $$1, ">", $$1".uue ; rm -f", $$1 }' \ + ${TOOL_AWK} '{ print "uuencode", $$1, $$1, ">", $$1".uue ; rm -f", $$1 }' \ | ${HOST_SH} cp binary/build_number.h build_number.h - awk '{if (/HPCBOOT_BUILD_NUMBER/) \ + ${TOOL_AWK} '{if (/HPCBOOT_BUILD_NUMBER/) \ { i = $$3 + 1; \ printf("#define HPCBOOT_BUILD_NUMBER %d\n", i);\ } else { \ diff --git a/sys/arch/i386/bioscall/Makefile b/sys/arch/i386/bioscall/Makefile index e80ae059e5bb..78c618306983 100644 --- a/sys/arch/i386/bioscall/Makefile +++ b/sys/arch/i386/bioscall/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.17 2006/06/06 15:41:50 christos Exp $ +# $NetBSD: Makefile,v 1.18 2008/10/19 22:05:21 apb Exp $ CPPFLAGS= ${APMCPPFLAGS} KSRC=${.CURDIR}/../../.. @@ -35,7 +35,7 @@ biostramp.bin: biostramp.obj cp $? $@ @${STRIP} $@ @${HOST_SH} ${.CURDIR}/rmaouthdr $@ $@.tmp - @if [ `ls -l $@.tmp |awk '{print $$5}'` -gt 4096 ]; then \ + @if [ `ls -l $@.tmp | ${TOOL_AWK} '{print $$5}'` -gt 4096 ]; then \ echo "$@ too big"; \ exit 1; \ fi diff --git a/sys/arch/m68k/fpsp/Makefile b/sys/arch/m68k/fpsp/Makefile index 398067c349cf..ae8e813444b1 100644 --- a/sys/arch/m68k/fpsp/Makefile +++ b/sys/arch/m68k/fpsp/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.15 2006/06/24 03:28:42 tsutsui Exp $ +# $NetBSD: Makefile,v 1.16 2008/10/19 22:05:21 apb Exp $ # MOTOROLA MICROPROCESSOR & MEMORY TECHNOLOGY GROUP # M68000 Hi-Performance Microprocessor Division @@ -37,7 +37,6 @@ # .include -#.include # for HOST_SH TARGET = fpsp @@ -252,7 +251,7 @@ $(LIB_O_FILES): l_fpsp.defs # the entry routines for each function. # l_entry.sa: L_ENTRY.AWK L_LIST MONADIC.$(SYS) DYADIC.$(SYS) l_fpsp.h - awk -f L_ENTRY.AWK SYS=$(SYS) PREFIX=$(PREFIX) - \ + ${TOOL_AWK} -f L_ENTRY.AWK SYS=$(SYS) PREFIX=$(PREFIX) - \ l_entry.sa # diff --git a/sys/arch/next68k/stand/boot/Makefile b/sys/arch/next68k/stand/boot/Makefile index b64ef2c0b86e..ac11bf5c8d99 100644 --- a/sys/arch/next68k/stand/boot/Makefile +++ b/sys/arch/next68k/stand/boot/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.20 2005/12/11 12:18:29 christos Exp $ +# $NetBSD: Makefile,v 1.21 2008/10/19 22:05:21 apb Exp $ NOMAN= # defined @@ -66,7 +66,8 @@ ${PROG}: srt0.o ${OBJS} ${LIBS} ${LD} -N -Ttext ${RELOC} -e start srt0.o ${OBJS} ${LIBS} -o $@.elf ${SIZE} $@.elf ${OBJCOPY} -O binary $@.elf $@.raw - (${SIZE} $@.elf | tail +2 | awk ${AWKPROG} | xargs printf ; cat $@.raw) > $@ + (${SIZE} $@.elf | tail +2 | ${TOOL_AWK} ${AWKPROG} | \ + xargs printf ; cat $@.raw) > $@ # startup diff --git a/sys/arch/sgimips/gio/Makefile.giodevs b/sys/arch/sgimips/gio/Makefile.giodevs index 3aaaafb24ce8..5e476c21098b 100644 --- a/sys/arch/sgimips/gio/Makefile.giodevs +++ b/sys/arch/sgimips/gio/Makefile.giodevs @@ -1,7 +1,7 @@ -# $NetBSD: Makefile.giodevs,v 1.4 2005/12/11 12:18:53 christos Exp $ +# $NetBSD: Makefile.giodevs,v 1.5 2008/10/19 22:05:21 apb Exp $ -AWK?= awk +.include giodevs.h: giodevs devlist2h.awk /bin/rm -f giodevs.h giodevs_data.h - ${AWK} -f devlist2h.awk giodevs + ${TOOL_AWK} -f devlist2h.awk giodevs diff --git a/sys/arch/sparc/stand/bootblk/Makefile b/sys/arch/sparc/stand/bootblk/Makefile index 0dc39616b7dd..d28f3fc92171 100644 --- a/sys/arch/sparc/stand/bootblk/Makefile +++ b/sys/arch/sparc/stand/bootblk/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.10 2006/08/28 13:38:43 tsutsui Exp $ +# $NetBSD: Makefile,v 1.11 2008/10/19 22:05:21 apb Exp $ CURDIR= ${.CURDIR} S= ${CURDIR}/../../../.. @@ -38,7 +38,7 @@ assym.fth.h: genfth.cf machine mv -f assym.fth.h.tmp assym.fth.h bootblk.text: bootblk.fth assym.fth.h - awk '/fload/ { print "#include \"" $$2 "\"" }; !/fload/' \ + ${TOOL_AWK} '/fload/ { print "#include \"" $$2 "\"" }; !/fload/' \ ${.CURDIR}/bootblk.fth | /usr/bin/cpp -P >bootblk.text.tmp && mv -f bootblk.text.tmp bootblk.text diff --git a/sys/arch/x68k/stand/boot/Makefile b/sys/arch/x68k/stand/boot/Makefile index 70ff5c6d53cf..dfc8a340765d 100644 --- a/sys/arch/x68k/stand/boot/Makefile +++ b/sys/arch/x68k/stand/boot/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.14 2007/11/11 05:33:12 isaki Exp $ +# $NetBSD: Makefile,v 1.15 2008/10/19 22:05:21 apb Exp $ NOMAN= # defined @@ -6,7 +6,8 @@ NOMAN= # defined BOOT= Multi-boot VERSIONFILE= ${.CURDIR}/version -VERSION!= awk -F: '$$1 ~ /^[0-9.]*$$/ { it = $$1; } END { print it }' ${VERSIONFILE} +VERSION!= ${TOOL_AWK} -F: '$$1 ~ /^[0-9.]*$$/ { it = $$1; } \ + END { print it }' ${VERSIONFILE} NEWVERSWHAT= "${BOOT}" # text address diff --git a/sys/arch/x68k/stand/boot_ufs/Makefile b/sys/arch/x68k/stand/boot_ufs/Makefile index 0d5a5afb7a7f..c96cb61fe5d1 100644 --- a/sys/arch/x68k/stand/boot_ufs/Makefile +++ b/sys/arch/x68k/stand/boot_ufs/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.21 2007/03/03 07:10:30 isaki Exp $ +# $NetBSD: Makefile,v 1.22 2008/10/19 22:05:22 apb Exp $ NOMAN= # defined @@ -6,7 +6,8 @@ NOMAN= # defined BOOT= boot_ufs VERSIONFILE= ${.CURDIR}/version -VERSION!= awk -F: '$$1 ~ /^[0-9.]*$$/ { it = $$1; } END { print it }' ${VERSIONFILE} +VERSION!= ${TOOL_AWK} -F: '$$1 ~ /^[0-9.]*$$/ { it = $$1; } \ + END { print it }' ${VERSIONFILE} NEWVERSWHAT= "${BOOT}" # text and bss addresses in hex diff --git a/sys/arch/x68k/stand/boot_ustar/Makefile b/sys/arch/x68k/stand/boot_ustar/Makefile index 0949583c70e7..16af562b16c7 100644 --- a/sys/arch/x68k/stand/boot_ustar/Makefile +++ b/sys/arch/x68k/stand/boot_ustar/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.13 2006/06/29 03:46:43 lukem Exp $ +# $NetBSD: Makefile,v 1.14 2008/10/19 22:05:22 apb Exp $ NOMAN= # defined @@ -6,7 +6,8 @@ NOMAN= # defined BOOT= boot_ustar VERSIONFILE= ${.CURDIR}/version -VERSION!= awk -F: '$$1 ~ /^[0-9.]*$$/ { it = $$1; } END { print it }' ${VERSIONFILE} +VERSION!= ${TOOL_AWK} -F: '$$1 ~ /^[0-9.]*$$/ { it = $$1; } \ + END { print it }' ${VERSIONFILE} NEWVERSWHAT= "${BOOT}" # text and bss addresses in hex diff --git a/sys/arch/x68k/stand/libdos/Makefile b/sys/arch/x68k/stand/libdos/Makefile index 9cad097c5df2..1226f4c4407c 100644 --- a/sys/arch/x68k/stand/libdos/Makefile +++ b/sys/arch/x68k/stand/libdos/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.7 2006/06/29 03:46:43 lukem Exp $ +# $NetBSD: Makefile,v 1.8 2008/10/19 22:05:22 apb Exp $ LIB= dos @@ -8,8 +8,6 @@ NOPIC=# defined CPPFLAGS+= -I${.CURDIR} -AWK?= awk - SRCS= dos_rename.S SRCS+= dos_cerror.S dos_procerr.S dos_errno.c dos_strerror.S CLEANFILES+= dos_strerror.S @@ -51,13 +49,14 @@ MAKECALL=${.CURDIR}/makedoscalls.awk ${ASM}: ${.CURDIR}/dos.h ${MAKECALL} ${_MKTARGET_COMPILE} @grep -i 'DOS_${.PREFIX} ' ${.CURDIR}/dos.h | \ - ${AWK} -f ${MAKECALL} | ${CPP} ${CPPFLAGS} | ${AS} -o ${.TARGET} + ${TOOL_AWK} -f ${MAKECALL} | ${CPP} ${CPPFLAGS} | \ + ${AS} -o ${.TARGET} MAKESTRERR=${.CURDIR}/makestrerror.awk dos_strerror.S: ${.CURDIR}/dos_errno.h ${MAKESTRERR} ${_MKTARGET_CREATE} - @${AWK} -f ${MAKESTRERR} ${.CURDIR}/dos_errno.h > ${.TARGET}\ + @${TOOL_AWK} -f ${MAKESTRERR} ${.CURDIR}/dos_errno.h > ${.TARGET}\ || ( rm -f ${.TARGET}; exit 1 ) # only needed during build diff --git a/sys/arch/x68k/stand/libiocs/Makefile b/sys/arch/x68k/stand/libiocs/Makefile index d698e764db4c..383f23564921 100644 --- a/sys/arch/x68k/stand/libiocs/Makefile +++ b/sys/arch/x68k/stand/libiocs/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.8 2006/06/29 03:46:43 lukem Exp $ +# $NetBSD: Makefile,v 1.9 2008/10/19 22:05:22 apb Exp $ LIB= iocs @@ -6,8 +6,6 @@ NOLINT=# defined NOPROFILE=# defined NOPIC=# defined -AWK?= awk - ASM= b_keyinp.o b_keysns.o b_sftsns.o bitsns.o skeyset.o tvctrl.o \ ledmod.o tgusemd.o defchr.o crtmod.o contrast.o hsvtorgb.o tpalet.o \ tpalet2.o tcolor.o fntget.o textget.o textput.o clipput.o scroll.o \ @@ -54,7 +52,9 @@ MAKECALL=${.CURDIR}/makeiocscalls.awk ${ASM}: ${.CURDIR}/iocs.h ${MAKECALL} ${_MKTARGET_COMPILE} @grep -i 'IOCS_${.PREFIX} ' ${.CURDIR}/iocs.h | \ - ${AWK} -f ${MAKECALL} | ${CPP} ${CPPFLAGS} | ${AS} -o ${.TARGET} + ${TOOL_AWK} -f ${MAKECALL} | \ + ${CPP} ${CPPFLAGS} | \ + ${AS} -o ${.TARGET} # only needed during build libinstall:: diff --git a/sys/arch/xen/Makefile b/sys/arch/xen/Makefile index 549968a15a9a..826afc642658 100644 --- a/sys/arch/xen/Makefile +++ b/sys/arch/xen/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2005/12/11 12:19:47 christos Exp $ +# $NetBSD: Makefile,v 1.4 2008/10/19 22:05:22 apb Exp $ # Makefile for xen tags file @@ -10,9 +10,9 @@ TXEN= ${SYSDIR}/arch/xen/tags -SXEN!= awk '($$2 ~ /^arch.*\.[c]$$/) {print "${SYSDIR}/" $$2}' \ +SXEN!= ${TOOL_AWK} '($$2 ~ /^arch.*\.[c]$$/) {print "${SYSDIR}/" $$2}' \ ${SYSDIR}/arch/xen/conf/files.xen -AXEN!= awk '($$2 ~ /^arch.*\.[sS]$$/) {print "${SYSDIR}/" $$2}' \ +AXEN!= ${TOOL_AWK} '($$2 ~ /^arch.*\.[sS]$$/) {print "${SYSDIR}/" $$2}' \ ${SYSDIR}/arch/xen/conf/files.xen AXEN+= ${SYSDIR}/arch/xen/${XEN_BUILD}/*.[sS] diff --git a/sys/conf/Makefile.kern.inc b/sys/conf/Makefile.kern.inc index 817ee35971be..e8c5091abfa9 100644 --- a/sys/conf/Makefile.kern.inc +++ b/sys/conf/Makefile.kern.inc @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.116 2008/09/05 13:37:25 tron Exp $ +# $NetBSD: Makefile.kern.inc,v 1.117 2008/10/19 22:05:22 apb Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -369,7 +369,7 @@ LOBJS?= ${_lsrc:T:S/.c$/.ln/g} ${LIBKERNLN} ${SYSLIBCOMPATLN} LintStub_${_sfile:T:R}.c: ${_sfile} assym.h ${_MKTARGET_COMPILE} ${CC} -E -C ${AFLAGS} ${CPPFLAGS} ${_sfile} | \ - awk -f $S/kern/genlintstub.awk >${.TARGET} + ${TOOL_AWK} -f $S/kern/genlintstub.awk >${.TARGET} .endfor .for _cfile in ${CFILES} ${LINTSTUBS} ${MI_CFILES} ${MD_CFILES} diff --git a/sys/dev/acpi/Makefile.acpidevs b/sys/dev/acpi/Makefile.acpidevs index 95dd30157ec6..dd76065b41ae 100644 --- a/sys/dev/acpi/Makefile.acpidevs +++ b/sys/dev/acpi/Makefile.acpidevs @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.acpidevs,v 1.4 2005/12/11 12:21:01 christos Exp $ +# $NetBSD: Makefile.acpidevs,v 1.5 2008/10/19 22:05:22 apb Exp $ # # As per tron@NetBSD.org, the proper procedure is # @@ -7,9 +7,8 @@ # 3.) Execute "make -f Makefile.acpidevs" in "src/sys/dev/acpi". # 4.) Commit "src/sys/dev/acpi/acpidevs_data.h". - -AWK= awk +.include acpidevs_data.h: acpidevs devlist2h.awk /bin/rm -f acpidevs_data.h - ${AWK} -f devlist2h.awk acpidevs + ${TOOL_AWK} -f devlist2h.awk acpidevs diff --git a/sys/dev/eisa/Makefile.eisadevs b/sys/dev/eisa/Makefile.eisadevs index 29a2d41c7124..e5bc2660e975 100644 --- a/sys/dev/eisa/Makefile.eisadevs +++ b/sys/dev/eisa/Makefile.eisadevs @@ -1,7 +1,7 @@ -# $NetBSD: Makefile.eisadevs,v 1.1 1998/06/12 23:22:49 cgd Exp $ +# $NetBSD: Makefile.eisadevs,v 1.2 2008/10/19 22:05:22 apb Exp $ -AWK= awk +.include eisadevs.h eisadevs_data.h: eisadevs devlist2h.awk /bin/rm -f eisadevs.h eisadevs_data.h - ${AWK} -f devlist2h.awk eisadevs + ${TOOL_AWK} -f devlist2h.awk eisadevs diff --git a/sys/dev/isapnp/Makefile.isapnpdevs b/sys/dev/isapnp/Makefile.isapnpdevs index ed17b3959f2c..328841f34384 100644 --- a/sys/dev/isapnp/Makefile.isapnpdevs +++ b/sys/dev/isapnp/Makefile.isapnpdevs @@ -1,10 +1,10 @@ -# $NetBSD: Makefile.isapnpdevs,v 1.1 1998/07/23 19:30:44 christos Exp $ +# $NetBSD: Makefile.isapnpdevs,v 1.2 2008/10/19 22:05:22 apb Exp $ -AWK= awk +.include # Kill shuttle .c rule .c: isapnpdevs.h isapnpdevs.c: isapnpdevs devlist2h.awk /bin/rm -f isapnpdevs.h isapnpdevs.c - ${AWK} -f devlist2h.awk isapnpdevs + ${TOOL_AWK} -f devlist2h.awk isapnpdevs diff --git a/sys/dev/mca/Makefile.mcadevs b/sys/dev/mca/Makefile.mcadevs index 5e2f9e818efa..689ea72634cd 100644 --- a/sys/dev/mca/Makefile.mcadevs +++ b/sys/dev/mca/Makefile.mcadevs @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.mcadevs,v 1.1 2000/05/11 15:42:02 jdolecek Exp $ +# $NetBSD: Makefile.mcadevs,v 1.2 2008/10/19 22:05:22 apb Exp $ # # The proper procedure is # @@ -7,9 +7,8 @@ # 3.) Execute "make -f Makefile.mcadevs" in "src/sys/dev/mca". # 4.) Commit "src/sys/dev/mca/mcadevs.h" and "src/sys/dev/mca/mcadevs_data.h". - -AWK?= awk +.include mcadevs.h mcadevs_data.h: mcadevs devlist2h.awk /bin/rm -f mcadevs.h mcadevs_data.h - ${AWK} -f devlist2h.awk mcadevs + ${TOOL_AWK} -f devlist2h.awk mcadevs diff --git a/sys/dev/mii/Makefile.miidevs b/sys/dev/mii/Makefile.miidevs index 3a68ada78ece..03ab6aadeca4 100644 --- a/sys/dev/mii/Makefile.miidevs +++ b/sys/dev/mii/Makefile.miidevs @@ -1,8 +1,9 @@ -# $NetBSD: Makefile.miidevs,v 1.2 2000/05/08 13:25:34 augustss Exp $ +# $NetBSD: Makefile.miidevs,v 1.3 2008/10/19 22:05:22 apb Exp $ + +.include RM= rm -AWK= awk miidevs.h: miidevs devlist2h.awk ${RM} -f miidevs.h miidevs_data.h - ${AWK} -f devlist2h.awk miidevs + ${TOOL_AWK} -f devlist2h.awk miidevs