A long time ago, the Open vSwitch build did not depend on Python (whereas
the runtime did), so the "make dist" based distribution included the
results of Python build tools.  Later, the build began building on Python,
but the distribution still included some of those results, because no one
had gone to the trouble of changing them.  This commit changes the
Makefiles not to distribute Python-generated files but instead to just
generate them at build time.

Signed-off-by: Ben Pfaff <[email protected]>
---
 lib/automake.mk    | 31 +++++++++++--------------------
 ovsdb/automake.mk  |  1 -
 python/automake.mk |  2 +-
 3 files changed, 12 insertions(+), 22 deletions(-)

diff --git a/lib/automake.mk b/lib/automake.mk
index 7a34c1a..9ccbe93 100644
--- a/lib/automake.mk
+++ b/lib/automake.mk
@@ -1,4 +1,4 @@
-# Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014 Nicira, Inc.
+# Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015 Nicira, Inc.
 #
 # Copying and distribution of this file, with or without modification,
 # are permitted in any medium without royalty provided the copyright
@@ -433,18 +433,11 @@ MAN_FRAGMENTS += \
        lib/vlog.man
 
 # vswitch IDL
-OVSIDL_BUILT += \
-       $(srcdir)/lib/vswitch-idl.c \
-       $(srcdir)/lib/vswitch-idl.h \
-       $(srcdir)/lib/vswitch-idl.ovsidl
+OVSIDL_BUILT += lib/vswitch-idl.c lib/vswitch-idl.h lib/vswitch-idl.ovsidl
 
-EXTRA_DIST += $(srcdir)/lib/vswitch-idl.ann
-VSWITCH_IDL_FILES = \
-       $(srcdir)/vswitchd/vswitch.ovsschema \
-       $(srcdir)/lib/vswitch-idl.ann
-$(srcdir)/lib/vswitch-idl.ovsidl: $(VSWITCH_IDL_FILES)
-       $(AM_V_GEN)$(OVSDB_IDLC) annotate $(VSWITCH_IDL_FILES) > [email protected] && \
-       mv [email protected] $@
+EXTRA_DIST += lib/vswitch-idl.ann
+$(srcdir)/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] $@
 
 lib/dirs.c: lib/dirs.c.in Makefile
        $(AM_V_GEN)($(ro_c) && sed < $(srcdir)/lib/dirs.c.in \
@@ -475,22 +468,20 @@ lib/ofp-actions.lo: lib/ofp-actions.inc1 
lib/ofp-actions.inc2
 CLEANFILES += lib/ofp-actions.inc1 lib/ofp-actions.inc2
 EXTRA_DIST += build-aux/extract-ofp-actions
 
-$(srcdir)/lib/ofp-errors.inc: \
-       lib/ofp-errors.h include/openflow/openflow-common.h \
+lib/ofp-errors.inc: lib/ofp-errors.h include/openflow/openflow-common.h \
        $(srcdir)/build-aux/extract-ofp-errors
        $(AM_V_GEN)$(run_python) $(srcdir)/build-aux/extract-ofp-errors \
                $(srcdir)/lib/ofp-errors.h \
                $(srcdir)/include/openflow/openflow-common.h > [email protected] && \
        mv [email protected] $@
-$(srcdir)/lib/ofp-errors.c: $(srcdir)/lib/ofp-errors.inc
-EXTRA_DIST += build-aux/extract-ofp-errors lib/ofp-errors.inc
+lib/ofp-errors.c: lib/ofp-errors.inc
+EXTRA_DIST += build-aux/extract-ofp-errors
 
-$(srcdir)/lib/ofp-msgs.inc: \
-       lib/ofp-msgs.h $(srcdir)/build-aux/extract-ofp-msgs
+lib/ofp-msgs.inc: lib/ofp-msgs.h $(srcdir)/build-aux/extract-ofp-msgs
        $(AM_V_GEN)$(run_python) $(srcdir)/build-aux/extract-ofp-msgs \
                $(srcdir)/lib/ofp-msgs.h $@ > [email protected] && mv [email protected] $@
-$(srcdir)/lib/ofp-msgs.c: $(srcdir)/lib/ofp-msgs.inc
-EXTRA_DIST += build-aux/extract-ofp-msgs lib/ofp-msgs.inc
+lib/ofp-msgs.c: lib/ofp-msgs.inc
+EXTRA_DIST += build-aux/extract-ofp-msgs
 
 INSTALL_DATA_LOCAL += lib-install-data-local
 lib-install-data-local:
diff --git a/ovsdb/automake.mk b/ovsdb/automake.mk
index cc3e656..de7c5e0 100644
--- a/ovsdb/automake.mk
+++ b/ovsdb/automake.mk
@@ -83,7 +83,6 @@ OVSDB_IDLC = $(run_python) $(srcdir)/ovsdb/ovsdb-idlc.in
 .ovsidl.h:
        $(AM_V_GEN)$(OVSDB_IDLC) c-idl-header $< > [email protected] && mv [email protected] $@
 
-EXTRA_DIST += $(OVSIDL_BUILT)
 BUILT_SOURCES += $(OVSIDL_BUILT)
 
 # This must be done late: macros in targets are expanded when the
diff --git a/python/automake.mk b/python/automake.mk
index 3a7f040..42b428a 100644
--- a/python/automake.mk
+++ b/python/automake.mk
@@ -101,4 +101,4 @@ $(srcdir)/python/ovs/dirs.py: python/ovs/dirs.py.template
                 -e 's,[@]DBDIR[@],/usr/local/etc/openvswitch,g' \
                < $? > [email protected] && \
        mv [email protected] $@
-EXTRA_DIST += python/ovs/dirs.py python/ovs/dirs.py.template
+EXTRA_DIST += python/ovs/dirs.py.template
-- 
2.1.3

_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to