chiark / gitweb /
build-sys: check that python is enabled for "make dist"
authorFilipe Brandenburger <filbranden@google.com>
Tue, 17 Jun 2014 03:54:53 +0000 (20:54 -0700)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 20 Jun 2014 22:44:40 +0000 (18:44 -0400)
Running "make dist" requires Python support since some of the man page sources
(such as man/systemd.index.xml and man/systemd.directives.xml) are generated by
Python scripts, so break "make dist" and give an useful error message when
Python or the Python lxml module is not available.

Tested:
  $ ./configure --without-python && make && make dist
  *** python and python-lxml module must be installed and enabled in order to make dist
  make: *** [dist-check-python] Error 1

Makefile.am

index 28acc64685fda0dceb3a98900d4a28f9388b7ff1..96598561365d8178ae21e4a5d8077e26e7c0378c 100644 (file)
@@ -5369,6 +5369,18 @@ DISTCHECK_CONFIGURE_FLAGS += \
        --enable-gtk-doc
 endif
 
+#
+# Require python when making dist
+#
+.PHONY: dist-check-python
+dist-check-python:
+if !HAVE_PYTHON
+       @echo "*** python and python-lxml module must be installed and enabled in order to make dist"
+       @false
+endif
+
+dist: dist-check-python
+
 # check "broken" platforms limited toolchains for link breakage before we release
 .PHONY: linkcheck
 linkcheck: