build-sys: Add a BSDMake target for converting pod files.

Signed-off-by: Moritz Buhl <mbuhl@openbsd.org>
This commit is contained in:
Moritz Buhl 2026-06-01 10:32:11 +02:00 committed by Stefan Berger
parent 61051fcb0e
commit df74dfee58

View File

@ -62,7 +62,8 @@ man3_MANS += $(man3_MANS_generated)
# Ensure the build is reproducible, for details see:
# https://reproducible-builds.org/docs/source-date-epoch/
%.3 : %.pod
SUFFIXES: .pod .3
.pod.3:
@if test -n "$$SOURCE_DATE_EPOCH"; then \
BUILD_DATE=$$(date +%F --utc --date="@$$SOURCE_DATE_EPOCH"); \
else \
@ -70,7 +71,7 @@ man3_MANS += $(man3_MANS_generated)
fi; \
pod2man -r "libtpms" \
-c "" \
-n $(basename $@) \
-n $(<:.pod=) \
--date="$$BUILD_DATE" \
--section=3 $< > $@