diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2013-10-30 00:43:47 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2013-10-30 00:43:47 +0000 |
commit | d215741f6f70e23f947946c3ee9130eb7b1753e1 (patch) | |
tree | 3fa4b7b680c0423ee364f95a0d31d74df0d70500 /sys | |
parent | 350d186a6ac6bdc1019bac282a0c127a9c63fe79 (diff) |
Stop using cpp -tradition for fcode; handle the inclusion of a
generated file using awk instead.
ok miod@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/sparc64/stand/bootblk/Makefile | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sys/arch/sparc64/stand/bootblk/Makefile b/sys/arch/sparc64/stand/bootblk/Makefile index 52c55d5aeea..0970766fcf0 100644 --- a/sys/arch/sparc64/stand/bootblk/Makefile +++ b/sys/arch/sparc64/stand/bootblk/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.10 2012/08/31 17:19:29 deraadt Exp $ +# $OpenBSD: Makefile,v 1.11 2013/10/30 00:43:46 guenther Exp $ # $NetBSD: Makefile,v 1.1 2000/08/20 14:58:45 mrg Exp $ CURDIR= ${.CURDIR} @@ -8,7 +8,7 @@ S= ${CURDIR}/../../../.. # Override normal settings # -CLEANFILES= assym.fth.h assym.fth.h.tmp machine sparc \ +CLEANFILES= assym.fth.h assym.fth.h.tmp machine \ bootblk bootblk.text bootblk.text.tmp NOMAN= @@ -24,17 +24,14 @@ CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} all: bootblk.text bootblk -sparc: - ln -s ${.CURDIR}/../../../sparc/include sparc - assym.fth.h: ${.CURDIR}/genassym.sh genfth.cf sh ${.CURDIR}/genassym.sh ${CC} ${CFLAGS} \ ${CPPFLAGS} ${PROF} <${.CURDIR}/genfth.cf >assym.fth.h.tmp && \ mv -f assym.fth.h.tmp assym.fth.h bootblk.text: bootblk.fth assym.fth.h - awk '/fload/ { print "#include \"" $$2 "\"" }; !/fload/' \ - ${.CURDIR}/bootblk.fth | /usr/bin/cpp -traditional -P >bootblk.text.tmp && \ + awk '/fload/ { file=$$2; while ((ret = getline <file) == 1) print; close(file); if (ret == -1) print "unable to read " file >"/dev/stderr"; next }; !/fload/' \ + ${.CURDIR}/bootblk.fth >bootblk.text.tmp && \ mv -f bootblk.text.tmp bootblk.text bootblk: bootblk.fth assym.fth.h |