pthread_mutexattr_setrobust.3: Note that the *_np() APIs are deprecated since glibc...
[man-pages.git] / Makefile
blobea31eab809996ce753b6af23aa80b40d733b98e9
1 DESTDIR=
2 prefix?=/usr
3 MANDIR=$(prefix)/share/man
5 all: remove install
7 uninstall remove:
8 for i in man?/*; do \
9 rm -f $(MANDIR)/"$$i" $(MANDIR)/"$$i".*; \
10 done
12 # Use with
13 # make HTDIR=/some/dir HTOPTS=whatever html
14 # The sed removes the lines "Content-type: text/html\n\n"
15 html:
16 @if [ x$(HTDIR) = x ]; then echo "You must set HTDIR."; else \
17 for i in man?; do \
18 [ -d $(HTDIR)/"$$i" ] || mkdir -p $(HTDIR)/"$$i"; \
19 find "$$i/" -type f | while read f; do \
20 man2html $(HTOPTS) $$f | \
21 sed -e '1,2d' > $(HTDIR)/"$$i"/`basename $$f`.html; \
22 done; \
23 done; fi
25 install:
26 for i in man?; do \
27 install -d -m 755 $(DESTDIR)$(MANDIR)/"$$i" || exit $$?; \
28 install -m 644 "$$i"/* $(DESTDIR)$(MANDIR)/"$$i" || exit $$?; \
29 done
31 # Check if groff reports warnings (may be words of sentences not displayed)
32 # from https://lintian.debian.org/tags/groff-message.html
33 check-groff-warnings:
34 GROFF_LOG="$$(mktemp --tmpdir manpages-checksXXXX)" || exit $$?; \
35 for i in man?/*.[1-9]; \
36 do \
37 if grep -q 'SH.*NAME' "$$i"; then \
38 LC_ALL=en_US.UTF-8 MANWIDTH=80 man --warnings -E UTF-8 -l "$$i" > /dev/null 2>| "$$GROFF_LOG"; \
39 [ -s "$$GROFF_LOG" ] && { echo "$$i: "; cat "$$GROFF_LOG"; echo; }; \
40 fi; \
41 done; \
42 rm -f "$$GROFF_LOG"
44 # someone might also want to look at /var/catman/cat2 or so ...
45 # a problem is that the location of cat pages varies a lot