mirror of https://github.com/mkerrisk/man-pages
Make the install target of man-pages respect the standard
"DESTDIR" variable as well as check the exit status of the install command so errors aren't ignored.
This commit is contained in:
parent
9f0fb19843
commit
8636e34a66
7
Makefile
7
Makefile
|
@ -3,6 +3,7 @@
|
|||
# Do "make install" to copy the pages to their destination.
|
||||
# Do "make gz" or "make bz2" first if you use compressed source pages.
|
||||
|
||||
DESTDIR=
|
||||
prefix?=/usr
|
||||
MANDIR=$(prefix)/share/man
|
||||
|
||||
|
@ -48,11 +49,11 @@ html:
|
|||
done; \
|
||||
done; fi
|
||||
|
||||
README=$(MANDIR)/man1/README
|
||||
README=$(DESTDIR)$(MANDIR)/man1/README
|
||||
install:
|
||||
for i in man? man??; do \
|
||||
install -d -m 755 $(MANDIR)/"$$i"; \
|
||||
install -m 644 "$$i"/* $(MANDIR)/"$$i"; \
|
||||
install -d -m 755 $(DESTDIR)$(MANDIR)/"$$i" || exit $$?; \
|
||||
install -m 644 "$$i"/* $(DESTDIR)$(MANDIR)/"$$i" || exit $$?; \
|
||||
done; \
|
||||
rm -f $(README) $(README).gz $(README).bz2
|
||||
|
||||
|
|
Loading…
Reference in New Issue