]>
Commit | Line | Data |
---|---|---|
fea681da | 1 | # Do "make install" to copy the pages to their destination. |
fea681da | 2 | |
8636e34a | 3 | DESTDIR= |
c7b4971b MK |
4 | prefix?=/usr |
5 | MANDIR=$(prefix)/share/man | |
fea681da | 6 | |
c1a2e851 | 7 | all: remove install |
fea681da | 8 | |
5ee63e78 | 9 | uninstall remove: |
980d08c0 | 10 | for i in man?/*; do \ |
c1a2e851 | 11 | rm -f $(MANDIR)/"$$i" $(MANDIR)/"$$i".*; \ |
fea681da MK |
12 | done |
13 | ||
fea681da MK |
14 | # Use with |
15 | # make HTDIR=/some/dir HTOPTS=whatever html | |
16 | # The sed removes the lines "Content-type: text/html\n\n" | |
17 | html: | |
18 | @if [ x$(HTDIR) = x ]; then echo "You must set HTDIR."; else \ | |
19 | for i in man?; do \ | |
20 | [ -d $(HTDIR)/"$$i" ] || mkdir -p $(HTDIR)/"$$i"; \ | |
21 | find "$$i/" -type f | while read f; do \ | |
22 | (cd "$$i"; man2html $(HTOPTS) `basename $$f`) | \ | |
23 | sed -e '1,2d' > $(HTDIR)/"$$i"/`basename $$f`.html; \ | |
24 | done; \ | |
25 | done; fi | |
26 | ||
fea681da | 27 | install: |
980d08c0 | 28 | for i in man?; do \ |
8636e34a MK |
29 | install -d -m 755 $(DESTDIR)$(MANDIR)/"$$i" || exit $$?; \ |
30 | install -m 644 "$$i"/* $(DESTDIR)$(MANDIR)/"$$i" || exit $$?; \ | |
4221001c | 31 | done |
fea681da | 32 | |
cee6023d | 33 | # Check if groff reports warnings (may be words of sentences not displayed) |
6c60c096 | 34 | # from http://lintian.debian.org/tags/manpage-has-errors-from-man.html |
251da60b | 35 | check-groff-warnings: |
851124df | 36 | GROFF_LOG="$$(mktemp --tmpdir manpages-checksXXXX)" || exit $$?; \ |
251da60b SP |
37 | for i in man?/*.[1-9]; \ |
38 | do \ | |
851124df AM |
39 | if grep -q 'SH.*NAME' "$$i"; then \ |
40 | LC_ALL=en_US.UTF-8 MANWIDTH=80 man --warnings -E UTF-8 -l "$$i" > /dev/null 2>| "$$GROFF_LOG"; \ | |
41 | [ -s "$$GROFF_LOG" ] && { echo "$$i: "; cat "$$GROFF_LOG"; echo; }; \ | |
42 | fi; \ | |
43 | done; \ | |
44 | rm -f "$$GROFF_LOG" | |
251da60b | 45 | |
fea681da MK |
46 | # someone might also want to look at /var/catman/cat2 or so ... |
47 | # a problem is that the location of cat pages varies a lot |