]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 2875] sntp/Makefile.am: Get rid of DIST_SUBDIRS. libevent must be configured...
authorHarlan Stenn <stenn@ntp.org>
Sat, 11 Jul 2015 20:28:26 +0000 (20:28 +0000)
committerHarlan Stenn <stenn@ntp.org>
Sat, 11 Jul 2015 20:28:26 +0000 (20:28 +0000)
bk: 55a17c6asWbJx1KRR_xjXTfI41QvOQ

ChangeLog
sntp/Makefile.am

index 561e35ebbdcfdcd3b5a2ed4c653889c0b1b55c7f..beeed3d2206c63cb6767254cc8478878eb7e02cb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,8 @@
 * [Bug 2867] ntpd with autokey active crashed by 'ntpq -crv'. J.Perlinger
 * [Bug 2873] libevent should not include .deps/ in the tarball.  H.Stenn
 * [Bug 2874] Don't distribute generated sntp/tests/fileHandlingTest.h. H.Stenn
+* [Bug 2875] sntp/Makefile.am: Get rid of DIST_SUBDIRS.  libevent must
+  be configured for the distribution targets.  Harlan Stenn.
 * libntp/emalloc.c: Remove explicit include of stdint.h.  Harlan Stenn.
 * Put Unity CPPFLAGS items in unity_config.h.  Harlan Stenn.
 * tests/ntpd/g_leapsec.cpp typo fix.  Harlan Stenn.
index 83eac5ccba9bebbb46fc7292bc871fd7973bc5e0..61c58803c279d67c5ff7fbe2b42871e2203b5e53 100644 (file)
@@ -38,27 +38,13 @@ bin_PROGRAMS =              @SNTP_DB@
 libexec_PROGRAMS =     @SNTP_DL@
 sbin_PROGRAMS =                @SNTP_DS@
 
-##
-## DIST_SUBDIRS is typically automatically derived by automake including
-## all possible SUBDIRS values, as even items which are not built are
-## typically distributed.
-##
-## To allow us to avoid configuring the libevent tearoff entirely when
-## it is not needed, we define DIST_SUBDIRS manually excluding libevent
-## when not building it, and in that case arrange for its distribution
-## with EXTRA_DIST copying the entire directory and libevent-dist-hook
-## cleaning unwanted VCS remnants.
-##
-## When we are building libevent, it is distributed conventionally, by
-## recursive make dist in sntp including libevent.
-##
-
 SUBDIRS = include scripts unity
-DIST_SUBDIRS = include scripts unity
+DIST_FAIL =
 
 if BUILD_LIBEVENT
 SUBDIRS += libevent
-DIST_SUBDIRS += libevent
+else
+DIST_FAIL += "--enable-local-libevent"
 endif
 
 if NEED_LIBOPTS
@@ -70,8 +56,6 @@ noinst_LIBRARIES = libsntp.a
 SUBDIRS += tests
 endif
 
-DIST_SUBDIRS += libopts tests
-
 libsntp_a_SOURCES =            \
        crypto.c                \
        kod_management.c        \
@@ -285,11 +269,16 @@ $(srcdir)/sntp.html: $(srcdir)/invoke-sntp.menu $(srcdir)/invoke-sntp.texi $(src
 libtool: $(LIBTOOL_DEPS)
        ./config.status --recheck
 
-libevent-dist-hook:
-       if test -n "$(NTP_FORCE_LIBEVENT_DIST)" ; then rm -rf $(distdir)/libevent/autom4te.cache $(distdir)/libevent/config.h.in~ ; find $(distdir)/libevent -type d \( -name SCCS -or -name .deps \)  -print | xargs rm -rf ; fi
+# HMS: replaces the stock distdir target, which is a lose.
+#distdir: distdir-pre-check
 
-dist-hook: libevent-dist-hook
-       @: do-nothing action to avoid default SCCS get
+# HMS: not great - doesn't stop the build.
+distdir-pre-check:
+       case "$(DIST_FAIL)" in  \
+        '')  ;;                \
+        *) echo "re-run configure adding $(DIST_FAIL) if you want to make a distribution.";    \
+           exit 1 ;;           \
+       esac
 
 include $(top_srcdir)/bincheck.mf
 include $(top_srcdir)/check-libntp.mf