File: Makefile

package info (click to toggle)
manpages-fr 1.58.1-3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 10,104 kB
  • ctags: 4
  • sloc: makefile: 106; sh: 8
file content (27 lines) | stat: -rw-r--r-- 815 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
prefix=/usr/local

MANDIR=$(prefix)/share/man/fr

install: install-files fix-environ compress-files

install-files:
	test -d $(DESTDIR)$(MANDIR) || install -d -m 755 $(DESTDIR)$(MANDIR)
	for i in man? ; do \
	  test -d $(DESTDIR)$(MANDIR)/$$i || install -d -m 755 $(DESTDIR)$(MANDIR)/$$i ; \
	  for j in $$i/* ; do \
	    [ -f $$j ] || continue ; \
	    install -m 644 $$j $(DESTDIR)$(MANDIR)/$$j ; \
	  done ; \
	done

#   Move environ(5) to environ(7)
fix-environ:
	sed -e 's/ENVIRON 5/ENVIRON 7/' $(DESTDIR)$(MANDIR)/man5/environ.5 > $(DESTDIR)$(MANDIR)/man7/environ.7
	rm -f $(DESTDIR)$(MANDIR)/man5/environ.5
	for f in $(DESTDIR)$(MANDIR)/man?/*; do \
	    sed -e 's/environ (5)/environ (7)/' $$f > $$f.tmp && mv $$f.tmp $$f; \
	done

compress-files:
	find  $(DESTDIR)$(MANDIR) -type f | xargs -n 20 gzip -f9