1NULL= 2 3EXTRA_PROGRAMS= ntpq 4bin_PROGRAMS= $(NTPQ_DB) 5libexec_PROGRAMS= $(NTPQ_DL) 6sbin_PROGRAMS= $(NTPQ_DS) 7 8AM_CFLAGS = $(CFLAGS_NTP) 9AM_CFLAGS += $(NTP_HARD_CFLAGS) 10 11AM_CPPFLAGS = $(NTP_INCS) 12AM_CPPFLAGS += $(LIBOPTS_CFLAGS) 13AM_CPPFLAGS += $(CPPFLAGS_NTP) 14AM_CPPFLAGS += $(NTP_HARD_CPPFLAGS) 15 16AM_LDFLAGS = $(LDFLAGS_NTP) 17AM_LDFLAGS += $(NTP_HARD_LDFLAGS) 18 19# LDADD might need RESLIB and ADJLIB 20ntpq_LDADD = version.o $(LIBOPTS_LDADD) 21ntpq_LDADD += ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) 22ntpq_LDADD += $(PTHREAD_LIBS) $(EDITLINE_LIBS) 23ntpq_LDADD += $(LDADD_NTP) 24ntpq_LDADD += $(NTP_HARD_LDFLAGS) 25noinst_HEADERS= ntpq.h 26noinst_LIBRARIES= libntpq.a 27libntpq_a_CFLAGS= $(AM_CFLAGS) 28libntpq_a_CFLAGS+= -DNO_MAIN_ALLOWED -DBUILD_AS_LIB 29libntpq_a_CPPFLAGS= $(AM_CPPFLAGS) 30libntpq_a_LDFLAGS= $(AM_LDFLAGS) 31CLEANFILES= 32DISTCLEANFILES= .version version.c config.log $(man_MANS) 33ETAGS_ARGS= Makefile.am 34EXTRA_DIST= \ 35 invoke-ntpq.menu \ 36 invoke-ntpq.texi \ 37 ntpq-opts.def \ 38 ntpq.1ntpqman \ 39 ntpq.1ntpqmdoc \ 40 ntpq.man.in \ 41 ntpq.mdoc.in \ 42 ntpq.html \ 43 ntpq.texi \ 44 $(NULL) 45 46BUILT_SOURCES= ntpq-opts.c ntpq-opts.h 47 48html_DATA= \ 49 $(srcdir)/ntpq.html \ 50 $(NULL) 51 52noinst_DATA= \ 53 $(srcdir)/invoke-ntpq.menu \ 54 $(srcdir)/invoke-ntpq.texi \ 55 $(srcdir)/ntpq.man.in \ 56 $(srcdir)/ntpq.mdoc.in \ 57 $(NULL) 58 59install-data-local: install-html 60 61man1_MANS= 62man8_MANS= 63man_MANS= ntpq.$(NTPQ_MS) 64 65run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" AUTOGEN_DNE_DATE=-D \ 66 autogen -L ../sntp/include -L ../sntp/ag-tpl --writable 67std_def_list = \ 68 $(top_srcdir)/sntp/include/debug-opt.def \ 69 $(top_srcdir)/sntp/include/autogen-version.def \ 70 $(top_srcdir)/sntp/include/copyright.def \ 71 $(top_srcdir)/sntp/include/homerc.def \ 72 $(top_srcdir)/sntp/include/ntp.lic \ 73 $(top_srcdir)/sntp/include/version.def \ 74 $(NULL) 75ntpq_SOURCES= ntpq.c ntpq-subs.c ntpq-opts.c ntpq-opts.h 76 77libntpq_a_SOURCES = libntpq.c libntpq.h libntpq_subs.c 78 79$(srcdir)/ntpq-opts.h: $(srcdir)/ntpq-opts.c 80 @: do-nothing action to avoid default SCCS get, .h built with .c 81 82$(srcdir)/ntpq-opts.c: $(srcdir)/ntpq-opts.def $(std_def_list) 83 $(run_ag) ntpq-opts.def 84 85### 86 87$(srcdir)/ntpq.1ntpqman: $(srcdir)/ntpq-opts.def $(std_def_list) 88 $(run_ag) -DMAN_SECTION=1ntpqman -Tagman-cmd.tpl ntpq-opts.def 89 90$(srcdir)/ntpq.man.in: $(srcdir)/ntpq.1ntpqman $(top_srcdir)/sntp/scripts/mansec2subst.sed 91 sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpq.1ntpqman > $(srcdir)/ntpq.man.in+ 92 mv $(srcdir)/ntpq.man.in+ $(srcdir)/ntpq.man.in 93 94### 95 96$(srcdir)/ntpq.1ntpqmdoc: $(srcdir)/ntpq-opts.def $(std_def_list) 97 $(run_ag) -DMAN_SECTION=1ntpqmdoc -Tagmdoc-cmd.tpl ntpq-opts.def 98 99$(srcdir)/ntpq.mdoc.in: $(srcdir)/ntpq.1ntpqmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed 100 sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpq.1ntpqmdoc > $(srcdir)/ntpq.mdoc.in+ 101 mv $(srcdir)/ntpq.mdoc.in+ $(srcdir)/ntpq.mdoc.in 102 103### 104 105ntpq.$(NTPQ_MS): $(srcdir)/ntpq.$(MANTAGFMT).in $(top_builddir)/config.status 106 $(top_builddir)/config.status --file=ntpq.$(NTPQ_MS)+:$(srcdir)/ntpq.$(MANTAGFMT).in 107 mv ntpq.$(NTPQ_MS)+ ntpq.$(NTPQ_MS) 108 109### 110 111$(srcdir)/invoke-ntpq.menu: $(srcdir)/invoke-ntpq.texi 112 @: do-nothing action to avoid default SCCS get, .menu built with .texi 113 114$(srcdir)/invoke-ntpq.texi: $(srcdir)/ntpq-opts.def $(std_def_list) 115 $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntpq-opts.def 116 $(top_srcdir)/scripts/build/check--help $@ 117 118$(srcdir)/ntpq.html: $(srcdir)/ntpq.texi $(top_srcdir)/sntp/include/version.texi 119 cd $(srcdir) && ( makeinfo --force --html --no-split -o ntpq.html ntpq.texi || true ) 120 121### 122 123$(PROGRAMS): version.o 124 125$(top_srcdir)/sntp/scm-rev: 126 cd ../sntp && $(MAKE) $(AM_MAKEFLAGS) check-scm-rev 127 128version.c: $(ntpq_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/sntp/scm-rev 129 env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/build/mkver ntpq 130 131version.o: version.c 132 env CCACHE_DISABLE=1 $(COMPILE) -c version.c -o version.o 133 134include $(top_srcdir)/bincheck.mf 135include $(top_srcdir)/check-libopts.mf 136include $(top_srcdir)/sntp/check-libntp.mf 137include $(top_srcdir)/depsver.mf 138include $(top_srcdir)/includes.mf 139