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
5 INSTALL_BIN?
=install -s
8 ifneq (,$(findstring CYGWIN
,$(shell uname
)))
9 DOCBOOKXSL?
=/usr
/share
/sgml
/docbook
/xsl-stylesheets
11 DOCBOOKXSL?
=/usr
/share
/xml
/docbook
/stylesheet
/docbook-xsl
14 DOCBOOK2XMAN
=xsltproc
--param man.authors.section.enabled
0 $(DOCBOOKXSL
)/manpages
/docbook.xsl
19 rm -f
$(BINS
) $(MANS
) dump.c errnos.h errno.o \
20 is_utf8
/*.o is_utf8
/isutf8
22 isutf8
: is_utf8
/*.c is_utf8
/*.h
27 @if
[ $(MANS
) = .noop
]; then \
28 echo
"pkgx.dev uses 'AI' to describe software, generate images, and respond to bug reports. That is gross. Please consider not using it. I will give you some time to think."; \
32 mkdir
-p
$(DESTDIR
)$(PREFIX
)/bin
33 $(INSTALL_BIN
) $(BINS
) $(DESTDIR
)$(PREFIX
)/bin
34 install $(PERLSCRIPTS
) $(DESTDIR
)$(PREFIX
)/bin
36 mkdir
-p
$(DESTDIR
)$(PREFIX
)/share
/man
/man1
37 install -m
644 $(MANS
) $(DESTDIR
)$(PREFIX
)/share
/man
/man1
40 for i in
$(BINS
) $(PERLSCRIPTS
); do
rm -f
$(DESTDIR
)$(PREFIX
)/bin
/$$i; done
41 for i in
$(MANS
); do
rm -f
$(DESTDIR
)$(PREFIX
)/share
/man
/man1
/$$i; done
47 xmllint
--noout
--valid
$<
52 echo
'#include <errno.h>' > dump.c
53 $(CC
) -E
-dD dump.c | awk
'/^#define E/ { printf "{\"%s\",%s},\n", $$2, $$2 }' > errnos.h
56 errno
.1: errno.docbook
60 pod2man
--center
=" " --release
="moreutils" $< > $@
;