From f648883f7d065471c7cd2ed6295ce2c295272324 Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Sat, 6 Mar 2021 01:44:20 -0500 Subject: Optionally compress RFCs, decompress in rfc(1) --- doc/rfc/Makefile | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'doc/rfc/Makefile') diff --git a/doc/rfc/Makefile b/doc/rfc/Makefile index e185dd97..31e238a0 100644 --- a/doc/rfc/Makefile +++ b/doc/rfc/Makefile @@ -1,11 +1,10 @@ PREFIX ?= ~/.local MANDIR ?= ${PREFIX}/share/man -BINS = rfc rfctags MODULE = ftp.rfc-editor.org::rfcs-text-only RFCS = ${MODULE}/rfc-index.txt ${MODULE}/'rfc[1-9]*.txt' -all: ${BINS} +all: rfc rfctags .SUFFIXES: .in .pl @@ -18,15 +17,22 @@ all: ${BINS} chmod a+x $@ clean: - rm -f ${BINS} + rm -f rfc rfctags -install: ${BINS} rfc.1 - install -d ${PREFIX}/bin ${MANDIR}/man1 ${PREFIX}/share - install ${BINS} ${PREFIX}/bin +install: rfc rfctags rfc.1 + install -d ${PREFIX}/bin ${MANDIR}/man1 + install rfc rfctags ${PREFIX}/bin install -m 644 rfc.1 ${MANDIR}/man1 ln -fs rfc.1 ${MANDIR}/man1/rfctags.1 + +sync: + install -d ${PREFIX}/share rsync -ptz ${RFCS} ${PREFIX}/share/rfc +compress: + find ${PREFIX}/share/rfc -name '*.txt' | xargs gzip -9f + uninstall: - rm -f ${BINS:%=${PREFIX}/bin/%} ${BINS:%=${MANDIR}/man1/%.1} + rm -f ${PREFIX}/bin/rfc ${PREFIX}/bin/rfctags + rm -f ${MANDIR}/man1/rfc.1 ${MANDIR}/man1/rfctags.1 rm -fr ${PREFIX}/share/rfc -- cgit 1.4.1