Commit 2d1f248e authored by Michael Hanselmann's avatar Michael Hanselmann

A number of Makefile fixes

- run-in-tempdir should depend on what it copies to the temporary dir
- Add PYTHON_BOOTSTRAP to BUILT_SOURCES
- Don't use “mkdir -p” directly
- Create directory if necessary for writing bootstrap script

In summary, this should make “make distcheck” in pristine
checkout work again.
Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 88a6ca6f
......@@ -97,7 +97,10 @@ BUILT_SOURCES = \
ganeti \
stamp-srclinks \
stamp-directories \
lib/_autoconf.py
lib/_autoconf.py \
$(PYTHON_BOOTSTRAP)
$(RUN_IN_TEMPDIR): $(BUILT_SOURCES)
nodist_pkgpython_PYTHON = \
lib/_autoconf.py
......@@ -204,7 +207,7 @@ docrst = \
doc/security.rst \
doc/walkthrough.rst
doc/html/.stamp: $(docrst) $(docpng) doc/conf.py configure.ac
doc/html/.stamp: $(docrst) $(docpng) doc/conf.py configure.ac $(RUN_IN_TEMPDIR)
@test -n "$(SPHINX)" || \
{ echo 'sphinx-build' not found during configure; exit 1; }
PYTHONPATH=. $(RUN_IN_TEMPDIR) $(SPHINX) -q -W -b html \
......@@ -630,6 +633,7 @@ $(REPLACE_VARS_SED): Makefile
$(PYTHON_BOOTSTRAP): Makefile
set -e; \
test -e $(dir $@) || mkdir $(dir $@); \
module='$(subst -,_,$(notdir $@))'; \
{ echo '#!/usr/bin/python'; \
echo '# This file is automatically generated, do not edit!'; \
......@@ -748,7 +752,7 @@ TAGS: $(BUILT_SOURCES)
.PHONY: coverage
coverage: $(BUILT_SOURCES) $(python_tests)
set -e; \
mkdir -p doc/coverage; \
@mkdir_p@ doc/coverage; \
COVERAGE_FILE=$(CURDIR)/doc/coverage/data \
TEXT_COVERAGE=$(CURDIR)/doc/coverage/report.txt \
HTML_COVERAGE=$(CURDIR)/doc/coverage \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment