]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
if gen fails remove the file [RT #43949]
authorMark Andrews <marka@isc.org>
Thu, 22 Dec 2016 22:19:31 +0000 (09:19 +1100)
committerMark Andrews <marka@isc.org>
Thu, 22 Dec 2016 22:21:17 +0000 (09:21 +1100)
(cherry picked from commit e17d2f98be7d0b562a29f8ab16331eadec1f28c2)

lib/dns/Makefile.in

index a788b70dcc046ac26ac72586074492dac00da3d3..deac1bc2e7c4e97763c01fe157aae7981c44c824 100644 (file)
@@ -175,20 +175,21 @@ include: include/dns/enumtype.h include/dns/enumclass.h \
 rdata.@O@: code.h
 
 include/dns/enumtype.h: gen
-       ./gen -s ${srcdir} -t > $@
+       ./gen -s ${srcdir} -t > $@ || { rm -f $@ ; exit 1; }
 
 include/dns/enumclass.h: gen
-       ./gen -s ${srcdir} -c > $@
+       ./gen -s ${srcdir} -c > $@ || { rm -f $@ ; exit 1; }
 
 include/dns/rdatastruct.h: gen \
                ${srcdir}/rdata/rdatastructpre.h \
                ${srcdir}/rdata/rdatastructsuf.h
        ./gen -s ${srcdir} -i \
                -P ${srcdir}/rdata/rdatastructpre.h \
-               -S ${srcdir}/rdata/rdatastructsuf.h > $@
+               -S ${srcdir}/rdata/rdatastructsuf.h > $@ || \
+       { rm -f $@ ; exit 1; }
 
 code.h:        gen
-       ./gen -s ${srcdir} > code.h
+       ./gen -s ${srcdir} > code.h || { rm -f $@ ; exit 1; }
 
 gen: gen.c
        ${BUILD_CC} ${BUILD_CFLAGS} -I${top_srcdir}/lib/isc/include \