diff options
author | Guido Günther <agx@sigxcpu.org> | 2021-05-28 11:06:07 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2021-05-28 11:28:17 +0200 |
commit | e34e595b58d0b6ccfb057dd64e3006a72f14f6a4 (patch) | |
tree | afeb50a653f3eec1597f24579bfd44a96bf07270 | |
parent | 3adf602f2f311c616f2b98751eb91185a89a3379 (diff) |
docs: Use either python3 or python
Some distros (such as Debian) don't ship a /usr/bin/python anymore
-rw-r--r-- | docs/Makefile | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/docs/Makefile b/docs/Makefile index 41f172b0..505d74b1 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -40,6 +40,13 @@ MAN_DATE=$(shell dpkg-parsechangelog -l ../debian/changelog -SDate | TZ=UTC LC_A IMAGES=$(wildcard images/*png) DEST_IMAGES=$(subst images/,$(MANUAL)/images/,$(IMAGES)) +# Select python +ifneq ($(strip $(shell which python3)),) + PYTHON=python3 +else + PYTHON=python +endif + # Select docbook-to-man tool ifeq ($(shell which docbook2x-man), ) DOCBOOK_TO_MAN=docbook-to-man @@ -79,7 +86,7 @@ git-pbuilder.1: ../bin/git-pbuilder manual.xml: $(VERSION_ENT) $(GBP_VERSION): ../debian/changelog - cd .. && python setup.py build --help >/dev/null + cd .. && $(PYTHON) setup.py build --help >/dev/null $(VERSION_ENT): $(GBP_VERSION) echo '<!ENTITY gbp-version "$(DEB_VERSION)">' > $(VERSION_ENT) |