2013-12-04 21:33:17 +00:00
|
|
|
NULL=
|
2008-08-18 14:26:05 +00:00
|
|
|
|
2014-12-20 22:52:39 +00:00
|
|
|
EXTRA_PROGRAMS= ntpq
|
|
|
|
bin_PROGRAMS= $(NTPQ_DB)
|
|
|
|
libexec_PROGRAMS= $(NTPQ_DL)
|
|
|
|
sbin_PROGRAMS= $(NTPQ_DS)
|
2013-12-04 21:33:17 +00:00
|
|
|
|
2014-12-20 22:52:39 +00:00
|
|
|
AM_CFLAGS = $(CFLAGS_NTP)
|
2017-03-23 05:19:00 +00:00
|
|
|
AM_CFLAGS += $(NTP_HARD_CFLAGS)
|
2014-12-20 22:52:39 +00:00
|
|
|
|
|
|
|
AM_CPPFLAGS = $(NTP_INCS)
|
|
|
|
AM_CPPFLAGS += $(LIBOPTS_CFLAGS)
|
|
|
|
AM_CPPFLAGS += $(CPPFLAGS_NTP)
|
2017-03-23 05:19:00 +00:00
|
|
|
AM_CPPFLAGS += $(NTP_HARD_CPPFLAGS)
|
2014-12-20 22:52:39 +00:00
|
|
|
|
2017-03-23 05:19:00 +00:00
|
|
|
AM_LDFLAGS = $(LDFLAGS_NTP)
|
|
|
|
AM_LDFLAGS += $(NTP_HARD_LDFLAGS)
|
2008-08-18 14:26:05 +00:00
|
|
|
|
1999-12-09 13:01:21 +00:00
|
|
|
# LDADD might need RESLIB and ADJLIB
|
2014-12-20 22:52:39 +00:00
|
|
|
ntpq_LDADD = version.o $(LIBOPTS_LDADD)
|
|
|
|
ntpq_LDADD += ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM)
|
|
|
|
ntpq_LDADD += $(PTHREAD_LIBS) $(EDITLINE_LIBS)
|
|
|
|
ntpq_LDADD += $(LDADD_NTP)
|
2018-02-28 06:23:12 +00:00
|
|
|
ntpq_LDADD += $(NTP_HARD_LDFLAGS)
|
2020-03-04 13:59:29 +00:00
|
|
|
|
|
|
|
noinst_HEADERS = ntpq.h
|
|
|
|
|
|
|
|
noinst_LIBRARIES = libntpq.a
|
|
|
|
libntpq_a_CFLAGS = $(AM_CFLAGS)
|
|
|
|
libntpq_a_CFLAGS += -DNO_MAIN_ALLOWED -DBUILD_AS_LIB
|
|
|
|
libntpq_a_CPPFLAGS = $(AM_CPPFLAGS)
|
|
|
|
|
|
|
|
CLEANFILES =
|
|
|
|
DISTCLEANFILES = .version version.c config.log $(man_MANS)
|
|
|
|
ETAGS_ARGS = Makefile.am
|
|
|
|
EXTRA_DIST = \
|
2014-12-20 22:52:39 +00:00
|
|
|
invoke-ntpq.menu \
|
|
|
|
invoke-ntpq.texi \
|
|
|
|
ntpq-opts.def \
|
|
|
|
ntpq.1ntpqman \
|
|
|
|
ntpq.1ntpqmdoc \
|
|
|
|
ntpq.man.in \
|
|
|
|
ntpq.mdoc.in \
|
|
|
|
ntpq.html \
|
|
|
|
ntpq.texi \
|
|
|
|
$(NULL)
|
|
|
|
|
2013-12-04 21:33:17 +00:00
|
|
|
BUILT_SOURCES= ntpq-opts.c ntpq-opts.h
|
2014-12-20 22:52:39 +00:00
|
|
|
|
|
|
|
html_DATA= \
|
|
|
|
$(srcdir)/ntpq.html \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
noinst_DATA= \
|
|
|
|
$(srcdir)/invoke-ntpq.menu \
|
|
|
|
$(srcdir)/invoke-ntpq.texi \
|
|
|
|
$(srcdir)/ntpq.man.in \
|
|
|
|
$(srcdir)/ntpq.mdoc.in \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
install-data-local: install-html
|
|
|
|
|
|
|
|
man1_MANS=
|
|
|
|
man8_MANS=
|
|
|
|
man_MANS= ntpq.$(NTPQ_MS)
|
|
|
|
|
|
|
|
run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" AUTOGEN_DNE_DATE=-D \
|
|
|
|
autogen -L ../sntp/include -L ../sntp/ag-tpl --writable
|
|
|
|
std_def_list = \
|
|
|
|
$(top_srcdir)/sntp/include/debug-opt.def \
|
|
|
|
$(top_srcdir)/sntp/include/autogen-version.def \
|
|
|
|
$(top_srcdir)/sntp/include/copyright.def \
|
|
|
|
$(top_srcdir)/sntp/include/homerc.def \
|
|
|
|
$(top_srcdir)/sntp/include/ntp.lic \
|
|
|
|
$(top_srcdir)/sntp/include/version.def \
|
|
|
|
$(NULL)
|
2008-08-18 14:26:05 +00:00
|
|
|
ntpq_SOURCES= ntpq.c ntpq-subs.c ntpq-opts.c ntpq-opts.h
|
|
|
|
|
2013-12-04 21:33:17 +00:00
|
|
|
libntpq_a_SOURCES = libntpq.c libntpq.h libntpq_subs.c
|
|
|
|
|
2008-08-18 14:26:05 +00:00
|
|
|
$(srcdir)/ntpq-opts.h: $(srcdir)/ntpq-opts.c
|
2013-12-04 21:33:17 +00:00
|
|
|
@: do-nothing action to avoid default SCCS get, .h built with .c
|
2020-03-04 13:59:29 +00:00
|
|
|
|
2008-08-18 14:26:05 +00:00
|
|
|
$(srcdir)/ntpq-opts.c: $(srcdir)/ntpq-opts.def $(std_def_list)
|
|
|
|
$(run_ag) ntpq-opts.def
|
1999-12-09 13:01:21 +00:00
|
|
|
|
2014-12-20 22:52:39 +00:00
|
|
|
###
|
|
|
|
|
|
|
|
$(srcdir)/ntpq.1ntpqman: $(srcdir)/ntpq-opts.def $(std_def_list)
|
|
|
|
$(run_ag) -DMAN_SECTION=1ntpqman -Tagman-cmd.tpl ntpq-opts.def
|
2008-08-18 14:26:05 +00:00
|
|
|
|
2014-12-20 22:52:39 +00:00
|
|
|
$(srcdir)/ntpq.man.in: $(srcdir)/ntpq.1ntpqman $(top_srcdir)/sntp/scripts/mansec2subst.sed
|
|
|
|
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpq.1ntpqman > $(srcdir)/ntpq.man.in+
|
|
|
|
mv $(srcdir)/ntpq.man.in+ $(srcdir)/ntpq.man.in
|
|
|
|
|
|
|
|
###
|
|
|
|
|
|
|
|
$(srcdir)/ntpq.1ntpqmdoc: $(srcdir)/ntpq-opts.def $(std_def_list)
|
|
|
|
$(run_ag) -DMAN_SECTION=1ntpqmdoc -Tagmdoc-cmd.tpl ntpq-opts.def
|
|
|
|
|
|
|
|
$(srcdir)/ntpq.mdoc.in: $(srcdir)/ntpq.1ntpqmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
|
|
|
|
sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpq.1ntpqmdoc > $(srcdir)/ntpq.mdoc.in+
|
|
|
|
mv $(srcdir)/ntpq.mdoc.in+ $(srcdir)/ntpq.mdoc.in
|
|
|
|
|
|
|
|
###
|
|
|
|
|
|
|
|
ntpq.$(NTPQ_MS): $(srcdir)/ntpq.$(MANTAGFMT).in $(top_builddir)/config.status
|
|
|
|
$(top_builddir)/config.status --file=ntpq.$(NTPQ_MS)+:$(srcdir)/ntpq.$(MANTAGFMT).in
|
|
|
|
mv ntpq.$(NTPQ_MS)+ ntpq.$(NTPQ_MS)
|
|
|
|
|
|
|
|
###
|
|
|
|
|
|
|
|
$(srcdir)/invoke-ntpq.menu: $(srcdir)/invoke-ntpq.texi
|
2013-12-04 21:33:17 +00:00
|
|
|
@: do-nothing action to avoid default SCCS get, .menu built with .texi
|
2020-03-04 13:59:29 +00:00
|
|
|
|
2014-12-20 22:52:39 +00:00
|
|
|
$(srcdir)/invoke-ntpq.texi: $(srcdir)/ntpq-opts.def $(std_def_list)
|
|
|
|
$(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntpq-opts.def
|
|
|
|
$(top_srcdir)/scripts/build/check--help $@
|
1999-12-09 13:01:21 +00:00
|
|
|
|
2014-12-20 22:52:39 +00:00
|
|
|
$(srcdir)/ntpq.html: $(srcdir)/ntpq.texi $(top_srcdir)/sntp/include/version.texi
|
|
|
|
cd $(srcdir) && ( makeinfo --force --html --no-split -o ntpq.html ntpq.texi || true )
|
1999-12-09 13:01:21 +00:00
|
|
|
|
2014-12-20 22:52:39 +00:00
|
|
|
###
|
1999-12-09 13:01:21 +00:00
|
|
|
|
2014-12-20 22:52:39 +00:00
|
|
|
$(PROGRAMS): version.o
|
2008-08-18 14:26:05 +00:00
|
|
|
|
2014-12-20 22:52:39 +00:00
|
|
|
$(top_srcdir)/sntp/scm-rev:
|
|
|
|
cd ../sntp && $(MAKE) $(AM_MAKEFLAGS) check-scm-rev
|
|
|
|
|
|
|
|
version.c: $(ntpq_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/sntp/scm-rev
|
|
|
|
env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/build/mkver ntpq
|
2020-03-04 13:59:29 +00:00
|
|
|
|
2014-12-20 22:52:39 +00:00
|
|
|
version.o: version.c
|
|
|
|
env CCACHE_DISABLE=1 $(COMPILE) -c version.c -o version.o
|
2013-12-04 21:33:17 +00:00
|
|
|
|
|
|
|
include $(top_srcdir)/bincheck.mf
|
2014-12-20 22:52:39 +00:00
|
|
|
include $(top_srcdir)/check-libopts.mf
|
|
|
|
include $(top_srcdir)/sntp/check-libntp.mf
|
2013-12-04 21:33:17 +00:00
|
|
|
include $(top_srcdir)/depsver.mf
|
2014-12-20 22:52:39 +00:00
|
|
|
include $(top_srcdir)/includes.mf
|