if gen fails remove the file [RT #43949]

(cherry picked from commit e17d2f98be)
This commit is contained in:
Mark Andrews
2016-12-23 09:19:31 +11:00
parent be7aa3f5a9
commit 0e43b24249

View File

@@ -160,20 +160,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 \