Fix EXTRA_DIST dependence on Automake conditionals.
authorBen Pfaff <blp@nicira.com>
Wed, 26 May 2010 23:15:48 +0000 (16:15 -0700)
committerBen Pfaff <blp@nicira.com>
Wed, 9 Jun 2010 16:13:11 +0000 (09:13 -0700)
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

index c902e41d899384c51fd35e4f0a4c04bf6b2eedae..fa7b5ea2d618a6be00914685cb2eb55803a47cd3 100644 (file)
@@ -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