summaryrefslogtreecommitdiffstats
path: root/share/mk/build/catman/eqn.mk
blob: 48b6e752fdd2ebd970a555d8d23bb78662cc5242 (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
# Copyright 2021-2024, Alejandro Colomar <alx@kernel.org>
# SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception


ifndef MAKEFILE_BUILD_CATMAN_EQN_INCLUDED
MAKEFILE_BUILD_CATMAN_EQN_INCLUDED := 1


include $(MAKEFILEDIR)/build/pre/tbl.mk
include $(MAKEFILEDIR)/configure/build-depends/grep.mk
include $(MAKEFILEDIR)/configure/build-depends/groff-base.mk


_CATMAN_troff := $(patsubst %.eqn,%.cat.troff,$(_MAN_eqn))


$(_CATMAN_troff): %.cat.troff: %.eqn $(MK) | $$(@D)/
	$(info	$(INFO_)EQN		$@)
	! ($(EQN) -T$(NROFF_OUT_DEVICE) $(EQNFLAGS) <$< 2>&1 >$@) \
	| $(GREP) ^ >&2


.PHONY: build-catman-eqn
build-catman-eqn: $(_CATMAN_troff);


endif  # include guard