xref: /freebsd/contrib/ntp/ntpd/Makefile.am (revision 276da39af92f48350aa01091a2b8b3e735217eea)
12b15cb3dSCy SchubertNULL=
2ea906c41SOllivier Robert
32b15cb3dSCy Schubertbin_PROGRAMS=	$(NTPD_DB) $(NTPDSIM_DB)
42b15cb3dSCy Schubertlibexec_PROGRAMS=	$(NTPD_DL) $(NTPDSIM_DL)
52b15cb3dSCy Schubertsbin_PROGRAMS=	$(NTPD_DS) $(NTPDSIM_DS)
6ea906c41SOllivier Robert
79c2daa00SOllivier Robertnoinst_LIBRARIES=	libntpd.a
8ea906c41SOllivier Robert
92b15cb3dSCy SchubertAM_CFLAGS = $(CFLAGS_NTP)
102b15cb3dSCy Schubert
112b15cb3dSCy SchubertAM_CPPFLAGS  = $(NTP_INCS)
122b15cb3dSCy SchubertAM_CPPFLAGS += $(LIBOPTS_CFLAGS)
132b15cb3dSCy SchubertAM_CPPFLAGS += $(CPPFLAGS_NTP)
142b15cb3dSCy Schubert
152b15cb3dSCy SchubertAM_LDFLAGS = $(LDFLAGS_NTP)
162b15cb3dSCy Schubert
179c2daa00SOllivier Robert# LDADD might need RESLIB and ADJLIB.
182b15cb3dSCy SchubertLDADD = version.o libntpd.a $(LIBPARSE)
192b15cb3dSCy SchubertAM_YFLAGS = -d -t -r all
20ea906c41SOllivier Robert
212b15cb3dSCy Schubertif SAVECONFIG_ENABLED
222b15cb3dSCy Schubertif NTP_CROSSCOMPILE
232b15cb3dSCy SchubertCHECK_SAVECONFIG=
242b15cb3dSCy Schubertelse
252b15cb3dSCy SchubertCHECK_SAVECONFIG= check-saveconfig
262b15cb3dSCy Schubertendif
272b15cb3dSCy Schubertelse !SAVECONFIG_ENABLED
282b15cb3dSCy SchubertCHECK_SAVECONFIG=
292b15cb3dSCy Schubertendif
30ea906c41SOllivier Robert
312b15cb3dSCy Schubert#
322b15cb3dSCy Schubert# VPHACK and VPHACK_AFTER are enabled on non-GNU makes (such as
332b15cb3dSCy Schubert# BSD make) to work around issues specific to compiling
342b15cb3dSCy Schubert# ntp_parser.y into ntp_parser.h and ntp_parser.c in a VPATH
352b15cb3dSCy Schubert# configuration where we would like (for a change) the output
362b15cb3dSCy Schubert# files ntp_parser.[ch] to be placed in the source directory,
372b15cb3dSCy Schubert# as opposed to the build directory.  This allows a single
382b15cb3dSCy Schubert# host of a flock configured with Bison to update ntp_parser.[ch]
392b15cb3dSCy Schubert# used by the rest.
402b15cb3dSCy Schubert#
41ea906c41SOllivier Robert
422b15cb3dSCy Schubertif VPATH_HACK
432b15cb3dSCy SchubertVPHACK=	vphack
442b15cb3dSCy SchubertVPHACK_AFTER= vphack_after
452b15cb3dSCy Schubertelse
462b15cb3dSCy SchubertVPHACK=
472b15cb3dSCy SchubertVPHACK_AFTER=
482b15cb3dSCy Schubertendif
492b15cb3dSCy Schubert
502b15cb3dSCy Schubertvphack:
512b15cb3dSCy Schubert	test -e ntp_parser.c || ln -s $(srcdir)/ntp_parser.c .
522b15cb3dSCy Schubert	test -e ntp_parser.h || ln -s $(srcdir)/ntp_parser.h .
532b15cb3dSCy Schubert
542b15cb3dSCy Schubert#
552b15cb3dSCy Schubert# ylwrap script which invokes Bison replaces ntp_parser.h
562b15cb3dSCy Schubert# symlink with the updated file, when ntp_parser.h changes.
572b15cb3dSCy Schubert# vphack_after detects this and copies the updated file to srcdir
582b15cb3dSCy Schubert# and re-creates the ntp_parser.h symlink in its place.
592b15cb3dSCy Schubert#
602b15cb3dSCy Schubert
612b15cb3dSCy Schubertvphack_after:
622b15cb3dSCy Schubert	test -L ntp_parser.h || ( \
632b15cb3dSCy Schubert		mv ntp_parser.h $(srcdir)/ntp_parser.h && \
642b15cb3dSCy Schubert		ln -s $(srcdir)/ntp_parser.h . \
652b15cb3dSCy Schubert		)
662b15cb3dSCy Schubert
672b15cb3dSCy Schubert# BUILT_SOURCES which should also be in EXTRA_DIST
682b15cb3dSCy SchubertB_S_DIST=			\
692b15cb3dSCy Schubert	$(srcdir)/ntpd-opts.c	\
702b15cb3dSCy Schubert	$(srcdir)/ntpd-opts.h	\
712b15cb3dSCy Schubert	$(NULL)
722b15cb3dSCy Schubert
732b15cb3dSCy SchubertBUILT_SOURCES=		\
742b15cb3dSCy Schubert	$(VPHACK)	\
752b15cb3dSCy Schubert	$(LIBPARSE)	\
762b15cb3dSCy Schubert	ntp_parser.c	\
772b15cb3dSCy Schubert	ntp_parser.h	\
782b15cb3dSCy Schubert	$(VPHACK_AFTER)	\
792b15cb3dSCy Schubert	$(B_S_DIST)	\
802b15cb3dSCy Schubert	$(NULL)
812b15cb3dSCy Schubert
822b15cb3dSCy Schubertman1_MANS=
832b15cb3dSCy Schubertman5_MANS=	ntp.conf.5 ntp.keys.5
842b15cb3dSCy Schubertman8_MANS=
852b15cb3dSCy Schubertman_MANS=	ntpd.$(NTPD_MS)
862b15cb3dSCy Schubert
872b15cb3dSCy Schubert# ntpdsim.1 is a remnant along with all the ntpdsim-opts.* files, the
882b15cb3dSCy Schubert# simulator currently uses ntpd-opts.[ch].  This also means there is no
892b15cb3dSCy Schubert# longer a reason to have ntpdbase-opts.def split off of ntpd-opts.def.
902b15cb3dSCy Schubert
912b15cb3dSCy SchubertLDADD_NTPD_COMMON  = $(LDADD_LIBNTP) $(LIBOPTS_LDADD) $(PTHREAD_LIBS)
922b15cb3dSCy SchubertLDADD_NTPD_COMMON += $(LIBM) $(LDADD_NTP) $(LSCF)
932b15cb3dSCy Schubertntpd_LDADD = $(LDADD) ../libntp/libntp.a $(LDADD_NTPD_COMMON) $(LDADD_LIBUTIL)
942b15cb3dSCy Schubertntpdsim_LDADD = $(LDADD) ../libntp/libntpsim.a $(LDADD_NTPD_COMMON)
952b15cb3dSCy Schubertntpdsim_CPPFLAGS = $(AM_CPPFLAGS) -DSIM
962b15cb3dSCy Schubertcheck_y2k_LDADD = $(LDADD) ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(LDADD_LIBNTP) $(PTHREAD_LIBS)
972b15cb3dSCy Schubert## we don't want $(LDADD) in keyword_gen_LDADD
982b15cb3dSCy Schubertkeyword_gen_LDADD = ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(PTHREAD_LIBS)
992b15cb3dSCy Schubert
1002b15cb3dSCy SchubertDISTCLEANFILES =		\
1012b15cb3dSCy Schubert	keyword-gen		\
1022b15cb3dSCy Schubert	.version		\
1032b15cb3dSCy Schubert	version.c		\
1042b15cb3dSCy Schubert	config.log		\
1052b15cb3dSCy Schubert	$(man5_MANS)		\
1062b15cb3dSCy Schubert	$(man_MANS)		\
1072b15cb3dSCy Schubert	$(NULL)
1082b15cb3dSCy Schubert
1092b15cb3dSCy SchubertCLEANFILES =			\
1102b15cb3dSCy Schubert	check-saveconfig	\
1112b15cb3dSCy Schubert	compsave.conf		\
1122b15cb3dSCy Schubert	k-g-u-submake		\
1132b15cb3dSCy Schubert	$(EXTRA_PROGRAMS)	\
1142b15cb3dSCy Schubert	$(NULL)
1152b15cb3dSCy Schubert
1162b15cb3dSCy SchubertEXTRA_DIST =			\
1172b15cb3dSCy Schubert	complete.conf.in	\
1182b15cb3dSCy Schubert	invoke-ntp.conf.menu	\
1192b15cb3dSCy Schubert	invoke-ntp.conf.texi	\
1202b15cb3dSCy Schubert	invoke-ntp.keys.menu	\
1212b15cb3dSCy Schubert	invoke-ntp.keys.texi	\
1222b15cb3dSCy Schubert	invoke-ntpd.menu	\
1232b15cb3dSCy Schubert	invoke-ntpd.texi	\
1242b15cb3dSCy Schubert	keyword-gen-utd		\
1252b15cb3dSCy Schubert	ntp.conf.5man		\
1262b15cb3dSCy Schubert	ntp.conf.5mdoc		\
1272b15cb3dSCy Schubert	ntp.conf.def		\
1282b15cb3dSCy Schubert	ntp.conf.man.in		\
1292b15cb3dSCy Schubert	ntp.conf.mdoc.in	\
1302b15cb3dSCy Schubert	ntp.conf.html		\
1312b15cb3dSCy Schubert	ntp.conf.texi		\
1322b15cb3dSCy Schubert	ntp.keys.5man		\
1332b15cb3dSCy Schubert	ntp.keys.5mdoc		\
1342b15cb3dSCy Schubert	ntp.keys.def		\
1352b15cb3dSCy Schubert	ntp.keys.man.in		\
1362b15cb3dSCy Schubert	ntp.keys.mdoc.in	\
1372b15cb3dSCy Schubert	ntp.keys.html		\
1382b15cb3dSCy Schubert	ntp.keys.texi		\
1392b15cb3dSCy Schubert	ntpd-opts.def		\
1402b15cb3dSCy Schubert	ntpd.1ntpdman		\
1412b15cb3dSCy Schubert	ntpd.1ntpdmdoc		\
1422b15cb3dSCy Schubert	ntpd.man.in		\
1432b15cb3dSCy Schubert	ntpd.mdoc.in		\
1442b15cb3dSCy Schubert	ntpd.html		\
1452b15cb3dSCy Schubert	ntpd.texi		\
1462b15cb3dSCy Schubert	ntpdbase-opts.def	\
147ea906c41SOllivier Robert	refclock_msfees.c	\
1482b15cb3dSCy Schubert	$(B_S_DIST)		\
1492b15cb3dSCy Schubert	$(NULL)
1502b15cb3dSCy Schubert
151c0b746e5SOllivier Robert###							Y2Kfixes
152c0b746e5SOllivier Robertcheck_PROGRAMS = @MAKE_CHECK_Y2K@
1532b15cb3dSCy SchubertEXTRA_PROGRAMS = check_y2k keyword-gen ntpd ntpdsim
154c0b746e5SOllivier Robert
1552b15cb3dSCy Schuberthtml_DATA=				\
1562b15cb3dSCy Schubert	$(srcdir)/ntp.conf.html		\
1572b15cb3dSCy Schubert	$(srcdir)/ntp.keys.html		\
1582b15cb3dSCy Schubert	$(srcdir)/ntpd.html		\
1592b15cb3dSCy Schubert	$(NULL)
160c0b746e5SOllivier Robert
1612b15cb3dSCy Schubertnoinst_DATA =				\
1622b15cb3dSCy Schubert	$(srcdir)/invoke-ntp.conf.menu	\
1632b15cb3dSCy Schubert	$(srcdir)/invoke-ntp.conf.texi	\
1642b15cb3dSCy Schubert	$(srcdir)/invoke-ntp.keys.menu	\
1652b15cb3dSCy Schubert	$(srcdir)/invoke-ntp.keys.texi	\
1662b15cb3dSCy Schubert	$(srcdir)/invoke-ntpd.menu	\
1672b15cb3dSCy Schubert	$(srcdir)/invoke-ntpd.texi	\
1682b15cb3dSCy Schubert	$(srcdir)/ntp.conf.man.in	\
1692b15cb3dSCy Schubert	$(srcdir)/ntp.conf.mdoc.in	\
1702b15cb3dSCy Schubert	$(srcdir)/ntp.keys.man.in	\
1712b15cb3dSCy Schubert	$(srcdir)/ntp.keys.mdoc.in	\
1722b15cb3dSCy Schubert	$(srcdir)/ntpd.man.in		\
1732b15cb3dSCy Schubert	$(srcdir)/ntpd.mdoc.in		\
1742b15cb3dSCy Schubert	$(NULL)
1752b15cb3dSCy Schubert
1762b15cb3dSCy Schubertnoinst_HEADERS =			\
1772b15cb3dSCy Schubert	declcond.h			\
1782b15cb3dSCy Schubert	ntp_leapsec.h			\
1792b15cb3dSCy Schubert	$(NULL)
1802b15cb3dSCy Schubert
1812b15cb3dSCy Schubertinstall-data-local: install-html
1822b15cb3dSCy Schubert
1832b15cb3dSCy Schubertrun_ag=		cd $(srcdir) &&	env PATH="$(abs_builddir):$(PATH)" AUTOGEN_DNE_DATE=-D	\
1842b15cb3dSCy Schubert		autogen -L ../sntp/include -L ../sntp/ag-tpl --writable
1852b15cb3dSCy Schubertstd_def_list =							\
1862b15cb3dSCy Schubert	$(top_srcdir)/sntp/include/debug-opt.def		\
1872b15cb3dSCy Schubert	$(top_srcdir)/sntp/include/autogen-version.def		\
1882b15cb3dSCy Schubert	$(top_srcdir)/sntp/include/copyright.def		\
1892b15cb3dSCy Schubert	$(top_srcdir)/sntp/include/homerc.def			\
1902b15cb3dSCy Schubert	$(top_srcdir)/sntp/include/ntp.lic			\
1912b15cb3dSCy Schubert	$(top_srcdir)/sntp/include/version.def			\
1922b15cb3dSCy Schubert	$(NULL)
1932b15cb3dSCy Schubert
1942b15cb3dSCy Schubertcheck-local: $(MAKE_CHECK_Y2K) $(CHECK_SAVECONFIG)
1952b15cb3dSCy Schubert	test -z "$(MAKE_CHECK_Y2K)" || ./$(MAKE_CHECK_Y2K)
1962b15cb3dSCy Schubert
1972b15cb3dSCy Schubertntpd_SOURCES =			\
1982b15cb3dSCy Schubert	ntp_config.c		\
1992b15cb3dSCy Schubert	ntp_keyword.h		\
2002b15cb3dSCy Schubert	ntp_io.c		\
2012b15cb3dSCy Schubert	ntp_parser.y		\
2022b15cb3dSCy Schubert	ntp_scanner.c		\
2032b15cb3dSCy Schubert	ntp_scanner.h		\
2042b15cb3dSCy Schubert	ntpd.c			\
2052b15cb3dSCy Schubert	ntpd-opts.c		\
2062b15cb3dSCy Schubert	ntpd-opts.h		\
2072b15cb3dSCy Schubert	$(NULL)
2082b15cb3dSCy Schubert
2092b15cb3dSCy Schubertntpdsim_SOURCES =		\
2102b15cb3dSCy Schubert	$(ntpd_SOURCES)		\
2112b15cb3dSCy Schubert	ntp_prio_q.c		\
2122b15cb3dSCy Schubert	ntpsim.c		\
2132b15cb3dSCy Schubert	$(NULL)
2142b15cb3dSCy Schubert
2152b15cb3dSCy Schubert# libntpd_a_SOURCES do not use #ifdef SIM
2162b15cb3dSCy Schubert
2172b15cb3dSCy Schubertlibntpd_a_SOURCES =		\
2182b15cb3dSCy Schubert	cmd_args.c		\
2192b15cb3dSCy Schubert	jupiter.h		\
2202b15cb3dSCy Schubert	ntp_control.c		\
2212b15cb3dSCy Schubert	ntp_crypto.c		\
2222b15cb3dSCy Schubert	ntp_filegen.c		\
2232b15cb3dSCy Schubert	ntp_leapsec.c		\
2242b15cb3dSCy Schubert	ntp_loopfilter.c	\
2252b15cb3dSCy Schubert	ntp_monitor.c		\
2262b15cb3dSCy Schubert	ntp_peer.c		\
2272b15cb3dSCy Schubert	ntp_proto.c		\
2282b15cb3dSCy Schubert	ntp_refclock.c		\
2292b15cb3dSCy Schubert	ntp_request.c		\
2302b15cb3dSCy Schubert	ntp_restrict.c		\
2312b15cb3dSCy Schubert	ntp_signd.c		\
2322b15cb3dSCy Schubert	ntp_timer.c		\
2332b15cb3dSCy Schubert	ntp_util.c		\
234ea906c41SOllivier Robert	ppsapi_timepps.h	\
235*276da39aSCy Schubert	rc_cmdlength.c		\
2362b15cb3dSCy Schubert	refclock_acts.c		\
2372b15cb3dSCy Schubert	refclock_arbiter.c	\
2382b15cb3dSCy Schubert	refclock_arc.c		\
2392b15cb3dSCy Schubert	refclock_as2201.c	\
2402b15cb3dSCy Schubert	refclock_atom.c		\
2412b15cb3dSCy Schubert	refclock_bancomm.c	\
2422b15cb3dSCy Schubert	refclock_chronolog.c	\
2432b15cb3dSCy Schubert	refclock_chu.c		\
2442b15cb3dSCy Schubert	refclock_conf.c		\
2452b15cb3dSCy Schubert	refclock_datum.c	\
2462b15cb3dSCy Schubert	refclock_dumbclock.c	\
2472b15cb3dSCy Schubert	refclock_fg.c		\
2482b15cb3dSCy Schubert	refclock_gpsdjson.c	\
2492b15cb3dSCy Schubert	refclock_gpsvme.c	\
2502b15cb3dSCy Schubert	refclock_heath.c	\
2512b15cb3dSCy Schubert	refclock_hopfser.c	\
2522b15cb3dSCy Schubert	refclock_hopfpci.c	\
2532b15cb3dSCy Schubert	refclock_hpgps.c	\
2542b15cb3dSCy Schubert	refclock_irig.c		\
2552b15cb3dSCy Schubert	refclock_jjy.c		\
2562b15cb3dSCy Schubert	refclock_jupiter.c	\
2572b15cb3dSCy Schubert	refclock_leitch.c	\
2582b15cb3dSCy Schubert	refclock_local.c	\
2592b15cb3dSCy Schubert	refclock_mx4200.c	\
2602b15cb3dSCy Schubert	refclock_neoclock4x.c	\
2612b15cb3dSCy Schubert	refclock_nmea.c		\
2622b15cb3dSCy Schubert	refclock_oncore.c	\
2632b15cb3dSCy Schubert	refclock_palisade.c	\
2642b15cb3dSCy Schubert	refclock_palisade.h	\
2652b15cb3dSCy Schubert	refclock_parse.c	\
2662b15cb3dSCy Schubert	refclock_pcf.c		\
2672b15cb3dSCy Schubert	refclock_pst.c		\
2682b15cb3dSCy Schubert	refclock_ripencc.c	\
2692b15cb3dSCy Schubert	refclock_shm.c		\
2702b15cb3dSCy Schubert	refclock_tpro.c		\
2712b15cb3dSCy Schubert	refclock_true.c		\
2722b15cb3dSCy Schubert	refclock_tt560.c	\
2732b15cb3dSCy Schubert	refclock_ulink.c	\
2742b15cb3dSCy Schubert	refclock_wwv.c		\
2752b15cb3dSCy Schubert	refclock_wwvb.c		\
2762b15cb3dSCy Schubert	refclock_zyfer.c	\
2772b15cb3dSCy Schubert	refclock_tsyncpci.c	\
2782b15cb3dSCy Schubert	$(NULL)
2792b15cb3dSCy Schubert
2802b15cb3dSCy Schubertk-g-u-submake: keyword-gen
2812b15cb3dSCy Schubert	./keyword-gen $(srcdir)/ntp_parser.h > k-g.out
2822b15cb3dSCy Schubert	@grep -v diff_ignore_line < k-g.out > cmp1
2832b15cb3dSCy Schubert	@grep -v diff_ignore_line < $(srcdir)/ntp_keyword.h > cmp2
2842b15cb3dSCy Schubert	@cmp cmp1 cmp2 > /dev/null || \
2852b15cb3dSCy Schubert		{ mv -f k-g.out $(srcdir)/ntp_keyword.h && \
2862b15cb3dSCy Schubert		  echo 'Generated changed ntp_keyword.h.' ;}
2872b15cb3dSCy Schubert	@[ ! -f k-g.out ] || \
2882b15cb3dSCy Schubert		{ rm k-g.out && echo 'ntp_keyword.h is up to date.' ;}
2892b15cb3dSCy Schubert	@rm cmp1 cmp2
2902b15cb3dSCy Schubert	@echo 'keyword-gen and ntp_keyword.h are up to date.' > $@
2912b15cb3dSCy Schubert
2922b15cb3dSCy Schubert$(srcdir)/keyword-gen-utd: $(srcdir)/keyword-gen.c $(srcdir)/ntp_parser.h
2932b15cb3dSCy Schubert	$(MAKE) $(AM_MAKEFLAGS) k-g-u-submake	# avoid explicit dependency
2942b15cb3dSCy Schubert	grep diff_ignore_line $(srcdir)/ntp_keyword.h > k-g-u
2952b15cb3dSCy Schubert	mv -f k-g-u $@
2962b15cb3dSCy Schubert
2972b15cb3dSCy Schubert$(srcdir)/ntp_keyword.h: $(srcdir)/keyword-gen-utd
2982b15cb3dSCy Schubert	@: do-nothing action to avoid default SCCS get
2992b15cb3dSCy Schubert	@: .h updated if needed by k-g-u-submake rule
300ea906c41SOllivier Robert
301ea906c41SOllivier Robert$(srcdir)/ntpd-opts.h: $(srcdir)/ntpd-opts.c
3022b15cb3dSCy Schubert	@: do-nothing action to avoid default SCCS get, .h built with .c
3032b15cb3dSCy Schubert
304ea906c41SOllivier Robert$(srcdir)/ntpd-opts.c: $(srcdir)/ntpd-opts.def $(srcdir)/ntpdbase-opts.def $(std_def_list)
305ea906c41SOllivier Robert	$(run_ag) ntpd-opts.def
306ea906c41SOllivier Robert
3072b15cb3dSCy Schubert###
308ea906c41SOllivier Robert
3092b15cb3dSCy Schubert$(srcdir)/ntpd.1ntpdman: $(srcdir)/ntpd-opts.def $(srcdir)/ntpdbase-opts.def $(std_def_list)
3102b15cb3dSCy Schubert	$(run_ag) -DMAN_SECTION=1ntpdman -Tagman-cmd.tpl ntpd-opts.def
311ea906c41SOllivier Robert
3122b15cb3dSCy Schubert$(srcdir)/ntpd.man.in: $(srcdir)/ntpd.1ntpdman $(top_srcdir)/sntp/scripts/mansec2subst.sed
3132b15cb3dSCy Schubert	sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpd.1ntpdman > $(srcdir)/ntpd.man.in+
3142b15cb3dSCy Schubert	mv $(srcdir)/ntpd.man.in+ $(srcdir)/ntpd.man.in
315ea906c41SOllivier Robert
3162b15cb3dSCy Schubert###
317ea906c41SOllivier Robert
3182b15cb3dSCy Schubert$(srcdir)/ntpd.1ntpdmdoc: $(srcdir)/ntpd-opts.def $(srcdir)/ntpdbase-opts.def $(std_def_list)
3192b15cb3dSCy Schubert	$(run_ag) -DMAN_SECTION=1ntpdmdoc -Tagmdoc-cmd.tpl ntpd-opts.def
3202b15cb3dSCy Schubert
3212b15cb3dSCy Schubert$(srcdir)/ntpd.mdoc.in: $(srcdir)/ntpd.1ntpdmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
3222b15cb3dSCy Schubert	sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpd.1ntpdmdoc > $(srcdir)/ntpd.mdoc.in+
3232b15cb3dSCy Schubert	mv $(srcdir)/ntpd.mdoc.in+ $(srcdir)/ntpd.mdoc.in
3242b15cb3dSCy Schubert
3252b15cb3dSCy Schubert###
3262b15cb3dSCy Schubert
3272b15cb3dSCy Schubertntpd.$(NTPD_MS): $(srcdir)/ntpd.$(MANTAGFMT).in $(top_builddir)/config.status
3282b15cb3dSCy Schubert	$(top_builddir)/config.status --file=ntpd.$(NTPD_MS)+:$(srcdir)/ntpd.$(MANTAGFMT).in
3292b15cb3dSCy Schubert	mv ntpd.$(NTPD_MS)+ ntpd.$(NTPD_MS)
3302b15cb3dSCy Schubert
3312b15cb3dSCy Schubert###
3322b15cb3dSCy Schubert
3332b15cb3dSCy Schubert$(srcdir)/invoke-ntp.conf.menu: $(srcdir)/invoke-ntp.conf.texi
3342b15cb3dSCy Schubert	@: do-nothing action to avoid default SCCS get, .menu built with .texi
3352b15cb3dSCy Schubert
3362b15cb3dSCy Schubert$(srcdir)/invoke-ntp.conf.texi: $(srcdir)/ntp.conf.def $(std_def_list)
3372b15cb3dSCy Schubert	$(run_ag) -Tagtexi-file.tpl -DLEVEL=section ntp.conf.def
3382b15cb3dSCy Schubert
3392b15cb3dSCy Schubert$(srcdir)/invoke-ntp.keys.menu: $(srcdir)/invoke-ntp.keys.texi
3402b15cb3dSCy Schubert	@: do-nothing action to avoid default SCCS get, .menu built with .texi
3412b15cb3dSCy Schubert
3422b15cb3dSCy Schubert$(srcdir)/invoke-ntp.keys.texi: $(srcdir)/ntp.keys.def $(std_def_list)
3432b15cb3dSCy Schubert	$(run_ag) -Tagtexi-file.tpl -DLEVEL=section ntp.keys.def
3442b15cb3dSCy Schubert
3452b15cb3dSCy Schubert$(srcdir)/ntp.conf.html: $(srcdir)/ntp.conf.texi $(top_srcdir)/sntp/include/version.texi
3462b15cb3dSCy Schubert	cd $(srcdir) && ( makeinfo --force --html --no-split -o ntp.conf.html ntp.conf.texi || true )
3472b15cb3dSCy Schubert
3482b15cb3dSCy Schubert$(srcdir)/ntp.keys.html: $(srcdir)/ntp.keys.texi $(top_srcdir)/sntp/include/version.texi
3492b15cb3dSCy Schubert	cd $(srcdir) && ( makeinfo --force --html --no-split -o ntp.keys.html ntp.keys.texi || true )
3502b15cb3dSCy Schubert
3512b15cb3dSCy Schubert$(srcdir)/ntpd.html: $(srcdir)/ntpd.texi $(top_srcdir)/sntp/include/version.texi
3522b15cb3dSCy Schubert	cd $(srcdir) && ( makeinfo --force --html --no-split -o ntpd.html ntpd.texi || true )
3532b15cb3dSCy Schubert
3542b15cb3dSCy Schubert###
3552b15cb3dSCy Schubert
3562b15cb3dSCy Schubert$(srcdir)/ntp.conf.5man: $(srcdir)/ntp.conf.def $(std_def_list)
3572b15cb3dSCy Schubert	$(run_ag) -DMAN_SECTION=5man -Tagman-cmd.tpl ntp.conf.def
3582b15cb3dSCy Schubert
3592b15cb3dSCy Schubert$(srcdir)/ntp.conf.man.in: $(srcdir)/ntp.conf.5man $(top_srcdir)/sntp/scripts/mansec2subst.sed
3602b15cb3dSCy Schubert	sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntp.conf.5man > $(srcdir)/ntp.conf.man.in+
3612b15cb3dSCy Schubert	mv $(srcdir)/ntp.conf.man.in+ $(srcdir)/ntp.conf.man.in
3622b15cb3dSCy Schubert
3632b15cb3dSCy Schubert###
3642b15cb3dSCy Schubert
3652b15cb3dSCy Schubert$(srcdir)/ntp.conf.5mdoc: $(srcdir)/ntp.conf.def $(std_def_list)
3662b15cb3dSCy Schubert	$(run_ag) -DMAN_SECTION=5mdoc -Tagmdoc-cmd.tpl ntp.conf.def
3672b15cb3dSCy Schubert
3682b15cb3dSCy Schubert$(srcdir)/ntp.conf.mdoc.in: $(srcdir)/ntp.conf.5mdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
3692b15cb3dSCy Schubert	sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntp.conf.5mdoc > $(srcdir)/ntp.conf.mdoc.in+
3702b15cb3dSCy Schubert	mv $(srcdir)/ntp.conf.mdoc.in+ $(srcdir)/ntp.conf.mdoc.in
3712b15cb3dSCy Schubert
3722b15cb3dSCy Schubert###
3732b15cb3dSCy Schubert
3742b15cb3dSCy Schubertntp.conf.5: $(srcdir)/ntp.conf.$(MANTAGFMT).in $(top_builddir)/config.status
3752b15cb3dSCy Schubert	$(top_builddir)/config.status --file=ntp.conf.5+:$(srcdir)/ntp.conf.$(MANTAGFMT).in
3762b15cb3dSCy Schubert	mv ntp.conf.5+ ntp.conf.5
3772b15cb3dSCy Schubert
3782b15cb3dSCy Schubert###
3792b15cb3dSCy Schubert
3802b15cb3dSCy Schubert$(srcdir)/ntp.keys.5man: $(srcdir)/ntp.keys.def $(std_def_list)
3812b15cb3dSCy Schubert	$(run_ag) -DMAN_SECTION=5man -Tagman-file.tpl ntp.keys.def
3822b15cb3dSCy Schubert
3832b15cb3dSCy Schubert$(srcdir)/ntp.keys.man.in: $(srcdir)/ntp.keys.5man $(top_srcdir)/sntp/scripts/mansec2subst.sed
3842b15cb3dSCy Schubert	sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntp.keys.5man > $(srcdir)/ntp.keys.man.in+
3852b15cb3dSCy Schubert	mv $(srcdir)/ntp.keys.man.in+ $(srcdir)/ntp.keys.man.in
3862b15cb3dSCy Schubert
3872b15cb3dSCy Schubert###
3882b15cb3dSCy Schubert
3892b15cb3dSCy Schubert$(srcdir)/ntp.keys.5mdoc: $(srcdir)/ntp.keys.def $(std_def_list)
3902b15cb3dSCy Schubert	$(run_ag) -DMAN_SECTION=5mdoc -Tagmdoc-file.tpl ntp.keys.def
3912b15cb3dSCy Schubert
3922b15cb3dSCy Schubert$(srcdir)/ntp.keys.mdoc.in: $(srcdir)/ntp.keys.5mdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
3932b15cb3dSCy Schubert	sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntp.keys.5mdoc > $(srcdir)/ntp.keys.mdoc.in+
3942b15cb3dSCy Schubert	mv $(srcdir)/ntp.keys.mdoc.in+ $(srcdir)/ntp.keys.mdoc.in
3952b15cb3dSCy Schubert
3962b15cb3dSCy Schubert###
3972b15cb3dSCy Schubert
3982b15cb3dSCy Schubertntp.keys.5: $(srcdir)/ntp.keys.$(MANTAGFMT).in $(top_builddir)/config.status
3992b15cb3dSCy Schubert	$(top_builddir)/config.status --file=ntp.keys.5+:$(srcdir)/ntp.keys.$(MANTAGFMT).in
4002b15cb3dSCy Schubert	mv ntp.keys.5+ ntp.keys.5
4012b15cb3dSCy Schubert
4022b15cb3dSCy Schubert###
4032b15cb3dSCy Schubert
4042b15cb3dSCy Schubert$(srcdir)/invoke-ntpd.menu: $(srcdir)/invoke-ntpd.texi
4052b15cb3dSCy Schubert	@: do-nothing action to avoid default SCCS get, .menu built with .texi
4062b15cb3dSCy Schubert
4072b15cb3dSCy Schubert$(srcdir)/invoke-ntpd.texi: $(srcdir)/ntpd-opts.def $(srcdir)/ntpdbase-opts.def $(std_def_list)
4082b15cb3dSCy Schubert	$(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntpd-opts.def
4092b15cb3dSCy Schubert	$(top_srcdir)/scripts/build/check--help $@
410c0b746e5SOllivier Robert
411c0b746e5SOllivier Robert$(PROGRAMS): $(LDADD)
412c0b746e5SOllivier Robert
4132b15cb3dSCy Schubertcompsave.conf: ntpd complete.conf
4142b15cb3dSCy Schubert	./ntpd --configfile complete.conf --saveconfigquit $@
4152b15cb3dSCy Schubert
4162b15cb3dSCy Schubertcheck-saveconfig: complete.conf compsave.conf
4172b15cb3dSCy Schubert	-diff -u complete.conf compsave.conf
4182b15cb3dSCy Schubert	cmp complete.conf compsave.conf && echo stamp > $@
419ea906c41SOllivier Robert
420ea906c41SOllivier Robert../libntp/libntpsim.a:
4212b15cb3dSCy Schubert	cd ../libntp && $(MAKE) $(AM_MAKEFLAGS) libntpsim.a
422c0b746e5SOllivier Robert
423c0b746e5SOllivier Robert../libparse/libparse.a:
4242b15cb3dSCy Schubert	cd ../libparse && $(MAKE) $(AM_MAKEFLAGS) check-libparse
425c0b746e5SOllivier Robert
4262b15cb3dSCy Schubert$(top_srcdir)/sntp/scm-rev:
4272b15cb3dSCy Schubert	cd ../sntp && $(MAKE) $(AM_MAKEFLAGS) check-scm-rev
428ea906c41SOllivier Robert
4292b15cb3dSCy Schubertversion.c: $(ntpd_OBJECTS) ../libntp/libntp.a @LIBPARSE@ Makefile $(top_srcdir)/sntp/scm-rev
4302b15cb3dSCy Schubert	env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/build/mkver ntpd
431ea906c41SOllivier Robert
4322b15cb3dSCy Schubertversion.o: version.c
4332b15cb3dSCy Schubert	env CCACHE_DISABLE=1 $(COMPILE) -c version.c -o version.o
4342b15cb3dSCy Schubert
4352b15cb3dSCy Schubertinclude $(top_srcdir)/bincheck.mf
4362b15cb3dSCy Schubertinclude $(top_srcdir)/check-libopts.mf
4372b15cb3dSCy Schubertinclude $(top_srcdir)/sntp/check-libntp.mf
4382b15cb3dSCy Schubertinclude $(top_srcdir)/depsver.mf
4392b15cb3dSCy Schubertinclude $(top_srcdir)/includes.mf
440