summaryrefslogtreecommitdiff
path: root/contrib/ntp/sntp/Makefile.am
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2015-10-22 19:42:57 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2015-10-22 19:42:57 +0000
commit9034852c84a13f0e3b5527e1c886ca94b2863b2b (patch)
treec69f4aae895073471547d394a727baaaa68d758b /contrib/ntp/sntp/Makefile.am
parentad437f931386f36fcd01ffd6e7f7f2e88a55539d (diff)
parent0b0c40a74f7959b8d7d71f883715ac667a6f119a (diff)
downloadsrc-test2-9034852c84a13f0e3b5527e1c886ca94b2863b2b.tar.gz
src-test2-9034852c84a13f0e3b5527e1c886ca94b2863b2b.zip
Notes
Diffstat (limited to 'contrib/ntp/sntp/Makefile.am')
-rw-r--r--contrib/ntp/sntp/Makefile.am41
1 files changed, 16 insertions, 25 deletions
diff --git a/contrib/ntp/sntp/Makefile.am b/contrib/ntp/sntp/Makefile.am
index dfd303a72077..5c30fc27d674 100644
--- a/contrib/ntp/sntp/Makefile.am
+++ b/contrib/ntp/sntp/Makefile.am
@@ -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 \
@@ -94,7 +78,6 @@ noinst_HEADERS = \
main.h \
networking.h \
sntp-opts.h \
- tests_main.h \
utilities.h \
$(NULL)
@@ -285,11 +268,19 @@ $(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 -print | xargs rm -rf ; fi
-
-dist-hook: libevent-dist-hook
- @: do-nothing action to avoid default SCCS get
+# HMS: libevent/ is a target if it's in EXTRA_DIST via NTP_FORCE_LIBEVENT_DIST.
+# Note that libevent/ is already in DIST_SUBDIRS (implicit in Makefile.am
+# but explicit in Makefile.in). This check doesn't help with distclean.
+libevent: distdir-pre-check
+
+# HMS: Stops the build for gmake or pmake
+distdir-pre-check:
+ case "$(DIST_FAIL)" in \
+ '') ;; \
+ *) $(error re-run configure adding $(DIST_FAIL) if you want to make a distribution.); \
+ 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