gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-build-common] branch master updated: monorepo support


From: gnunet
Subject: [taler-build-common] branch master updated: monorepo support
Date: Fri, 28 Oct 2022 14:33:42 +0200

This is an automated email from the git hooks/post-receive script.

dold pushed a commit to branch master
in repository build-common.

The following commit(s) were added to refs/heads/master by this push:
     new 62a0f36  monorepo support
62a0f36 is described below

commit 62a0f36589b25a23680d59c7c30bf42891a17131
Author: Florian Dold <florian@dold.me>
AuthorDate: Fri Oct 28 14:32:56 2022 +0200

    monorepo support
---
 configure           | 23 ++++++++++++++++++-----
 talerbuildconfig.py |  7 ++++---
 2 files changed, 22 insertions(+), 8 deletions(-)

diff --git a/configure b/configure
index 5a14890..ad724cc 100755
--- a/configure
+++ b/configure
@@ -20,14 +20,29 @@
 # This script checks if a suitable python3 executable is installed and then
 # executes the actual configure logic written in Python.
 
-scriptpath=build-system/taler-build-scripts
+build_system_dir=build-system
 
-if ! test -d "$scriptpath"; then
-  echo "fatal error: taler-build-scripts not found at $scriptpath" >&2
+if ! test -d "$build_system_dir"; then
+  # Maybe this is not a top-level configure invocation
+  # For monorepos, try location from top-level
+  build_system_dir=../../build-system
+fi
+
+if ! test -d "$build_system_dir"; then
+  echo "fatal error: build-system directory not found" >&2
+  echo "hint: are you running this script from the right directory?" >&2
+  exit 1
+fi
+
+scriptpath=$build_system_dir/taler-build-scripts
+if ! test -d "$build_system_dir"; then
+  echo "fatal error: taler-build-scripts directory not found at $scriptpath" 
>&2
   echo "hint: did you run './bootstrap'?" >&2
   exit 1
 fi
 
+export TALERBUILDSYSTEMDIR=$build_system_dir
+
 # Check that the python3 executable is on the PATH.
 # This follows PEP 394 (https://www.python.org/dev/peps/pep-0394/).
 if ! python3 --version >/dev/null 2>&1; then
@@ -41,7 +56,5 @@ 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.
 python3 $TALERBUILDSYSTEMDIR/configure.py "$@"
diff --git a/talerbuildconfig.py b/talerbuildconfig.py
index 016feb8..d98b70f 100644
--- a/talerbuildconfig.py
+++ b/talerbuildconfig.py
@@ -79,6 +79,7 @@ class BuildConfig:
         self.args = None
         self.prefix_enabled = False
         self.configmk_enabled = False
+        self.dotconfigmk_enabled = False
 
     def add_tool(self, tool):
         """Deprecated.  Prefer the 'use' method."""
@@ -155,10 +156,10 @@ class BuildConfig:
                 print(f"found {tool.name} as {path} (version {version})")
 
         if self.configmk_enabled:
-            d = Path(os.environ.get("TALERBUILDSYSTEMDIR", "."))
+            d = Path(".")
             d.mkdir(parents=True, exist_ok=True)
-            with open(d / "config.mk", "w") as f:
-                print("writing config.mk")
+            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:
                     f.write(f"prefix = {args.prefix}\n")

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]