rewording
[moreutils.git] / Makefile
blob4f8af10c6b1b101e9fb3046bc3164ae1d6f5ab2d
1 BINS=isutf8 ifdata ifne pee sponge mispipe lckdo parallel errno
2 PERLSCRIPTS=vidir vipe ts combine zrun chronic
3 MANS=sponge.1 vidir.1 vipe.1 isutf8.1 ts.1 combine.1 ifdata.1 ifne.1 pee.1 zrun.1 chronic.1 mispipe.1 lckdo.1 parallel.1 errno.1
4 CFLAGS?=-O2 -g -Wall
5 INSTALL_BIN?=install -s
6 PREFIX?=/usr
8 DOCBOOK2XMAN=xsltproc --param man.authors.section.enabled 0 /usr/share/xml/docbook/stylesheet/docbook-xsl/manpages/docbook.xsl
10 all: $(BINS) $(MANS)
12 clean:
13 rm -f $(BINS) $(MANS) dump.c errnos.h errno.o
15 install:
16 mkdir -p $(DESTDIR)$(PREFIX)/bin
17 $(INSTALL_BIN) $(BINS) $(DESTDIR)$(PREFIX)/bin
18 install $(PERLSCRIPTS) $(DESTDIR)$(PREFIX)/bin
20 mkdir -p $(DESTDIR)$(PREFIX)/share/man/man1
21 install $(MANS) $(DESTDIR)$(PREFIX)/share/man/man1
23 check: isutf8
24 ./check-isutf8
26 %.1: %.docbook
27 xmllint --noout --valid $<
28 $(DOCBOOK2XMAN) $<
30 errno.o: errnos.h
31 errnos.h:
32 echo '#include <errno.h>' > dump.c
33 $(CC) -E -dD dump.c | awk '/^#define E/ { printf "{\"%s\",%s},\n", $$2, $$2 }' > errnos.h
34 rm -f dump.c
36 errno.1: errno.docbook
37 $(DOCBOOK2XMAN) $<
39 %.1: %
40 pod2man --center=" " --release="moreutils" $< > $@;