Patchwork Makefile: separate man page install and compression steps

login
register
mail settings
Submitter Mike Frysinger
Date Nov. 19, 2011, 9:02 p.m.
Message ID <1321736523-8979-1-git-send-email-vapier@gentoo.org>
Download mbox | patch
Permalink /patch/126620/
State Accepted, archived
Commit 4ff3ab5a610fc150ec50bf16b1fb0b0c00e281a2
Headers show

Comments

Mike Frysinger - Nov. 19, 2011, 9:02 p.m.
If the system doesn't have gzip installed, we should still be able
to install the man pages.  So install the file in one step, and then
compress it in another (and ignore failures from that).

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 Makefile |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Patch

diff --git a/Makefile b/Makefile
index 4b71b8f..f4f97e5 100644
--- a/Makefile
+++ b/Makefile
@@ -62,7 +62,8 @@  install:: $(addprefix $(BUILDDIR)/,${BINS}) ${SCRIPTS}
 	mkdir -p ${DESTDIR}/${SBINDIR}
 	install -m 0755 $^ ${DESTDIR}/${SBINDIR}/
 	mkdir -p ${DESTDIR}/${MANDIR}/man1
-	gzip -9c mkfs.jffs2.1 > ${DESTDIR}/${MANDIR}/man1/mkfs.jffs2.1.gz
+	install -m 0644 mkfs.jffs2.1 ${DESTDIR}/${MANDIR}/man1/
+	-gzip -9f ${DESTDIR}/${MANDIR}/man1/*.1
 
 tests::
 	$(MAKE) -C $(TESTS)