ofproto: Avoid leaving a broken def
authorYAMAMOTO Takashi <yamamoto@valinux.co.jp>
Tue, 24 Dec 2013 01:04:08 +0000 (10:04 +0900)
committerBen Pfaff <blp@nicira.com>
Tue, 24 Dec 2013 16:43:14 +0000 (08:43 -0800)
On errors, don't leave a broken ipfix-entries.def, which might cause
mysterious errors later.
(Probably the most common cause is the lack of python xml libraries.)

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ofproto/automake.mk

index 068a742..1308820 100644 (file)
@@ -62,4 +62,5 @@ MAN_FRAGMENTS += ofproto/ofproto-unixctl.man ofproto/ofproto-dpif-unixctl.man
 EXTRA_DIST += ofproto/ipfix.xml
 dist_noinst_SCRIPTS = ofproto/ipfix-gen-entities
 ofproto/ipfix-entities.def: ofproto/ipfix.xml ofproto/ipfix-gen-entities
-       $(run_python) $(srcdir)/ofproto/ipfix-gen-entities $< > $@
+       $(run_python) $(srcdir)/ofproto/ipfix-gen-entities $< > $@.tmp
+       mv $@.tmp $@