From: Chris Hofstaedtler Date: Fri, 15 Dec 2023 20:21:36 +0000 (+0100) Subject: auth: allow building in separate build directory X-Git-Tag: auth-4.9.0-alpha1~30^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F13642%2Fhead;p=thirdparty%2Fpdns.git auth: allow building in separate build directory This allows building at least the auth in a mostly default configuration like this: ``` mkdir build && cd build && \ autoreconf --install --force --verbose .. && \ ../configure ... ``` --- diff --git a/docs/Makefile.am b/docs/Makefile.am index 9db391243c..f9dab778a6 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -62,14 +62,14 @@ endif # if !HAVE_MANPAGES mans/.complete: manpages := $(addprefix manpages/,$(addsuffix .rst,$(MANPAGES_DIST))) mans/.complete: .venv rm -rf "$(@D).tmp" - .venv/bin/python -msphinx -b man . "$(@D).tmp" $(manpages) && rm -rf "$(@D)" && mv "$(@D).tmp" "$(@D)" + (cd "${srcdir}" && $(CURDIR)/.venv/bin/python -msphinx -b man . "$(CURDIR)/$(@D).tmp" $(manpages)) && rm -rf "$(@D)" && mv "$(@D).tmp" "$(@D)" touch "$@" rm -rf "$(@D).tmp" .venv: requirements.txt $(PYTHON) -m venv .venv .venv/bin/pip install -U pip setuptools setuptools-git wheel - .venv/bin/pip install -r requirements.txt + .venv/bin/pip install -r ${srcdir}/requirements.txt .NOTPARALLEL: \ all-docs \ diff --git a/pdns/Makefile.am b/pdns/Makefile.am index 870588bce0..e93a0fd7ee 100644 --- a/pdns/Makefile.am +++ b/pdns/Makefile.am @@ -96,15 +96,15 @@ endif # use a $(wildcard) wrapper here to allow build to proceed if output # file is present but input file is not (e.g. in a dist tarball) -api-swagger.yaml: $(wildcard ../docs/http-api/swagger/authoritative-api-swagger.yaml) +api-swagger.yaml: $(wildcard ${srcdir}/../docs/http-api/swagger/authoritative-api-swagger.yaml) cp $< $@ if HAVE_VENV api-swagger.json: api-swagger.yaml requirements.txt $(PYTHON) -m venv .venv .venv/bin/pip install -U pip setuptools setuptools-git wheel - .venv/bin/pip install -r requirements.txt - .venv/bin/python convert-yaml-to-json.py $< $@ + .venv/bin/pip install -r ${srcdir}/requirements.txt + .venv/bin/python ${srcdir}/convert-yaml-to-json.py $< $@ else # if HAVE_VENV if !HAVE_API_SWAGGER_JSON api-swagger.json: @@ -114,7 +114,8 @@ endif endif apidocfiles.h: api-swagger.yaml api-swagger.json - ./incfiles $^ > $@ + $(AM_V_GEN)$(srcdir)/incfiles $^ > $@.tmp + @mv $@.tmp $@ sysconf_DATA = pdns.conf-dist