xref: /freebsd/contrib/ntp/scripts/calc_tickadj/Makefile.am (revision 39ee7a7a6bdd1557b1c3532abf60d139798ac88b)
1NULL=
2run_ag=		cd $(srcdir) &&	env PATH="$(abs_builddir):$(PATH)" AUTOGEN_DNE_DATE=-D	\
3		autogen -L ../../sntp/include -L ../../sntp/ag-tpl \
4		--writable
5std_def_list =							\
6	$(top_srcdir)/sntp/include/debug-opt.def		\
7	$(top_srcdir)/sntp/include/autogen-version.def 		\
8	$(top_srcdir)/sntp/include/copyright.def 		\
9	$(top_srcdir)/sntp/include/homerc.def 			\
10	$(top_srcdir)/sntp/include/ntp.lic 			\
11	$(top_srcdir)/sntp/include/version.def			\
12	$(NULL)
13
14
15bin_SCRIPTS=	$(CALC_TICKADJ_DB)
16libexec_SCRIPTS=	$(CALC_TICKADJ_DL)
17sbin_SCRIPTS=	$(CALC_TICKADJ_DS)
18EXTRA_SCRIPTS=	calc_tickadj
19
20man1_MANS=
21man8_MANS=
22manpage_HACK=
23if WANT_CALC_TICKADJ_MS
24man_MANS=	calc_tickadj.$(CALC_TICKADJ_MS)
25else
26manpage_HACK+=	calc_tickadj.
27# Note that if we don't WANT_CALC_TICKADJ then CALC_TICKADJ_MS will
28# be empty.  But we still need the .texi and other files to be built, as
29# they are general prerequisites.
30# The manpage_HACK is listed in noinst_DATA so that takes care of these.
31endif
32
33DISTCLEANFILES =	config.log $(man_MANS) calc_tickadj.
34
35EXTRA_DIST =				\
36	calc_tickadj.in 		\
37	calc_tickadj.1calc_tickadjman	\
38	calc_tickadj.1calc_tickadjmdoc	\
39	calc_tickadj.man.in		\
40	calc_tickadj.mdoc.in		\
41	calc_tickadj.texi		\
42	calc_tickadj.html		\
43	calc_tickadj-opts.def		\
44	calc_tickadj-opts		\
45	invoke-calc_tickadj.texi	\
46	invoke-calc_tickadj.menu	\
47	$(NULL)
48
49noinst_DATA = 				\
50	calc_tickadj.1calc_tickadjman	\
51	calc_tickadj.1calc_tickadjmdoc	\
52	calc_tickadj.man.in		\
53	calc_tickadj.mdoc.in		\
54	calc_tickadj.texi		\
55	calc_tickadj.html		\
56	calc_tickadj-opts.def		\
57	calc_tickadj-opts		\
58	invoke-calc_tickadj.texi	\
59	invoke-calc_tickadj.menu	\
60	$(manpage_HACK)			\
61	$(NULL)
62
63calc_tickadj: $(srcdir)/calc_tickadj-opts
64
65$(srcdir)/calc_tickadj-opts: $(srcdir)/calc_tickadj-opts.def
66	$(run_ag) calc_tickadj-opts.def
67
68### Nroff
69
70$(srcdir)/calc_tickadj.1calc_tickadjman: $(srcdir)/calc_tickadj-opts.def $(std_def_list)
71	$(run_ag) -DMAN_SECTION=1calc_tickadjman -Tagman-cmd.tpl calc_tickadj-opts.def
72
73$(srcdir)/calc_tickadj.man.in: $(srcdir)/calc_tickadj.1calc_tickadjman $(top_srcdir)/sntp/scripts/mansec2subst.sed
74	sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/calc_tickadj.1calc_tickadjman > $(srcdir)/calc_tickadj.man.in+
75	mv $(srcdir)/calc_tickadj.man.in+ $(srcdir)/calc_tickadj.man.in
76
77### Mdoc
78
79$(srcdir)/calc_tickadj.1calc_tickadjmdoc: $(srcdir)/calc_tickadj-opts.def $(std_def_list)
80	$(run_ag) -DMAN_SECTION=1calc_tickadjmdoc -Tagmdoc-cmd.tpl calc_tickadj-opts.def
81
82$(srcdir)/calc_tickadj.mdoc.in: $(srcdir)/calc_tickadj.1calc_tickadjmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
83	sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/calc_tickadj.1calc_tickadjmdoc > $(srcdir)/calc_tickadj.mdoc.in+
84	mv $(srcdir)/calc_tickadj.mdoc.in+ $(srcdir)/calc_tickadj.mdoc.in
85
86### Manpage
87
88calc_tickadj.$(CALC_TICKADJ_MS): $(srcdir)/calc_tickadj.$(MANTAGFMT).in $(top_builddir)/config.status
89	$(top_builddir)/config.status --file=calc_tickadj.$(CALC_TICKADJ_MS)+:$(srcdir)/calc_tickadj.$(MANTAGFMT).in
90	mv calc_tickadj.$(CALC_TICKADJ_MS)+ calc_tickadj.$(CALC_TICKADJ_MS)
91
92### Texinfo
93
94$(srcdir)/invoke-calc_tickadj.menu: $(srcdir)/invoke-calc_tickadj.texi
95	@: do-nothing action to avoid default SCCS get, .menu built with .texi
96
97$(srcdir)/invoke-calc_tickadj.texi: $(srcdir)/calc_tickadj-opts $(srcdir)/calc_tickadj-opts.def $(std_def_list)
98	$(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section calc_tickadj-opts.def
99	$(top_srcdir)/scripts/build/check--help $@
100
101### HTML
102
103$(srcdir)/calc_tickadj.html: $(srcdir)/invoke-calc_tickadj.menu $(srcdir)/invoke-calc_tickadj.texi $(srcdir)/calc_tickadj.texi
104	cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o calc_tickadj.html calc_tickadj.texi || true )
105