Cleanly separate IDL annotations from OVSDB schema information.
[sliver-openvswitch.git] / tests / automake.mk
index f77bdac..e1738f6 100644 (file)
@@ -112,15 +112,22 @@ tests_test_lockfile_SOURCES = tests/test-lockfile.c
 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