summaryrefslogtreecommitdiffstats
path: root/utils/Makefile
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2016-09-28 11:32:19 -0400
committerGitHub <noreply@github.com>2016-09-28 11:32:19 -0400
commit58117cf76208fca86b73f4c0d1738e1606869333 (patch)
treef98ba1b3e6674a4b9bb9f81dc53144a35fd60acc /utils/Makefile
parent43f52e292afac7bde5e588377e56d9c49574806c (diff)
parent20a07aed5d105fdb06377b62f2e88f067963135f (diff)
downloadopenshift-58117cf76208fca86b73f4c0d1738e1606869333.tar.gz
openshift-58117cf76208fca86b73f4c0d1738e1606869333.tar.bz2
openshift-58117cf76208fca86b73f4c0d1738e1606869333.tar.xz
openshift-58117cf76208fca86b73f4c0d1738e1606869333.zip
Merge pull request #2506 from tbielawa/aoi-manpage
Add a manpage for atomic-openshift-installer
Diffstat (limited to 'utils/Makefile')
-rw-r--r--utils/Makefile21
1 files changed, 21 insertions, 0 deletions
diff --git a/utils/Makefile b/utils/Makefile
index 79c27626a..078d6f184 100644
--- a/utils/Makefile
+++ b/utils/Makefile
@@ -25,6 +25,12 @@ NAME := oo-install
TESTPACKAGE := oo-install
SHORTNAME := ooinstall
+# This doesn't evaluate until it's called. The -D argument is the
+# directory of the target file ($@), kinda like `dirname`.
+ASCII2MAN = a2x -D $(dir $@) -d manpage -f manpage $<
+MANPAGES := docs/man/man1/atomic-openshift-installer.1
+VERSION := 1.3
+
sdist: clean
python setup.py sdist
rm -fR $(SHORTNAME).egg-info
@@ -35,6 +41,21 @@ clean:
@rm -fR build dist rpm-build MANIFEST htmlcov .coverage cover ooinstall.egg-info oo-install
@rm -fR $(NAME)env
+
+# To force a rebuild of the docs run 'touch' on any *.in file under
+# docs/man/man1/
+docs: $(MANPAGES)
+
+# Regenerate %.1.asciidoc if %.1.asciidoc.in has been modified more
+# recently than %.1.asciidoc.
+%.1.asciidoc: %.1.asciidoc.in
+ sed "s/%VERSION%/$(VERSION)/" $< > $@
+
+# Regenerate %.1 if %.1.asciidoc or VERSION has been modified more
+# recently than %.1. (Implicitly runs the %.1.asciidoc recipe)
+%.1: %.1.asciidoc
+ $(ASCII2MAN)
+
viewcover:
xdg-open cover/index.html