From: Quentin Young Date: Tue, 6 Mar 2018 15:33:21 +0000 (-0500) Subject: doc: prevent `clean` target from building manpages X-Git-Tag: frr-5.0-dev~165^2~12 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=e207a4b589a489649cdb06b2c824dc6948158b21;p=matthieu%2Ffrr.git doc: prevent `clean` target from building manpages Unconditional automake subdirectory flag = 'man' causes manpages to always be built regardless of target, which is undesirable for `clean`. Remove unconditional flag and override automake targets that need to build manpages instead. Signed-off-by: Quentin Young --- diff --git a/doc/Makefile.am b/doc/Makefile.am index d8244edca4..4a9b0525a5 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -2,7 +2,6 @@ # Tell Automake to invoke 'make' in the manpages directory with argument 'man' SUBDIRS = manpages -AM_MAKEFLAGS = man MANPAGE_BUILDDIR = manpages/_build/man diff --git a/doc/developer/Makefile b/doc/developer/Makefile index f5e7cb60ec..f5aca7a655 100644 --- a/doc/developer/Makefile +++ b/doc/developer/Makefile @@ -12,7 +12,7 @@ ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) SPHINXBUILD = sphinx-1.0-build endif ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) -$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD make variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) +$(error "The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD make variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/") endif # Internal variables. diff --git a/doc/manpages/Makefile b/doc/manpages/Makefile index 3f0c8f55ae..33a3af1f14 100644 --- a/doc/manpages/Makefile +++ b/doc/manpages/Makefile @@ -2,14 +2,17 @@ # # You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -PAPER = +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +PAPER ?= BUILDDIR = _build # User-friendly check for sphinx-build ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) -$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) +SPHINXBUILD = sphinx-1.0-build +endif +ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) +$(error "The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD make variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/") endif # Internal variables. @@ -215,4 +218,10 @@ pseudoxml: @echo @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." +.PHONY: install-data +install-data: man + +.PHONY: all +all: install-data + %: ; diff --git a/doc/user/Makefile b/doc/user/Makefile index f5e7cb60ec..f5aca7a655 100644 --- a/doc/user/Makefile +++ b/doc/user/Makefile @@ -12,7 +12,7 @@ ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) SPHINXBUILD = sphinx-1.0-build endif ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) -$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD make variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) +$(error "The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD make variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/") endif # Internal variables.