From f56911726a07724ee5e0fecf1c0568a974d7e312 Mon Sep 17 00:00:00 2001 From: Andrew Ayer Date: Sat, 30 May 2015 19:51:30 -0700 Subject: [PATCH] Makefile: refine man page rules Rename HAS_DOCBOOK option to ENABLE_MAN. Allow xsltproc to fetch the Docbook stylesheet from the Internet if it's not installed locally. This will hopefully make it easier for folks to build the man page. --- INSTALL | 10 ++++++---- INSTALL.md | 10 ++++++---- Makefile | 11 +++++------ 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/INSTALL b/INSTALL index d6714e4..41049f1 100644 --- a/INSTALL +++ b/INSTALL @@ -35,12 +35,14 @@ Or, just copy the git-crypt binary to wherever is most convenient for you. BUILDING THE MAN PAGE -To build and install the git-crypt(1) man page, pass HAS_DOCBOOK=yes to make: +To build and install the git-crypt(1) man page, pass ENABLE_MAN=yes to make: - $ make HAS_DOCBOOK=yes - $ make HAS_DOCBOOK=yes install + $ make ENABLE_MAN=yes + $ make ENABLE_MAN=yes install -The Docbook XSLT stylesheets are required to build the man page. +xsltproc is required to build the man page. Note that xsltproc will access +the Internet to retrieve its stylesheet unless the Docbook stylesheet is +installed locally and registered in the system's XML catalog. BUILDING A DEBIAN PACKAGE diff --git a/INSTALL.md b/INSTALL.md index 4375896..7fdb577 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -35,12 +35,14 @@ Or, just copy the git-crypt binary to wherever is most convenient for you. ### Building The Man Page -To build and install the git-crypt(1) man page, pass `HAS_DOCBOOK=yes` to make: +To build and install the git-crypt(1) man page, pass `ENABLE_MAN=yes` to make: - make HAS_DOCBOOK=yes - make HAS_DOCBOOK=yes install + make ENABLE_MAN=yes + make ENABLE_MAN=yes install -The Docbook XSLT stylesheets are required to build the man page. +xsltproc is required to build the man page. Note that xsltproc will access +the Internet to retrieve its stylesheet unless the Docbook stylesheet is +installed locally and registered in the system's XML catalog. ### Building A Debian Package diff --git a/Makefile b/Makefile index 8dd1b5a..bcc7516 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ PREFIX ?= /usr/local BINDIR ?= $(PREFIX)/bin MANDIR ?= $(PREFIX)/share/man -HAS_DOCBOOK ?= no +ENABLE_MAN ?= no DOCBOOK_XSL ?= http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl OBJFILES = \ @@ -30,8 +30,7 @@ XSLTPROC ?= xsltproc DOCBOOK_FLAGS += --param man.output.in.separate.dir 1 \ --stringparam man.output.base.dir man/ \ --param man.output.subdirs.enabled 1 \ - --param man.authors.section.enabled 1 \ - --nonet + --param man.authors.section.enabled 1 all: build @@ -40,7 +39,7 @@ all: build # BUILD_MAN_TARGETS-yes = build-man BUILD_MAN_TARGETS-no = -BUILD_TARGETS := build-bin $(BUILD_MAN_TARGETS-$(HAS_DOCBOOK)) +BUILD_TARGETS := build-bin $(BUILD_MAN_TARGETS-$(ENABLE_MAN)) build: $(BUILD_TARGETS) @@ -62,7 +61,7 @@ man/man1/git-crypt.1: man/git-crypt.xml # CLEAN_MAN_TARGETS-yes = clean-man CLEAN_MAN_TARGETS-no = -CLEAN_TARGETS := clean-bin $(CLEAN_MAN_TARGETS-$(HAS_DOCBOOK)) +CLEAN_TARGETS := clean-bin $(CLEAN_MAN_TARGETS-$(ENABLE_MAN)) clean: $(CLEAN_TARGETS) @@ -77,7 +76,7 @@ clean-man: # INSTALL_MAN_TARGETS-yes = install-man INSTALL_MAN_TARGETS-no = -INSTALL_TARGETS := install-bin $(INSTALL_MAN_TARGETS-$(HAS_DOCBOOK)) +INSTALL_TARGETS := install-bin $(INSTALL_MAN_TARGETS-$(ENABLE_MAN)) install: $(INSTALL_TARGETS)