xref: /freebsd/contrib/ntp/scripts/calc_tickadj/Makefile.am (revision 1f4bcc459a76b7aa664f3fd557684cd0ba6da352)
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
63BUILT_SOURCES = $(noinst_DATA)
64
65calc_tickadj: $(srcdir)/calc_tickadj-opts
66
67$(srcdir)/calc_tickadj-opts: $(srcdir)/calc_tickadj-opts.def
68	$(run_ag) calc_tickadj-opts.def
69
70### Nroff
71
72$(srcdir)/calc_tickadj.1calc_tickadjman: $(srcdir)/calc_tickadj-opts.def $(std_def_list)
73	$(run_ag) -DMAN_SECTION=1calc_tickadjman -Tagman-cmd.tpl calc_tickadj-opts.def
74
75$(srcdir)/calc_tickadj.man.in: $(srcdir)/calc_tickadj.1calc_tickadjman $(top_srcdir)/sntp/scripts/mansec2subst.sed
76	sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/calc_tickadj.1calc_tickadjman > $(srcdir)/calc_tickadj.man.in+
77	mv $(srcdir)/calc_tickadj.man.in+ $(srcdir)/calc_tickadj.man.in
78
79### Mdoc
80
81$(srcdir)/calc_tickadj.1calc_tickadjmdoc: $(srcdir)/calc_tickadj-opts.def $(std_def_list)
82	$(run_ag) -DMAN_SECTION=1calc_tickadjmdoc -Tagmdoc-cmd.tpl calc_tickadj-opts.def
83
84$(srcdir)/calc_tickadj.mdoc.in: $(srcdir)/calc_tickadj.1calc_tickadjmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
85	sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/calc_tickadj.1calc_tickadjmdoc > $(srcdir)/calc_tickadj.mdoc.in+
86	mv $(srcdir)/calc_tickadj.mdoc.in+ $(srcdir)/calc_tickadj.mdoc.in
87
88### Manpage
89
90calc_tickadj.$(CALC_TICKADJ_MS): $(srcdir)/calc_tickadj.$(MANTAGFMT).in $(top_builddir)/config.status
91	$(top_builddir)/config.status --file=calc_tickadj.$(CALC_TICKADJ_MS)+:$(srcdir)/calc_tickadj.$(MANTAGFMT).in
92	mv calc_tickadj.$(CALC_TICKADJ_MS)+ calc_tickadj.$(CALC_TICKADJ_MS)
93
94### Texinfo
95
96$(srcdir)/invoke-calc_tickadj.menu: $(srcdir)/invoke-calc_tickadj.texi
97	@: do-nothing action to avoid default SCCS get, .menu built with .texi
98
99$(srcdir)/invoke-calc_tickadj.texi: $(srcdir)/calc_tickadj-opts $(srcdir)/calc_tickadj-opts.def $(std_def_list)
100	$(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section calc_tickadj-opts.def
101	$(top_srcdir)/scripts/build/check--help $@
102
103### HTML
104
105$(srcdir)/calc_tickadj.html: $(srcdir)/invoke-calc_tickadj.menu $(srcdir)/invoke-calc_tickadj.texi $(srcdir)/calc_tickadj.texi
106	cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o calc_tickadj.html calc_tickadj.texi || true )
107