xref: /netbsd-src/external/bsd/ntp/dist/scripts/ntpsweep/Makefile.am (revision 230b95665bbd3a9d1a53658a36b1053f8382a519)
1NULL=
2run_ag=		cd $(srcdir) &&	env PATH="$(abs_builddir):$(PATH)" PERL5LIB="$(abs_top_srcdir)/scripts/lib"	\
3		autogen -L ../../sntp/include -L ../../sntp/ag-tpl \
4		--writable
5
6noinst_SCRIPTS = ntpsweep
7
8EXTRA_DIST =			\
9	ntpsweep.in		\
10	ntpsweep.1ntpsweepman	\
11	ntpsweep.1ntpsweepmdoc	\
12	ntpsweep.man.in		\
13	ntpsweep.mdoc.in	\
14	ntpsweep.texi		\
15	ntpsweep.html		\
16	ntpsweep-opts.def	\
17	ntpsweep-opts		\
18	invoke-ntpsweep.texi	\
19	invoke-ntpsweep.menu	\
20	$(NULL)
21
22html_DATA = ntpsweep.html
23
24CLEANFILES = ntpsweep.1
25DISTCLEANFILES = config.log
26
27noinst_DATA =			\
28	ntpsweep.1		\
29	ntpsweep.1ntpsweepman	\
30	ntpsweep.1ntpsweepmdoc	\
31	ntpsweep.man.in		\
32	ntpsweep.mdoc.in	\
33	ntpsweep.texi		\
34	ntpsweep.html		\
35	ntpsweep-opts.def	\
36	ntpsweep-opts		\
37	invoke-ntpsweep.texi	\
38	invoke-ntpsweep.menu	\
39	$(NULL)
40
41ntpsweep: $(srcdir)/ntpsweep-opts
42
43$(srcdir)/ntpsweep-opts: ntpsweep-opts.def ../../sntp/ag-tpl/perlopt.tpl
44	$(run_ag) ntpsweep-opts.def
45
46### Nroff
47
48$(srcdir)/ntpsweep.1ntpsweepman: ntpsweep-opts.def $(std_def_list)
49	$(run_ag) -DMAN_SECTION=1ntpsweepman -Tagman-cmd.tpl ntpsweep-opts.def
50
51$(srcdir)/ntpsweep.man.in: ntpsweep.1ntpsweepman $(top_srcdir)/sntp/scripts/mansec2subst.sed
52	sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpsweep.1ntpsweepman > $(srcdir)/ntpsweep.man.in+
53	mv $(srcdir)/ntpsweep.man.in+ $(srcdir)/ntpsweep.man.in
54
55### Mdoc
56
57$(srcdir)/ntpsweep.1ntpsweepmdoc: ntpsweep-opts.def $(std_def_list)
58	$(run_ag) -DMAN_SECTION=1ntpsweepmdoc -Tagmdoc-cmd.tpl ntpsweep-opts.def
59
60$(srcdir)/ntpsweep.mdoc.in: ntpsweep.1ntpsweepmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
61	sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpsweep.1ntpsweepmdoc > $(srcdir)/ntpsweep.mdoc.in+
62	mv $(srcdir)/ntpsweep.mdoc.in+ $(srcdir)/ntpsweep.mdoc.in
63
64### Manpage
65
66ntpsweep.1: ntpsweep.$(MANTAGFMT).in $(top_builddir)/config.status
67	$(top_builddir)/config.status --file=ntpsweep.1+:$(srcdir)/ntpsweep.$(MANTAGFMT).in
68	mv ntpsweep.1+ ntpsweep.1
69
70### Texinfo
71
72$(srcdir)/invoke-ntpsweep.menu: invoke-ntpsweep.texi
73	@: do-nothing action to avoid default SCCS get, .menu built with .texi
74
75$(srcdir)/invoke-ntpsweep.texi: ntpsweep-opts ntpsweep-opts.def $(std_def_list)
76	$(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntpsweep-opts.def
77	$(top_srcdir)/scripts/build/check--help $@
78
79### HTML
80
81$(srcdir)/ntpsweep.html: invoke-ntpsweep.menu invoke-ntpsweep.texi ntpsweep.texi $(top_srcdir)/sntp/include/version.texi
82	cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o ntpsweep.html ntpsweep.texi || true )
83