40
41
build_triplet = @build@
41
42
host_triplet = @host@
42
bin_PROGRAMS = ntpd$(EXEEXT) @MAKE_NTPDSIM@
43
@NTP_BINSUBDIR_IS_BIN_TRUE@bin_PROGRAMS = ntpd$(EXEEXT) @MAKE_NTPDSIM@
44
@NTP_BINSUBDIR_IS_BIN_FALSE@sbin_PROGRAMS = ntpd$(EXEEXT) \
45
@NTP_BINSUBDIR_IS_BIN_FALSE@ @MAKE_NTPDSIM@ $(am__empty)
43
46
EXTRA_PROGRAMS = check_y2k$(EXEEXT) ntpdsim$(EXEEXT) \
44
47
keyword-gen$(EXEEXT)
45
48
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
93
96
refclock_wwv.$(OBJEXT) refclock_wwvb.$(OBJEXT) \
94
97
refclock_zyfer.$(OBJEXT) $(am__objects_1)
95
98
libntpd_a_OBJECTS = $(am_libntpd_a_OBJECTS)
96
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"
97
PROGRAMS = $(bin_PROGRAMS)
99
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" \
100
"$(DESTDIR)$(man1dir)"
101
PROGRAMS = $(bin_PROGRAMS) $(sbin_PROGRAMS)
98
102
check_y2k_SOURCES = check_y2k.c
99
103
check_y2k_OBJECTS = check_y2k.$(OBJEXT)
100
104
am__DEPENDENCIES_1 = version.o libntpd.a
326
330
@NTP_CROSSCOMPILE_FALSE@@SAVECONFIG_ENABLED_TRUE@CHECK_SAVECONFIG = check-saveconfig
327
331
@NTP_CROSSCOMPILE_TRUE@@SAVECONFIG_ENABLED_TRUE@CHECK_SAVECONFIG =
328
332
@SAVECONFIG_ENABLED_FALSE@CHECK_SAVECONFIG =
329
@NTP_CROSSCOMPILE_FALSE@NTP_KEYWORD_OUT = ntp_keyword.out
330
@NTP_CROSSCOMPILE_TRUE@NTP_KEYWORD_OUT = ntp_keyword.dummy
331
333
@VPATH_HACK_FALSE@VPHACK =
343
345
@VPATH_HACK_TRUE@VPHACK = vphack
344
346
@VPATH_HACK_FALSE@VPHACK_AFTER =
345
347
@VPATH_HACK_TRUE@VPHACK_AFTER = vphack_after
349
# BUILT_SOURCES which should also be in EXTRA_DIST
346
355
BUILT_SOURCES = $(VPHACK) ntp_parser.c ntp_parser.h $(VPHACK_AFTER) \
347
ntp_keyword.h ntpd-opts.c ntpd-opts.h ntpd.1 ntpd-opts.texi \
348
ntpd-opts.menu .deps-ver
356
$(B_S_DIST) $(NULL) .deps-ver
357
man_MANS = $(srcdir)/ntpd.1
351
359
# ntpdsim.1 is a remnant along with all the ntpdsim-opts.* files, the
352
360
# simulator currently uses ntpd-opts.[ch]. This also means there is no
357
365
# sqrt ntp_control.o
358
366
# floor refclock_wwv.o
359
367
# which are (usually) provided by -lm.
360
keyword_gen_LDADD = ../libntp/libntp.a
361
ntpd_LDADD = $(LDADD) -lm @LCRYPTO@ @LSCF@ $(LIBOPTS_LDADD) ../libntp/libntp.a
362
ntpdsim_LDADD = $(LDADD) -lm @LCRYPTO@ @LSCF@ $(LIBOPTS_LDADD) ../libntp/libntpsim.a
368
ntpd_LDADD = $(LDADD) $(LIBOPTS_LDADD) ../libntp/libntp.a -lm @LCRYPTO@ @LSCF@
369
ntpdsim_LDADD = $(LDADD) $(LIBOPTS_LDADD) ../libntp/libntpsim.a -lm @LCRYPTO@ @LSCF@
363
370
ntpdsim_CFLAGS = $(CFLAGS) -DSIM
364
371
check_y2k_LDADD = $(LDADD) ../libntp/libntp.a
365
DISTCLEANFILES = keyword-gen .version version.c
366
CLEANFILES = check-saveconfig compsave.conf ntp_keyword.out \
367
ntp_keyword.dummy .deps-ver
372
keyword_gen_LDADD = ../libntp/libntp.a # we don't want $(LDADD) here
379
CLEANFILES = check-saveconfig compsave.conf k-g-u-submake $(NULL) \
371
388
ntpdbase-opts.def \
373
389
refclock_msfees.c \
374
390
refclock_trak.c \
378
394
ETAGS_ARGS = Makefile.am
380
396
check_PROGRAMS = @MAKE_CHECK_Y2K@
381
run_ag = cd $(srcdir) && \
382
env PATH="$(abs_builddir):$(PATH)" \
397
noinst_DATA = $(srcdir)/ntpd-opts.texi $(srcdir)/ntpd-opts.menu
398
run_ag = cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" \
383
399
autogen -L ../include --writable
385
401
std_def_list = $(top_srcdir)/include/autogen-version.def \
559
576
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
560
577
echo " rm -f" $$list; \
579
install-sbinPROGRAMS: $(sbin_PROGRAMS)
581
test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
582
@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
583
for p in $$list; do echo "$$p $$p"; done | \
584
sed 's/$(EXEEXT)$$//' | \
585
while read p p1; do if test -f $$p || test -f $$p1; \
586
then echo "$$p"; echo "$$p"; else :; fi; \
588
sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
589
-e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
590
sed 'N;N;N;s,\n, ,g' | \
591
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
592
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
593
if ($$2 == $$4) files[d] = files[d] " " $$1; \
594
else { print "f", $$3 "/" $$4, $$1; } } \
595
END { for (d in files) print "f", d, files[d] }' | \
596
while read type dir files; do \
597
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
598
test -z "$$files" || { \
599
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
600
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
604
uninstall-sbinPROGRAMS:
606
@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
607
files=`for p in $$list; do echo "$$p"; done | \
608
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
609
-e 's/$$/$(EXEEXT)/' `; \
610
test -n "$$list" || exit 0; \
611
echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
612
cd "$(DESTDIR)$(sbindir)" && rm -f $$files
615
@list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \
616
echo " rm -f" $$list; \
617
rm -f $$list || exit $$?; \
618
test -n "$(EXEEXT)" || exit 0; \
619
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
620
echo " rm -f" $$list; \
562
622
check_y2k$(EXEEXT): $(check_y2k_OBJECTS) $(check_y2k_DEPENDENCIES)
563
623
@rm -f check_y2k$(EXEEXT)
564
624
$(LINK) $(check_y2k_OBJECTS) $(check_y2k_LDADD) $(LIBS)
950
1010
$(MAKE) $(AM_MAKEFLAGS) check-local
951
1011
check: $(BUILT_SOURCES)
952
1012
$(MAKE) $(AM_MAKEFLAGS) check-am
953
all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(MANS)
1013
all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(MANS) $(DATA)
955
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \
1015
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man1dir)"; do \
956
1016
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
958
1018
install: $(BUILT_SOURCES)
1066
1128
.PHONY: CTAGS GTAGS all all-am check check-am check-local clean \
1067
1129
clean-binPROGRAMS clean-checkPROGRAMS clean-generic \
1068
clean-libtool clean-noinstLIBRARIES ctags distclean \
1069
distclean-compile distclean-generic distclean-libtool \
1070
distclean-tags distdir dvi dvi-am html html-am info info-am \
1071
install install-am install-binPROGRAMS install-data \
1072
install-data-am install-dvi install-dvi-am install-exec \
1073
install-exec-am install-exec-hook install-html install-html-am \
1074
install-info install-info-am install-man install-man1 \
1075
install-pdf install-pdf-am install-ps install-ps-am \
1076
install-strip installcheck installcheck-am installdirs \
1077
maintainer-clean maintainer-clean-generic mostlyclean \
1078
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
1079
pdf pdf-am ps ps-am tags uninstall uninstall-am \
1080
uninstall-binPROGRAMS uninstall-man uninstall-man1
1130
clean-libtool clean-noinstLIBRARIES clean-sbinPROGRAMS ctags \
1131
distclean distclean-compile distclean-generic \
1132
distclean-libtool distclean-tags distdir dvi dvi-am html \
1133
html-am info info-am install install-am install-binPROGRAMS \
1134
install-data install-data-am install-dvi install-dvi-am \
1135
install-exec install-exec-am install-exec-hook install-html \
1136
install-html-am install-info install-info-am install-man \
1137
install-man1 install-pdf install-pdf-am install-ps \
1138
install-ps-am install-sbinPROGRAMS install-strip installcheck \
1139
installcheck-am installdirs maintainer-clean \
1140
maintainer-clean-generic mostlyclean mostlyclean-compile \
1141
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
1142
tags uninstall uninstall-am uninstall-binPROGRAMS \
1143
uninstall-man uninstall-man1 uninstall-sbinPROGRAMS
1100
1163
check-local: @MAKE_CHECK_Y2K@ $(CHECK_SAVECONFIG)
1101
1164
test -z "@MAKE_CHECK_Y2K@" || ./@MAKE_CHECK_Y2K@
1103
ntp_keyword.out: keyword-gen
1104
./keyword-gen $(srcdir)/ntp_parser.h > $@
1105
grep -v diff_ignore_line < $(srcdir)/ntp_keyword.h > cmp1
1106
grep -v diff_ignore_line < $@ > cmp2
1107
cmp cmp1 cmp2 > /dev/null || cp $@ $(srcdir)/ntp_keyword.h
1113
$(srcdir)/ntp_keyword.h: $(NTP_KEYWORD_OUT)
1166
k-g-u-submake: keyword-gen
1167
./keyword-gen $(srcdir)/ntp_parser.h > k-g.out
1168
@grep -v diff_ignore_line < k-g.out > cmp1
1169
@grep -v diff_ignore_line < $(srcdir)/ntp_keyword.h > cmp2
1170
@cmp cmp1 cmp2 > /dev/null || \
1171
{ mv -f k-g.out $(srcdir)/ntp_keyword.h && \
1172
echo 'Generated changed ntp_keyword.h.' ;}
1173
@[ ! -f k-g.out ] || \
1174
{ rm k-g.out && echo 'ntp_keyword.h is up to date.' ;}
1176
@echo 'keyword-gen and ntp_keyword.h are up to date.' > $@
1178
$(srcdir)/keyword-gen-utd: $(srcdir)/keyword-gen.c $(srcdir)/ntp_parser.h
1179
$(MAKE) k-g-u-submake # avoid explicit dependency
1180
grep diff_ignore_line $(srcdir)/ntp_keyword.h > k-g-u
1183
$(srcdir)/ntp_keyword.h: $(srcdir)/keyword-gen-utd
1114
1184
@: do-nothing action to avoid default SCCS get
1115
@: .h updated if needed by ntp_keyword.out rule
1185
@: .h updated if needed by k-g-u-submake rule
1117
1187
$(srcdir)/ntpd-opts.h: $(srcdir)/ntpd-opts.c
1118
1188
@: do-nothing action to avoid default SCCS get, .h built with .c
1123
1193
$(srcdir)/ntpd.1: $(srcdir)/ntpd-opts.def $(srcdir)/ntpdbase-opts.def $(std_def_list)
1124
1194
$(run_ag) -Tagman1.tpl -bntpd ntpd-opts.def
1126
$(srcdir)/ntpd-opts.texi $(srcdir)/ntpd-opts.menu: $(srcdir)/ntpd-opts.def $(srcdir)/ntpdbase-opts.def $(std_def_list)
1127
$(MAKE) ntpd # aginfo.tpl runs the binary to extract --help usage text
1196
$(srcdir)/ntpd-opts.menu: $(srcdir)/ntpd-opts.texi
1197
@: do-nothing action to avoid default SCCS get, .menu built with .texi
1199
$(srcdir)/ntpd-opts.texi: $(srcdir)/ntpd-opts.def $(srcdir)/ntpdbase-opts.def $(std_def_list)
1128
1200
$(run_ag) -Taginfo.tpl -DLEVEL=section ntpd-opts.def
1130
1202
$(PROGRAMS): $(LDADD)
1135
1207
check-saveconfig: $(srcdir)/complete.conf compsave.conf
1136
1208
cmp $(srcdir)/complete.conf compsave.conf && echo stamp > $@
1210
../libopts/libopts.la:
1211
cd ../libopts && $(MAKE) libopts.la
1138
1213
../libntp/libntp.a:
1139
1214
cd ../libntp && $(MAKE) libntp.a
1141
1216
../libparse/libparse.a:
1142
cd ../libparse && $(MAKE)
1217
cd ../libparse && $(MAKE) libparse.a
1144
$(top_srcdir)/version :
1219
$(top_srcdir)/version:
1145
1220
cd $(top_srcdir) && $(MAKE) version
1147
1222
version.o: $(ntpd_OBJECTS) ../libntp/libntp.a @LIBPARSE@ Makefile $(top_srcdir)/version
1149
1224
$(COMPILE) -c version.c
1151
1226
install-exec-hook:
1152
@case ${BINSUBDIR} in \
1153
bin) ODIR=${exec_prefix}/sbin ;; \
1154
sbin) ODIR=${exec_prefix}/bin ;; \
1156
test -z "${bin_PROGRAMS}${bin_SCRIPTS}" \
1227
@case ${BINSUBDIR} in \
1228
bin) ODIR=${sbindir} ;; \
1229
sbin) ODIR=${bindir} ;; \
1231
test -z "${bin_PROGRAMS}${bin_SCRIPTS}" \
1157
1232
|| for i in ${bin_PROGRAMS} ${bin_SCRIPTS} " "; do \
1158
1233
test ! -f $$ODIR/$$i || echo "*** $$i is also in $$ODIR!"; \