]> git.ipfire.org Git - thirdparty/man-pages.git/blob - Makefile
fuse.4: fuse_entry_out: rework discussion of uniqueness of nodeid + generation
[thirdparty/man-pages.git] / Makefile
1 # Do "make install" to copy the pages to their destination.
2
3 DESTDIR=
4 prefix?=/usr
5 MANDIR=$(prefix)/share/man
6
7 all: remove install
8
9 uninstall remove:
10 for i in man?/*; do \
11 rm -f $(MANDIR)/"$$i" $(MANDIR)/"$$i".*; \
12 done
13
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
27 install:
28 for i in man?; do \
29 install -d -m 755 $(DESTDIR)$(MANDIR)/"$$i" || exit $$?; \
30 install -m 644 "$$i"/* $(DESTDIR)$(MANDIR)/"$$i" || exit $$?; \
31 done
32
33 # Check if groff reports warnings (may be words of sentences not displayed)
34 # from http://lintian.debian.org/tags/manpage-has-errors-from-man.html
35 check-groff-warnings:
36 GROFF_LOG="$$(mktemp --tmpdir manpages-checksXXXX)" || exit $$?; \
37 for i in man?/*.[1-9]; \
38 do \
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"
45
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