IDL-generated files don't need to be distributed, and distributing them puts them in the source directory rather than the build directory, which causes "make distcheck" to fail if any of them need to be remade. To prevent this, this commit this removes them from ..._SOURCES, moving them into nodist_..._SOURCES.
IDL-generated files all need to be cleaned, so this commit adds all of them to CLEANFILES wholesale via a single CLEANFILES += $(OVSIDL_BUILT) line in ovsdb/automake.mk, removing the individual additions from various makefiles. With this commit, "make distcheck" passes for me. CC: Aaron Conole <[email protected]> Signed-off-by: Ben Pfaff <[email protected]> --- lib/automake.mk | 7 +++---- ovn/lib/automake.mk | 25 ++++++++++++------------- ovsdb/automake.mk | 1 + tests/automake.mk | 7 ++----- vtep/automake.mk | 3 +-- 5 files changed, 19 insertions(+), 24 deletions(-) diff --git a/lib/automake.mk b/lib/automake.mk index e2d4bb9..018e62c 100644 --- a/lib/automake.mk +++ b/lib/automake.mk @@ -276,8 +276,6 @@ lib_libopenvswitch_la_SOURCES = \ lib/vlandev.c \ lib/vlandev.h \ lib/vlog.c \ - lib/vswitch-idl.c \ - lib/vswitch-idl.h \ lib/lldp/aa-structs.h \ lib/lldp/lldp.c \ lib/lldp/lldp-const.h \ @@ -310,7 +308,9 @@ EXTRA_DIST += \ lib/string.h.in nodist_lib_libopenvswitch_la_SOURCES = \ - lib/dirs.c + lib/dirs.c \ + lib/vswitch-idl.c \ + lib/vswitch-idl.h CLEANFILES += $(nodist_lib_libopenvswitch_la_SOURCES) lib_LTLIBRARIES += lib/libsflow.la @@ -447,7 +447,6 @@ OVSIDL_BUILT += lib/vswitch-idl.c lib/vswitch-idl.h lib/vswitch-idl.ovsidl EXTRA_DIST += lib/vswitch-idl.ann lib/vswitch-idl.ovsidl: vswitchd/vswitch.ovsschema lib/vswitch-idl.ann $(AM_V_GEN)$(OVSDB_IDLC) annotate $(srcdir)/vswitchd/vswitch.ovsschema $(srcdir)/lib/vswitch-idl.ann > [email protected] && mv [email protected] $@ -CLEANFILES += lib/vswitch-idl.c lib/vswitch-idl.h lib/vswitch-idl.ovsidl lib/dirs.c: lib/dirs.c.in Makefile $(AM_V_GEN)($(ro_c) && sed < $(srcdir)/lib/dirs.c.in \ diff --git a/ovn/lib/automake.mk b/ovn/lib/automake.mk index 956c83f..078e200 100644 --- a/ovn/lib/automake.mk +++ b/ovn/lib/automake.mk @@ -9,7 +9,8 @@ ovn_lib_libovn_la_SOURCES = \ ovn/lib/expr.c \ ovn/lib/expr.h \ ovn/lib/lex.c \ - ovn/lib/lex.h \ + ovn/lib/lex.h +nodist_ovn_lib_libovn_la_SOURCES = \ ovn/lib/ovn-nb-idl.c \ ovn/lib/ovn-nb-idl.h \ ovn/lib/ovn-sb-idl.c \ @@ -17,29 +18,27 @@ ovn_lib_libovn_la_SOURCES = \ # ovn-sb IDL OVSIDL_BUILT += \ - $(srcdir)/ovn/lib/ovn-sb-idl.c \ - $(srcdir)/ovn/lib/ovn-sb-idl.h \ - $(srcdir)/ovn/lib/ovn-sb-idl.ovsidl -EXTRA_DIST += $(srcdir)/ovn/lib/ovn-sb-idl.ann + ovn/lib/ovn-sb-idl.c \ + ovn/lib/ovn-sb-idl.h \ + ovn/lib/ovn-sb-idl.ovsidl +EXTRA_DIST += ovn/lib/ovn-sb-idl.ann OVN_SB_IDL_FILES = \ $(srcdir)/ovn/ovn-sb.ovsschema \ $(srcdir)/ovn/lib/ovn-sb-idl.ann -$(srcdir)/ovn/lib/ovn-sb-idl.ovsidl: $(OVN_SB_IDL_FILES) +ovn/lib/ovn-sb-idl.ovsidl: $(OVN_SB_IDL_FILES) $(AM_V_GEN)$(OVSDB_IDLC) annotate $(OVN_SB_IDL_FILES) > [email protected] && \ mv [email protected] $@ -CLEANFILES += ovn/lib/ovn-sb-idl.c ovn/lib/ovn-sb-idl.h # ovn-nb IDL OVSIDL_BUILT += \ - $(srcdir)/ovn/lib/ovn-nb-idl.c \ - $(srcdir)/ovn/lib/ovn-nb-idl.h \ - $(srcdir)/ovn/lib/ovn-nb-idl.ovsidl -EXTRA_DIST += $(srcdir)/ovn/lib/ovn-nb-idl.ann + ovn/lib/ovn-nb-idl.c \ + ovn/lib/ovn-nb-idl.h \ + ovn/lib/ovn-nb-idl.ovsidl +EXTRA_DIST += ovn/lib/ovn-nb-idl.ann OVN_NB_IDL_FILES = \ $(srcdir)/ovn/ovn-nb.ovsschema \ $(srcdir)/ovn/lib/ovn-nb-idl.ann -$(srcdir)/ovn/lib/ovn-nb-idl.ovsidl: $(OVN_NB_IDL_FILES) +ovn/lib/ovn-nb-idl.ovsidl: $(OVN_NB_IDL_FILES) $(AM_V_GEN)$(OVSDB_IDLC) annotate $(OVN_NB_IDL_FILES) > [email protected] && \ mv [email protected] $@ -CLEANFILES += ovn/lib/ovn-nb-idl.c ovn/lib/ovn-nb-idl.h diff --git a/ovsdb/automake.mk b/ovsdb/automake.mk index de7c5e0..7db6fea 100644 --- a/ovsdb/automake.mk +++ b/ovsdb/automake.mk @@ -84,6 +84,7 @@ OVSDB_IDLC = $(run_python) $(srcdir)/ovsdb/ovsdb-idlc.in $(AM_V_GEN)$(OVSDB_IDLC) c-idl-header $< > [email protected] && mv [email protected] $@ BUILT_SOURCES += $(OVSIDL_BUILT) +CLEANFILES += $(OVSIDL_BUILT) # This must be done late: macros in targets are expanded when the # target line is read, so if this file were to be included before some diff --git a/tests/automake.mk b/tests/automake.mk index 1fdb71f..9011e84 100644 --- a/tests/automake.mk +++ b/tests/automake.mk @@ -230,10 +230,8 @@ $(srcdir)/package.m4: $(top_srcdir)/configure.ac } >'$(srcdir)/package.m4' 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 +nodist_tests_test_ovsdb_SOURCES = tests/idltest.c tests/idltest.h EXTRA_DIST += tests/uuidfilt.pl tests/ovsdb-monitor-sort.pl tests_test_ovsdb_LDADD = ovsdb/libovsdb.la lib/libopenvswitch.la @@ -246,7 +244,6 @@ tests_test_lib_LDADD = lib/libopenvswitch.la 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/idltest2.ovsschema -CLEANFILES += tests/idltest.c tests/idltest.h tests/idltest.ovsidl tests/idltest.ovsidl: $(IDLTEST_IDL_FILES) $(AM_V_GEN)$(OVSDB_IDLC) -C $(srcdir) annotate $(IDLTEST_IDL_FILES) > [email protected] && \ mv [email protected] $@ diff --git a/vtep/automake.mk b/vtep/automake.mk index f44752d..6027fd2 100644 --- a/vtep/automake.mk +++ b/vtep/automake.mk @@ -10,7 +10,6 @@ VTEP_IDL_FILES = \ vtep/vtep-idl.ovsidl: $(VTEP_IDL_FILES) $(AM_V_GEN)$(OVSDB_IDLC) annotate $(VTEP_IDL_FILES) > [email protected] && \ mv [email protected] $@ -CLEANFILES += vtep/vtep-idl.c vtep/vtep-idl.h vtep/vtep-idl.ovsidl # libvtep lib_LTLIBRARIES += vtep/libvtep.la @@ -18,7 +17,7 @@ vtep_libvtep_la_LDFLAGS = \ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \ -Wl,--version-script=$(top_builddir)/vtep/libvtep.sym \ $(AM_LDFLAGS) -vtep_libvtep_la_SOURCES = \ +nodist_vtep_libvtep_la_SOURCES = \ vtep/vtep-idl.c \ vtep/vtep-idl.h -- 2.1.3 _______________________________________________ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
