1 # Makefile.am for JMK's SNTP, by Harlan Stenn
5 AUTOMAKE_OPTIONS = foreign 1.10
6 ACLOCAL_AMFLAGS= -I ../m4 -I libopts/m4
8 AM_CPPFLAGS= $(LIBOPTS_CFLAGS) -I$(top_srcdir)/../include \
9 -I$(top_srcdir)/../lib/isc/include \
10 -I$(top_srcdir)/../lib/isc/nothreads/include \
11 -I$(top_srcdir)/../lib/isc/unix/include
13 LDADD= $(LIBOPTS_LDADD) -lm ../libntp/libntp.a
15 run_ag= cd $(srcdir) && \
16 env PATH="$(abs_builddir):$(PATH)" \
17 autogen -L ../include --writable
19 bindir= ${exec_prefix}/${BINSUBDIR}
21 CLEANFILES= libopts-subdir
48 #dist_man_MANS= sntp.1
68 autogen-version.def version.def version.m4 version.texi
71 check-autogen-version.def \
72 check-version.def check-version.m4 \
86 check-autogen-version.def: FRC
88 && test -r ../include/autogen-version.def \
89 && ( if cmp -s ../include/autogen-version.def autogen-version.def; \
91 else cp ../include/autogen-version.def autogen-version.def; \
92 echo "Installing new sntp/autogen-version.def file"; \
95 check-version.def: FRC
97 && test -r ../include/version.def \
98 && ( if cmp -s ../include/version.def version.def; \
100 else cp ../include/version.def version.def; \
101 echo "Installing new sntp/version.def file"; \
104 check-version.m4: FRC
106 && test -r ../version.m4 \
107 && ( if cmp -s ../version.m4 version.m4; \
109 else cp ../version.m4 version.m4; \
110 echo "Installing new sntp/version.m4 file"; \
113 check-version.texi: FRC
115 && test -r ../include/version.texi \
116 && ( if cmp -s ../include/version.texi version.texi; \
118 else cp ../include/version.texi version.texi; \
119 echo "Installing new sntp/version.texi file"; \
122 $(srcdir)/../COPYRIGHT:
123 cd .. && $(MAKE) COPYRIGHT
125 $(srcdir)/COPYRIGHT: $(srcdir)/../COPYRIGHT
126 cat $(srcdir)/../COPYRIGHT > $@
128 $(srcdir)/sntp-opts.h: $(srcdir)/sntp-opts.c
129 @: do-nothing action to avoid default SCCS get, .h built with .c
131 $(srcdir)/sntp-opts.c: $(srcdir)/sntp-opts.def $(srcdir)/../include/version.def
132 $(run_ag) sntp-opts.def
134 $(srcdir)/sntp.1: $(srcdir)/sntp-opts.def $(srcdir)/../include/version.def
135 $(run_ag) -Tagman1.tpl -bsntp sntp-opts.def
137 $(srcdir)/sntp-opts.texi $(srcdir)/sntp-opts.menu: $(srcdir)/sntp-opts.def $(srcdir)/../include/version.def
138 $(MAKE) libopts-subdir sntp # aginfo.tpl runs binary to extract --help usage text
139 $(run_ag) -Taginfo.tpl -DLEVEL=section sntp-opts.def
141 libopts-subdir: $(LIBOPTS_LDADD)
142 touch $@ # LIBOPTS_LDADD is ./libopts/libopts.la if NEED_LIBOPTS
145 ( cd libopts && $(MAKE) libopts.la )
147 $(srcdir)/sntp.html: $(srcdir)/sntp-opts.menu $(srcdir)/sntp-opts.texi $(srcdir)/sntp.texi $(srcdir)/version.texi
148 cd $(srcdir) && makeinfo --force --html --no-split -o sntp.html sntp.texi
151 cd ../libntp && $(MAKE)
153 libtool: $(LIBTOOL_DEPS)
154 ./config.status --recheck
156 include $(top_srcdir)/bincheck.mf
157 include $(top_srcdir)/depsver.mf