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.
This commit is contained in:
Andrew Ayer
2015-05-30 19:51:30 -07:00
parent 9bbd39c491
commit f56911726a
3 changed files with 17 additions and 14 deletions

10
INSTALL
View File

@@ -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

View File

@@ -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

View File

@@ -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)