1 # Do not print "Entering directory ..."
2 MAKEFLAGS
+= --no-print-directory
4 htmlbuilddir
= $(CURDIR
)/.html
9 datarootdir
= $(prefix)/share
10 docdir
= $(datarootdir
)/doc
11 mandir = $(datarootdir
)/man
13 htmldir_
= $(htmldir
)/man
17 INSTALL_DATA
= $(INSTALL
) -m
644
18 INSTALL_DIR
= $(INSTALL
) -m
755 -d
26 # make HTOPTS=whatever html
27 # The sed removes the lines "Content-type: text/html\n\n"
29 html
: | builddirs-html
32 man2html
$(HTOPTS
) "$$f" \
34 >"$(htmlbuilddir)/$${f}$(htmlext)" \
38 .PHONY
: builddirs-html
42 $(INSTALL_DIR
) "$(htmlbuilddir)/$$d" || exit
$$?
; \
46 install-html
: | installdirs-html
47 cd
$(htmlbuilddir
) && \
50 $(INSTALL_DATA
) -T
"$$f" "$(DESTDIR)$(htmldir_)/$$f" || exit
$$?
; \
53 .PHONY
: installdirs-html
57 $(INSTALL_DIR
) "$(DESTDIR)$(htmldir_)/$$d" || exit
$$?
; \
61 install: |
installdirs
64 $(INSTALL_DATA
) -T
"$$f" "$(DESTDIR)$(mandir)/$$f" || exit
$$?
; \
71 $(INSTALL_DIR
) "$(DESTDIR)$(mandir)/$$d" || exit
$$?
; \
74 .PHONY
: uninstall remove
78 rm -f
"$(DESTDIR)$(mandir)/$$f" || exit
$$?
; \
79 rm -f
"$(DESTDIR)$(mandir)/$$f".
* || exit
$$?
; \
82 .PHONY
: uninstall-html
86 rm -f
"$(DESTDIR)$(htmldir_)/$$f".
* || exit
$$?
; \
93 rm -f
"$(htmlbuilddir)/$$f".
* || exit
$$?
; \
96 # Check if groff reports warnings (may be words of sentences not displayed)
97 # from https://lintian.debian.org/tags/groff-message.html
98 .PHONY
: check-groff-warnings
100 GROFF_LOG
="$$(mktemp --tmpdir manpages-checksXXXX)" || exit
$$?
; \
101 for i in man?
/*.
[1-9]; \
103 if grep
-q
'SH.*NAME' "$$i"; then \
104 LC_ALL
=en_US.UTF-8 MANWIDTH
=80 man
--warnings
-E UTF-8
-l
"$$i" > /dev
/null
2>|
"$$GROFF_LOG"; \
105 [ -s
"$$GROFF_LOG" ] && { echo
"$$i: "; cat
"$$GROFF_LOG"; echo
; }; \
110 # someone might also want to look at /var/catman/cat2 or so ...
111 # a problem is that the location of cat pages varies a lot