diff options
author | ngie <ngie@FreeBSD.org> | 2015-11-23 09:15:20 +0000 |
---|---|---|
committer | ngie <ngie@FreeBSD.org> | 2015-11-23 09:15:20 +0000 |
commit | 0563099bffd069c864fc24be502d0d2591ed898d (patch) | |
tree | fa44bd359520b38149a4d8c70e11bd82502934f9 /tests | |
parent | e8a3635cd75026c93e54d2f256edf87ec54a209a (diff) | |
download | FreeBSD-src-0563099bffd069c864fc24be502d0d2591ed898d.zip FreeBSD-src-0563099bffd069c864fc24be502d0d2591ed898d.tar.gz |
Fix up convert.c generation
- Use a temporary file for convert.c to reduce likelihood of an interrupted
build resulting in bad code being written to convert.c
- Truncate the file instead of appending to it to ensure that the file being
touched will not result in duplicate declarations/definitions from
kern_acct.c if/when kern_acct.c changes.
MFC after: 1 week
Diffstat (limited to 'tests')
-rw-r--r-- | tests/sys/kern/acct/Makefile | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/sys/kern/acct/Makefile b/tests/sys/kern/acct/Makefile index 966fe9a..03fad6d 100644 --- a/tests/sys/kern/acct/Makefile +++ b/tests/sys/kern/acct/Makefile @@ -6,12 +6,13 @@ ATF_TESTS_C= acct_test CFLAGS+= -I${.OBJDIR} -CLEANFILES+= convert.c +CLEANFILES+= convert.c convert.c.tmp DPSRCS.acct_test= convert.c convert.c: ${SRCTOP}/sys/kern/kern_acct.c sed -n -e 's/log(/syslog(/g' \ - -e '/FLOAT_CONVERSION_START/,/FLOAT_CONVERSION_END/p' ${.ALLSRC} >>${.TARGET} + -e '/FLOAT_CONVERSION_START/,/FLOAT_CONVERSION_END/p' ${.ALLSRC} >${.TARGET}.tmp + mv ${.TARGET}.tmp ${.TARGET} .include <bsd.test.mk> |