summary refs log tree commit diff
path: root/doc/rfc/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'doc/rfc/Makefile')
-rw-r--r--doc/rfc/Makefile30
1 files changed, 14 insertions, 16 deletions
diff --git a/doc/rfc/Makefile b/doc/rfc/Makefile
index 445e1163..3078dcd3 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'
+MODULE = ftp.rfc-editor.org::rfcs
+RFCS = ${MODULE}/rfc-index.txt ${MODULE}/'rfc[1-9]*.txt' ${MODULE}/'rfc*.json'
 
-all: ${BINS}
+all: rfc rfctags
 
 .SUFFIXES: .in .pl
 
@@ -18,23 +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
 
-install-nvim: install rfc.vim
-	install -d ${PREFIX}/share/nvim/site/plugin
-	install -m 644 rfc.vim ${PREFIX}/share/nvim/site/plugin
-	(cd ${PREFIX}/share/rfc \
-		&& printf '!_TAG_FILE_SORTED\t2\ttags\n' \
-		&& ${PREFIX}/bin/rfctags *.txt) | sort -f > ${PREFIX}/share/rfc/tags
+compress:
+	find ${PREFIX}/share/rfc -name '*.txt' | xargs gzip -9f
 
 uninstall:
-	rm -f ${BINS:%=${PREFIX}/bin/%} ${BINS:%=${MANDIR}/man1/%.1}
-	rm -f ${PREFIX}/share/nvim/site/plugin/rfc.vim
+	rm -f ${PREFIX}/bin/rfc ${PREFIX}/bin/rfctags
+	rm -f ${MANDIR}/man1/rfc.1 ${MANDIR}/man1/rfctags.1
 	rm -fr ${PREFIX}/share/rfc