[master] 8aee5e264 build: Always include the contrib/ subdirectory
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Mon Sep 5 16:23:07 UTC 2022
commit 8aee5e264d9e5707c140c3dbab7e68915de210c9
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date: Mon Sep 5 18:14:17 2022 +0200
build: Always include the contrib/ subdirectory
Otherwise a source tree bootstrapped --without-config would not
distribute the contrib script and test, that are needed for the
distcheck target and general redistribution.
diff --git a/Makefile.am b/Makefile.am
index d33f79a70..c0480e143 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,10 +1,6 @@
ACLOCAL_AMFLAGS = -I m4 -I .
-SUBDIRS = include lib bin vmod etc doc man
-
-if WITH_CONTRIB
-SUBDIRS += contrib
-endif
+SUBDIRS = include lib bin vmod etc doc man contrib
TESTS = tools/magic_check.sh
diff --git a/configure.ac b/configure.ac
index a76725e30..e8aa9c757 100644
--- a/configure.ac
+++ b/configure.ac
@@ -892,6 +892,20 @@ VMOD_TESTS="$(cd $srcdir/vmod && echo tests/*.vtc)"
AC_SUBST(VMOD_TESTS)
AM_SUBST_NOTMAKE(VMOD_TESTS)
+AC_ARG_WITH([contrib],
+ [AS_HELP_STRING([--with-contrib],
+ [Build Varnish with external contributions.])])
+
+AM_CONDITIONAL([WITH_CONTRIB], [test "$with_contrib" = yes])
+CONTRIB_TESTS="$(cd $srcdir/contrib && echo tests/*.vtc)"
+AC_SUBST(CONTRIB_TESTS)
+AM_SUBST_NOTMAKE(CONTRIB_TESTS)
+
+AM_COND_IF([WITH_CONTRIB], [
+ AC_DEFINE([WITH_CONTRIB], [1],
+ [Define to 1 when Varnish is built with contributions.])
+])
+
# Make sure this include dir exists
AC_CONFIG_COMMANDS([mkdir], [$MKDIR_P doc/sphinx/include])
@@ -907,6 +921,7 @@ AC_CONFIG_FILES([
bin/varnishhist/Makefile
bin/varnishtest/Makefile
bin/varnishncsa/Makefile
+ contrib/Makefile
doc/Makefile
doc/graphviz/Makefile
doc/sphinx/Makefile
@@ -925,21 +940,4 @@ AC_CONFIG_FILES([
vmod/Makefile
])
-AC_ARG_WITH([contrib],
- [AS_HELP_STRING([--with-contrib],
- [Build Varnish with external contributions.])])
-
-AM_CONDITIONAL([WITH_CONTRIB], [test "$with_contrib" = yes])
-
-AM_COND_IF([WITH_CONTRIB], [
- CONTRIB_TESTS="$(cd $srcdir/contrib && echo tests/*.vtc)"
- AC_SUBST(CONTRIB_TESTS)
- AM_SUBST_NOTMAKE(CONTRIB_TESTS)
-
- AC_DEFINE([WITH_CONTRIB], [1],
- [Define to 1 when Varnish is built with contributions.])
-
- AC_CONFIG_FILES([contrib/Makefile])
-])
-
AC_OUTPUT
diff --git a/contrib/Makefile.am b/contrib/Makefile.am
index 54482b52b..59607f5bf 100644
--- a/contrib/Makefile.am
+++ b/contrib/Makefile.am
@@ -1,10 +1,15 @@
#
+if !WITH_CONTRIB
+dist_noinst_SCRIPTS = \
+ varnishstatdiff
+else
dist_bin_SCRIPTS = \
varnishstatdiff
TESTS = @CONTRIB_TESTS@
include $(top_srcdir)/vtc.am
+endif
-EXTRA_DIST = $(TESTS)
+EXTRA_DIST = @CONTRIB_TESTS@
More information about the varnish-commit
mailing list