[ovs-dev] [PATCH] Fix EXTRA_DIST dependence on Automake conditionals.
Ben Pfaff
blp at nicira.com
Tue Jun 8 17:34:54 UTC 2010
I posted this patch in a reply to Justin last week or the week before,
but I think everyone missed it buried within a thread like that, so
I'm reposting it here on its own.
--8<--------------------------cut here-------------------------->8--
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 37d98f6..dc975e8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -59,6 +59,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.1
More information about the dev
mailing list