diff options
Diffstat (limited to 'contrib/ntp/sntp/Makefile.am')
-rw-r--r-- | contrib/ntp/sntp/Makefile.am | 41 |
1 files changed, 16 insertions, 25 deletions
diff --git a/contrib/ntp/sntp/Makefile.am b/contrib/ntp/sntp/Makefile.am index dfd303a..5c30fc2 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 |