xref: /freebsd/contrib/kyua/doc/Makefile.am.inc (revision 18054d0220cfc8df9c9568c437bd6fbb59d53c3c)
1# Copyright 2011 The Kyua Authors.
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met:
7#
8# * Redistributions of source code must retain the above copyright
9#   notice, this list of conditions and the following disclaimer.
10# * Redistributions in binary form must reproduce the above copyright
11#   notice, this list of conditions and the following disclaimer in the
12#   documentation and/or other materials provided with the distribution.
13# * Neither the name of Google Inc. nor the names of its contributors
14#   may be used to endorse or promote products derived from this software
15#   without specific prior written permission.
16#
17# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
29BUILD_MANPAGE = \
30	$(MKDIR_P) doc; \
31	$(SHELL) $(srcdir)/doc/manbuild.sh \
32	    -v "CONFDIR=$(kyua_confdir)" \
33	    -v "DOCDIR=$(docdir)" \
34	    -v "EGDIR=$(examplesdir)" \
35	    -v "MISCDIR=$(miscdir)" \
36	    -v "PACKAGE=$(PACKAGE_TARNAME)" \
37	    -v "STOREDIR=$(storedir)" \
38	    -v "TESTSDIR=$(testsdir)" \
39	    -v "VERSION=$(PACKAGE_VERSION)" \
40	    "$(srcdir)/doc/$${name}.in" "doc/$${name}"
41
42DIST_MAN_DEPS = doc/manbuild.sh \
43                doc/build-root.mdoc \
44                doc/results-file-flag-read.mdoc \
45                doc/results-file-flag-write.mdoc \
46                doc/results-files.mdoc \
47                doc/results-files-report-example.mdoc \
48                doc/test-filters.mdoc \
49                doc/test-isolation.mdoc
50MAN_DEPS = $(DIST_MAN_DEPS) Makefile
51EXTRA_DIST += $(DIST_MAN_DEPS)
52
53man_MANS = doc/kyua-about.1
54CLEANFILES += doc/kyua-about.1
55EXTRA_DIST += doc/kyua-about.1.in
56doc/kyua-about.1: $(srcdir)/doc/kyua-about.1.in $(MAN_DEPS)
57	$(AM_V_GEN)name=kyua-about.1; $(BUILD_MANPAGE)
58
59man_MANS += doc/kyua-config.1
60CLEANFILES += doc/kyua-config.1
61EXTRA_DIST += doc/kyua-config.1.in
62doc/kyua-config.1: $(srcdir)/doc/kyua-config.1.in $(MAN_DEPS)
63	$(AM_V_GEN)name=kyua-config.1; $(BUILD_MANPAGE)
64
65man_MANS += doc/kyua-db-exec.1
66CLEANFILES += doc/kyua-db-exec.1
67EXTRA_DIST += doc/kyua-db-exec.1.in
68doc/kyua-db-exec.1: $(srcdir)/doc/kyua-db-exec.1.in $(MAN_DEPS)
69	$(AM_V_GEN)name=kyua-db-exec.1; $(BUILD_MANPAGE)
70
71man_MANS += doc/kyua-db-migrate.1
72CLEANFILES += doc/kyua-db-migrate.1
73EXTRA_DIST += doc/kyua-db-migrate.1.in
74doc/kyua-db-migrate.1: $(srcdir)/doc/kyua-db-migrate.1.in $(MAN_DEPS)
75	$(AM_V_GEN)name=kyua-db-migrate.1; $(BUILD_MANPAGE)
76
77man_MANS += doc/kyua-debug.1
78CLEANFILES += doc/kyua-debug.1
79EXTRA_DIST += doc/kyua-debug.1.in
80doc/kyua-debug.1: $(srcdir)/doc/kyua-debug.1.in $(MAN_DEPS)
81	$(AM_V_GEN)name=kyua-debug.1; $(BUILD_MANPAGE)
82
83man_MANS += doc/kyua-help.1
84CLEANFILES += doc/kyua-help.1
85EXTRA_DIST += doc/kyua-help.1.in
86doc/kyua-help.1: $(srcdir)/doc/kyua-help.1.in $(MAN_DEPS)
87	$(AM_V_GEN)name=kyua-help.1; $(BUILD_MANPAGE)
88
89man_MANS += doc/kyua-list.1
90CLEANFILES += doc/kyua-list.1
91EXTRA_DIST += doc/kyua-list.1.in
92doc/kyua-list.1: $(srcdir)/doc/kyua-list.1.in $(MAN_DEPS)
93	$(AM_V_GEN)name=kyua-list.1; $(BUILD_MANPAGE)
94
95man_MANS += doc/kyua-report-html.1
96CLEANFILES += doc/kyua-report-html.1
97EXTRA_DIST += doc/kyua-report-html.1.in
98doc/kyua-report-html.1: $(srcdir)/doc/kyua-report-html.1.in $(MAN_DEPS)
99	$(AM_V_GEN)name=kyua-report-html.1; $(BUILD_MANPAGE)
100
101man_MANS += doc/kyua-report-junit.1
102CLEANFILES += doc/kyua-report-junit.1
103EXTRA_DIST += doc/kyua-report-junit.1.in
104doc/kyua-report-junit.1: $(srcdir)/doc/kyua-report-junit.1.in $(MAN_DEPS)
105	$(AM_V_GEN)name=kyua-report-junit.1; $(BUILD_MANPAGE)
106
107man_MANS += doc/kyua-report.1
108CLEANFILES += doc/kyua-report.1
109EXTRA_DIST += doc/kyua-report.1.in
110doc/kyua-report.1: $(srcdir)/doc/kyua-report.1.in $(MAN_DEPS)
111	$(AM_V_GEN)name=kyua-report.1; $(BUILD_MANPAGE)
112
113man_MANS += doc/kyua-test.1
114CLEANFILES += doc/kyua-test.1
115EXTRA_DIST += doc/kyua-test.1.in
116doc/kyua-test.1: $(srcdir)/doc/kyua-test.1.in $(MAN_DEPS)
117	$(AM_V_GEN)name=kyua-test.1; $(BUILD_MANPAGE)
118
119man_MANS += doc/kyua.1
120CLEANFILES += doc/kyua.1
121EXTRA_DIST += doc/kyua.1.in
122doc/kyua.1: $(srcdir)/doc/kyua.1.in $(MAN_DEPS)
123	$(AM_V_GEN)name=kyua.1; $(BUILD_MANPAGE)
124
125man_MANS += doc/kyua.conf.5
126CLEANFILES += doc/kyua.conf.5
127EXTRA_DIST += doc/kyua.conf.5.in
128doc/kyua.conf.5: $(srcdir)/doc/kyua.conf.5.in $(MAN_DEPS)
129	$(AM_V_GEN)name=kyua.conf.5; $(BUILD_MANPAGE)
130
131man_MANS += doc/kyuafile.5
132CLEANFILES += doc/kyuafile.5
133EXTRA_DIST += doc/kyuafile.5.in
134doc/kyuafile.5: $(srcdir)/doc/kyuafile.5.in $(MAN_DEPS)
135	$(AM_V_GEN)name=kyuafile.5; $(BUILD_MANPAGE)
136
137if WITH_ATF
138EXTRA_DIST += doc/Kyuafile
139
140noinst_SCRIPTS += doc/manbuild_test
141CLEANFILES += doc/manbuild_test
142EXTRA_DIST += doc/manbuild_test.sh
143doc/manbuild_test: $(srcdir)/doc/manbuild_test.sh Makefile
144	$(AM_V_GEN)$(MKDIR_P) doc; \
145	echo "#! $(ATF_SH)" >doc/manbuild_test.tmp; \
146	echo "# AUTOMATICALLY GENERATED FROM Makefile" \
147	    >>doc/manbuild_test.tmp; \
148	sed -e 's,__MANBUILD__,$(abs_srcdir)/doc/manbuild.sh,g' \
149	    <$(srcdir)/doc/manbuild_test.sh >>doc/manbuild_test.tmp; \
150	mv doc/manbuild_test.tmp doc/manbuild_test; \
151	chmod +x doc/manbuild_test
152endif
153