tests_test_lockfile_LDADD = lib/libopenvswitch.a
noinst_PROGRAMS += tests/test-ovsdb
-tests_test_ovsdb_SOURCES = tests/test-ovsdb.c tests/idltest.c tests/idltest.h
+tests_test_ovsdb_SOURCES = \
+ tests/test-ovsdb.c \
+ tests/idltest.c \
+ tests/idltest.h
+EXTRA_DIST += tests/uuidfilt.pl
tests_test_ovsdb_LDADD = ovsdb/libovsdb.a lib/libopenvswitch.a $(SSL_LIBS)
-EXTRA_DIST += tests/uuidfilt.pl tests/idltest.ovsidl
-BUILT_SOURCES += tests/idltest.c tests/idltest.h
-noinst_DATA += tests/idltest.ovsschema
-DISTCLEANFILES += tests/idltest.ovsschema
-tests/idltest.c tests/idltest.h tests/idltest.ovsschema: ovsdb/ovsdb-idlc.in
+
+# idltest schema and IDL
+OVSIDL_BUILT += tests/idltest.c tests/idltest.h tests/idltest.ovsidl
+IDLTEST_IDL_FILES = tests/idltest.ovsschema tests/idltest.ann
+EXTRA_DIST += $(IDLTEST_IDL_FILES)
+tests/idltest.ovsidl: $(IDLTEST_IDL_FILES)
+ $(OVSDB_IDLC) -C $(srcdir) annotate $(IDLTEST_IDL_FILES) > $@.tmp
+ mv $@.tmp $@
+
tests/idltest.c: tests/idltest.h
-EXTRA_DIST += tests/idltest.c tests/idltest.h tests/idltest.ovsschema
noinst_PROGRAMS += tests/test-reconnect
tests_test_reconnect_SOURCES = tests/test-reconnect.c