3 $(error TOOLS is not set in Makefile
)
7 $(error REPO_ROOT is not set in Makefile
)
11 MANPAGE_SECTION_EXT ?
= $(MANPAGE_SECTION
)
13 MANPAGES_DIR
= $(REPO_ROOT
)/doc
/man
14 MANPAGE_FILE_SUFFIX
= .
$(MANPAGE_SECTION_EXT
).xz
15 MANPAGES_SUBDIR
= $(MANPAGES_DIR
)/man
$(MANPAGE_SECTION
)
16 MANPAGE_FILES
= $(foreach toolname
,$(TOOLS
),$(MANPAGES_SUBDIR
)/$(toolname
)$(MANPAGE_FILE_SUFFIX
))
18 manpages
: $(MANPAGE_FILES
)
21 $(MANPAGE_FILES
): |
$(MANPAGES_SUBDIR
)
25 @echo remove
$@
>> uninstall.sh
27 $(MANPAGE_FILES
): $(MANPAGES_SUBDIR
)/%$(MANPAGE_FILE_SUFFIX
): %
28 @if podchecker
"$<"; then \
29 pod2man
--name
="$<" --section
$(MANPAGE_SECTION_EXT
) --utf8
"$<" | xz
> "$@.tmp" &&\
30 mv
-f
"$@.tmp" "$@" ;\
35 install-manpages
: manpages
36 $(MAKE
) -C
$(REPO_ROOT
)/doc
/man install-manpages
37 .PHONY
: install-manpages
40 descriptions.txt
: $(TOOLS
)
41 perl
-ne
'if(/^=head1 NAME/){ <>; print while $$_=<> and !/^\s*$$/; }' -- $(sort $(TOOLS
)) | uniq
> $@~