summaryrefslogtreecommitdiffstats
path: root/share/mk/build/ps/eqn.mk
blob: a4c921e23746c760c2b61315f82df0d76d1f469b (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_PS_EQN_INCLUDED
MAKEFILE_BUILD_PS_EQN_INCLUDED := 1


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


_PSMAN_troff := $(patsubst %.eqn,%.ps.troff,$(_MAN_eqn))


$(_PSMAN_troff): %.ps.troff: %.eqn $(MK) | $$(@D)/
	$(info	$(INFO_)EQN		$@)
	! ($(EQN) -Tps $(EQNFLAGS) <$< 2>&1 >$@) \
	| $(GREP) ^ >&2


.PHONY: build-ps-eqn
build-ps-eqn: $(_PSMAN_troff);


endif  # include guard