File: Makefile

package info (click to toggle)
manpages 1.19-1
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 3,668 kB
  • ctags: 4
  • sloc: sh: 87; makefile: 53
file content (37 lines) | stat: -rw-r--r-- 1,078 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Do "make screen" first, if you want to protect already installed,
# more up-to-date manual pages than the ones included in this package.
# Do "make install" to copy the pages to their destination.
# Do "make gz" before "make install" if you use compressed source pages.

# FHS requires /usr/share/man
MANDIR=$(prefix)/usr/man

GZIP=gzip -9

all: screen remove gz install

screen:
	mkdir not_installed
	for i in man?/*; do \
		if [ $(MANDIR)/$$i -nt $$i ]; then \
			diff -q $(MANDIR)/$$i $$i > /dev/null 2>&1; \
			if [ $$? != 0 ]; then mv $$i not_installed; fi; \
		fi; \
	done

remove:
	rm -f $(MANDIR)/man2/modules.2 $(MANDIR)/man2/modules.2.gz
	rm -f $(MANDIR)/man3/exect.3 $(MANDIR)/man3/exect.3.gz
	for i in man?; do for j in $$i/*; do \
		rm -f $(MANDIR)/$$j $(MANDIR)/$$j.gz; done; done

gz:
	for i in man?; do $(GZIP) $$i/*; done

install:
	for i in man?; do \
		install -d -m 755 $(MANDIR)/$$i; \
		install -m 644 $$i/* $(MANDIR)/$$i; \
	done
# someone might also want to look at /var/catman/cat2 or so ...
# a problem is that the location of cat pages varies a lot