summaryrefslogtreecommitdiffstats
path: root/man/local.mk
blob: 2cb3565eacaa6ca57b019c68d0497b5b039f5f10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Copyright (C) 2018  Patrick McDermott
#
# This file is part of opkbuild.
#
# opkbuild is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# opkbuild is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with opkbuild.  If not, see <http://www.gnu.org/licenses/>.

MANUAL = Distribution Build System

#man1_sources = \
#	opkbuild.1in \
#	ob-checkbuilddeps.1in \
#	ob-buildenv.1in \
#	ob-unpacksource.1in \
#	ob-applypatches.1in \
#	ob-installplatconf.1in \
#	ob-installdocs.1in \
#	ob-gencontrol.1in \
#	ob-buildopk.1in \
#	ob-genchanges.1in
man1_MANS = $(man1_sources:.1in=.1)
man3_MANS = \
	%reldir%/ob_error.3 \
	%reldir%/ob_get_msg.3 \
	%reldir%/ob_get_text_domain.3 \
	%reldir%/ob_info.3 \
	%reldir%/ob_parse_changelog.3 \
	%reldir%/ob_parse_control.3 \
	%reldir%/ob_parse_dep.3 \
	%reldir%/ob_reduce_deps.3 \
	%reldir%/ob_set_text_domain.3 \
	%reldir%/ob_warn.3

SUFFIXES += .1in .1
CLEANFILES += \
	%reldir%/Tags \
	$(man1_MANS) \
	$(man3_MANS)
EXTRA_DIST += \
	$(man1_sources)

man_subst = sed \
	-e "s|[@]SOURCE[@]|$(PACKAGE_STRING)|g" \
	-e 's|[@]MANUAL[@]|$(MANUAL)|g'

.1in.1:
	$(AM_V_GEN)$(MKDIR_P) "$$(dirname $@)"
	$(AM_V_at)$(man_subst) $< >$@

$(man3_MANS): %reldir%/Tags

%reldir%/Tags: $(libopkbuild_sources) $(EXTRA_libopkbuild_sources)
	$(AM_V_GEN)libopkbuild="$(libdatadir)/libopkbuild.$(SHSOEXT)"; \
		libopkbuild="$${libopkbuild}.$(libopkbuild_shsoversion)"; \
		'$(srcdir)/tools/shman.sh' \
		-s "$(PACKAGE_STRING)" -m '$(MANUAL)' -S "$${libopkbuild}" \
		-b '$(srcdir)' -d %reldir% -t $@ \
		$(libopkbuild_sources) $(EXTRA_libopkbuild_sources)