[ovs-dev] [PATCH 2/2] configure: add configure option to disable building brcompat

Ben Pfaff blp at nicira.com
Mon Mar 12 18:20:57 UTC 2012


On Mon, Mar 12, 2012 at 11:18:58AM -0700, Chris Wright wrote:
> * Ben Pfaff (blp at nicira.com) wrote:
> > On Fri, Mar 09, 2012 at 06:17:07PM -0800, Chris Wright wrote:
> > > This adds ability to do:
> > > 
> > >   ./configure --disable-brcompat
> > > 
> > > to disable building userspace and kernel module associated with
> > > providing linux bridge compatibility.
> > > 
> > > Signed-off-by: Chris Wright <chrisw at sous-sol.org>
> > 
> > I've had a little bit of trouble in the past with Automake not
> > distributing some kinds of files that are conditionally built.  So,
> > with this patch applied, does
> >         ./configure --disable-brcompat
> >         make distcheck
> > pass, e.g. does "make dist" still distribute the source files and
> > (especially) the manpages that are now conditional?
> 
> Yes, you're right, it does seem to effect the datapath.

One solution is to make sure that anything that must be distributed is
in noinst_HEADERS, e.g. see this commit from a while back:

From: Ben Pfaff <blp at nicira.com>
Date: Wed, 26 May 2010 16:15:48 -0700
Subject: [PATCH] Fix EXTRA_DIST dependence on Automake conditionals.

Automake respects conditionals around EXTRA_DIST assignments.  That is, if
COND is not true, then the following will not distribute 'myfile':
    if COND
    EXTRA_DIST += myfile
    endif

See http://article.gmane.org/gmane.comp.sysutils.automake.general/10891
for more information.

This behavior is surprising, at least to me.  But we can work around it:
anything that can ever *potentially* be assigned to noinst_HEADERS is
always distributed.  So this commit eliminates the problem by adding
$(EXTRA_DIST) to noinst_HEADERS.
---
 Makefile.am |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index c902e41..fa7b5ea 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -60,6 +60,12 @@ noinst_SCRIPTS =
 OVSIDL_BUILT =
 SUFFIXES =
 
+# This ensures that files added to EXTRA_DIST are always distributed,
+# even if they are inside an Automake if...endif conditional block that is
+# disabled by some particular "configure" run.  For more information, see:
+# http://article.gmane.org/gmane.comp.sysutils.automake.general/10891
+noinst_HEADERS += $(EXTRA_DIST)
+
 EXTRA_DIST += \
 	build-aux/update-debian-changelog \
 	soexpand.pl
-- 
1.7.2.5



More information about the dev mailing list