diff options
author | Florian Dold <florian.dold@gmail.com> | 2020-08-03 13:20:23 +0530 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2020-08-03 13:20:23 +0530 |
commit | f65d933845faa73a864cce17a8ccd575d8da9f10 (patch) | |
tree | da9dafc33c4ebae63ce012c30aedb2ac906de37a | |
parent | d399a1bc794576a0c3932d92ff63f0ae97300570 (diff) | |
download | build-common-f65d933845faa73a864cce17a8ccd575d8da9f10.tar.gz build-common-f65d933845faa73a864cce17a8ccd575d8da9f10.tar.bz2 build-common-f65d933845faa73a864cce17a8ccd575d8da9f10.zip |
paths
-rwxr-xr-x | configure | 4 | ||||
-rw-r--r-- | talerbuildconfig.py | 5 |
2 files changed, 7 insertions, 2 deletions
@@ -41,5 +41,7 @@ python3 "$scriptpath/pyvercheck.py" || exit $? # Allow Python to find libraries that are checked into the build system git. export PYTHONPATH="$scriptpath:${PYTHONPATH:-}" +export TALERBUILDSYSTEMDIR=./build-system + # Call configure.py, assuming all went well. -exec python3 ./configure.py "$@" +exec python3 $TALERBUILDSYSTEMDIR/configure.py "$@" diff --git a/talerbuildconfig.py b/talerbuildconfig.py index d2fe3b0..832837e 100644 --- a/talerbuildconfig.py +++ b/talerbuildconfig.py @@ -36,6 +36,7 @@ from distutils.spawn import find_executable import subprocess from dataclasses import dataclass import semver +from pathlib import Path """ This module aims to replicate a small GNU Coding Standards @@ -146,7 +147,9 @@ class BuildConfig: print(f"found {tool.name} as {path} (version {version})") if self.configmk_enabled: - with open("config.mk", "w") as f: + d = Path(os.environ.get("TALERBUILDSYSTEMDIR", ".")) + d.mkdir(parents=True, exist_ok=True) + with open(d / "config.mk", "w") as f: print("writing config.mk") f.write("# this makefile fragment is autogenerated by configure.py\n") if self.prefix_enabled: |