diff options
author | ngie <ngie@FreeBSD.org> | 2015-12-04 09:29:47 +0000 |
---|---|---|
committer | ngie <ngie@FreeBSD.org> | 2015-12-04 09:29:47 +0000 |
commit | 634df7f08c142512043084b495106ce19badc5a8 (patch) | |
tree | 94ea7c6b62e761822a52c9d0d4b04a3845f5d86f /tests | |
parent | 6091b946282d337c56f654bae482a19997be358a (diff) | |
download | FreeBSD-src-634df7f08c142512043084b495106ce19badc5a8.zip FreeBSD-src-634df7f08c142512043084b495106ce19badc5a8.tar.gz |
MFC r291180:
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.
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 e0e2363..51f523d 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: ${.CURDIR:H:H:H:H}/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> |