X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=vswitchd%2Fautomake.mk;h=abcf76280fd2061c670d0a693078b4220dd1d096;hb=8159b984dced44851670bd48e204b4e854941a24;hp=4c3c07622e5c490aac578f96ffe63dfed2815e18;hpb=538c6dfab42ec72f916e80f916e858f988d1c48d;p=sliver-openvswitch.git diff --git a/vswitchd/automake.mk b/vswitchd/automake.mk index 4c3c07622..abcf76280 100644 --- a/vswitchd/automake.mk +++ b/vswitchd/automake.mk @@ -92,3 +92,15 @@ vswitchd/ovs-vswitchd.conf.db.5: \ $(srcdir)/vswitchd/vswitch.ovsschema \ $(srcdir)/vswitchd/vswitch.xml > $@.tmp mv $@.tmp $@ + +# Version checking for vswitch.ovsschema. +ALL_LOCAL += vswitchd/vswitch.ovsschema.stamp +vswitchd/vswitch.ovsschema.stamp: vswitchd/vswitch.ovsschema + @sum=`sed '/cksum/d' $? | cksum`; \ + expected=`sed -n 's/.*"cksum": "\(.*\)".*/\1/p' $?`; \ + if test "X$$sum" = "X$$expected"; then \ + touch $@; \ + else \ + ln=`sed -n '/"cksum":/=' $?`; \ + echo "$?:$$ln: checksum \"$$sum\" does not match (you should probably update the version number and fix the checksum)"; \ + fi