-EXTRA_DIST += vswitchd/vswitch.ovsidl
-BUILT_SOURCES += vswitchd/vswitch-idl.h
-DISTCLEANFILES += \
- vswitchd/vswitch.ovsidl \
- vswitchd/vswitch-idl.h
-vswitchd/vswitch-idl.h: vswitchd/vswitch.ovsidl ovsdb/ovsdb-idlc
- ovsdb/ovsdb-idlc c-idl-header $(srcdir)/vswitchd/vswitch.ovsidl > $@
+
+# vswitch schema and IDL
+OVSIDL_BUILT += \
+ vswitchd/vswitch-idl.c \
+ vswitchd/vswitch-idl.h \
+ vswitchd/vswitch-idl.ovsidl
+VSWITCH_IDL_FILES = vswitchd/vswitch.ovsschema vswitchd/vswitch-idl.ann
+noinst_DATA += vswitchd/vswitch-idl.txt
+EXTRA_DIST += $(VSWITCH_IDL_FILES) vswitchd/vswitch-idl.txt
+vswitchd/vswitch-idl.ovsidl: $(VSWITCH_IDL_FILES)
+ $(OVSDB_IDLC) -C $(srcdir) annotate $(VSWITCH_IDL_FILES) > $@.tmp
+ mv $@.tmp $@