diff options
author | emaste <emaste@FreeBSD.org> | 2014-12-15 14:25:42 +0000 |
---|---|---|
committer | emaste <emaste@FreeBSD.org> | 2014-12-15 14:25:42 +0000 |
commit | d04460b017d5d8acb0245e11bf596439ff981595 (patch) | |
tree | 390489db213eaaa7a7c24da49788c9e7517e790c /gnu | |
parent | 4b27a87b848136acce4128e2db71a616437d7007 (diff) | |
download | FreeBSD-src-d04460b017d5d8acb0245e11bf596439ff981595.zip FreeBSD-src-d04460b017d5d8acb0245e11bf596439ff981595.tar.gz |
Remove empty generated file upon gperf failure
Prior to this change the build could fail as follows, if gperf is not
available (or fails):
- make(1) stops due to the gperf error, but an empty target file
(cfns.h) is still created
- the empty cfns.h is newer than the source cfns.gperf so it is not
regenerated on subsequent builds
- the gcc build fails (undefined reference to libc_name_p)
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/usr.bin/cc/cc1plus/Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gnu/usr.bin/cc/cc1plus/Makefile b/gnu/usr.bin/cc/cc1plus/Makefile index 64a0725..5d5a64d 100644 --- a/gnu/usr.bin/cc/cc1plus/Makefile +++ b/gnu/usr.bin/cc/cc1plus/Makefile @@ -30,7 +30,7 @@ LDADD= ${LIBBACKEND} ${LIBCPP} ${LIBDECNUMBER} ${LIBIBERTY} # C++ parser cfns.h: cfns.gperf gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L ANSI-C \ - ${.ALLSRC} > ${.TARGET} + ${.ALLSRC} > ${.TARGET} || (rm -f ${.TARGET}; false) CLEANFILES= cfns.h DOBJS+= ${SRCS:N*.h:R:S/$/.o/g} |