3 bin_PROGRAMS= $(NTPDC_DB)
4 libexec_PROGRAMS= $(NTPDC_DL)
5 sbin_PROGRAMS= $(NTPDC_DS)
7 EXTRA_PROGRAMS= ntpdc ntpdc-layout
8 EXTRA_DATA= check-layout
9 BUILT_SOURCES= @MAKE_CHECK_LAYOUT@ ntpdc-opts.c ntpdc-opts.h
11 AM_CFLAGS = $(CFLAGS_NTP)
13 AM_CPPFLAGS = $(NTP_INCS)
14 AM_CPPFLAGS += $(LIBOPTS_CFLAGS)
15 AM_CPPFLAGS += $(CPPFLAGS_NTP)
17 AM_LDFLAGS = $(LDFLAGS_NTP)
19 # LDADD might need RESLIB and ADJLIB
20 ntpdc_LDADD = version.o $(LIBOPTS_LDADD)
21 ntpdc_LDADD += ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM)
22 ntpdc_LDADD += $(PTHREAD_LIBS) $(EDITLINE_LIBS)
23 ntpdc_LDADD += $(LDADD_NTP)
24 # ntpdc-layout doesn't need any additional libraries at all
27 DISTCLEANFILES= .version version.c config.log $(man_MANS)
28 CLEANFILES= check-layout layout.here nl.c ntpdc-layout
29 noinst_HEADERS= ntpdc.h
30 ETAGS_ARGS= Makefile.am
48 man_MANS= ntpdc.$(NTPDC_MS)
50 ## HMS: Real Soon Now...
51 ##info_TEXINFOS= ntpdc.texi
52 ##ntpdc_TEXINFOS= ntpdc-opts.texi
55 $(srcdir)/ntpdc.html \
59 $(srcdir)/invoke-ntpdc.menu \
60 $(srcdir)/invoke-ntpdc.texi \
61 $(srcdir)/ntpdc.man.in \
62 $(srcdir)/ntpdc.mdoc.in \
65 install-data-local: install-html
67 run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" AUTOGEN_DNE_DATE=-D \
68 autogen -L ../sntp/include -L ../sntp/ag-tpl --writable
71 $(top_srcdir)/sntp/include/debug-opt.def \
72 $(top_srcdir)/sntp/include/autogen-version.def \
73 $(top_srcdir)/sntp/include/copyright.def \
74 $(top_srcdir)/sntp/include/homerc.def \
75 $(top_srcdir)/sntp/include/ntp.lic \
76 $(top_srcdir)/sntp/include/version.def \
79 $(srcdir)/ntpdc-opts.h: $(srcdir)/ntpdc-opts.c
80 @: do-nothing action to avoid default SCCS get, .h built with .c
82 $(srcdir)/ntpdc-opts.c: $(srcdir)/ntpdc-opts.def $(std_def_list)
83 $(run_ag) ntpdc-opts.def
87 $(srcdir)/ntpdc.1ntpdcman: $(srcdir)/ntpdc-opts.def $(std_def_list)
88 $(run_ag) -DMAN_SECTION=1ntpdcman -Tagman-cmd.tpl ntpdc-opts.def
90 $(srcdir)/ntpdc.man.in: $(srcdir)/ntpdc.1ntpdcman $(top_srcdir)/sntp/scripts/mansec2subst.sed
91 sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpdc.1ntpdcman > $(srcdir)/ntpdc.man.in+
92 mv $(srcdir)/ntpdc.man.in+ $(srcdir)/ntpdc.man.in
96 $(srcdir)/ntpdc.1ntpdcmdoc: $(srcdir)/ntpdc-opts.def $(std_def_list)
97 $(run_ag) -DMAN_SECTION=1ntpdcmdoc -Tagmdoc-cmd.tpl ntpdc-opts.def
99 $(srcdir)/ntpdc.mdoc.in: $(srcdir)/ntpdc.1ntpdcmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
100 sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpdc.1ntpdcmdoc > $(srcdir)/ntpdc.mdoc.in+
101 mv $(srcdir)/ntpdc.mdoc.in+ $(srcdir)/ntpdc.mdoc.in
105 ntpdc.$(NTPDC_MS): $(srcdir)/ntpdc.$(MANTAGFMT).in $(top_builddir)/config.status
106 $(top_builddir)/config.status --file=ntpdc.$(NTPDC_MS)+:$(srcdir)/ntpdc.$(MANTAGFMT).in
107 mv ntpdc.$(NTPDC_MS)+ ntpdc.$(NTPDC_MS)
111 $(srcdir)/invoke-ntpdc.menu: $(srcdir)/invoke-ntpdc.texi
112 @: do-nothing action to avoid default SCCS get, .menu built with .texi
114 $(srcdir)/invoke-ntpdc.texi: $(srcdir)/ntpdc-opts.def $(std_def_list)
115 $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntpdc-opts.def
116 $(top_srcdir)/scripts/build/check--help $@
118 $(srcdir)/ntpdc.html: $(srcdir)/invoke-ntpdc.menu $(srcdir)/invoke-ntpdc.texi $(srcdir)/ntpdc.texi $(top_srcdir)/sntp/include/version.texi
119 cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o ntpdc.html ntpdc.texi || true )
121 ntpdc_SOURCES = ntpdc.c ntpdc_ops.c ntpdc-opts.c ntpdc-opts.h
125 layout.here: ntpdc-layout
128 check-layout: ntpdc-layout $(srcdir)/layout.std layout.here
129 cmp $(srcdir)/layout.std layout.here && echo stamp > $@
131 $(PROGRAMS): version.o
133 $(top_srcdir)/sntp/scm-rev:
134 cd ../sntp && $(MAKE) $(AM_MAKEFLAGS) check-scm-rev
136 version.c: $(ntpdc_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/sntp/scm-rev
137 env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/build/mkver ntpdc
140 env CCACHE_DISABLE=1 $(COMPILE) -c version.c -o version.o
142 # I ran nl_in.c (attached, to be installed into ntpdc) through
143 # $(CC) -E nl_in.c | nl.pl > nl.c
144 nl.c: nl_in.c nl.pl Makefile.am ../config.h ../include/ntp_request.h ntpdc.h
145 $(CC) -E $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(srcdir)/nl_in.c | ./nl.pl > nl.c
147 include $(top_srcdir)/bincheck.mf
148 include $(top_srcdir)/check-libopts.mf
149 include $(top_srcdir)/sntp/check-libntp.mf
150 include $(top_srcdir)/depsver.mf
151 include $(top_srcdir)/includes.mf