summaryrefslogtreecommitdiff
path: root/bin/bootstrap.py
diff options
context:
space:
mode:
authorKlaus Aehlig <klaus.aehlig@huawei.com>2022-04-27 11:33:09 +0200
committerKlaus Aehlig <klaus.aehlig@huawei.com>2022-04-27 16:33:07 +0200
commit9452e9e152b9b7e1abb71d04beebc85a62f5e6bf (patch)
tree087ba07451737fcbe97accd22cd8f71d32ca0a50 /bin/bootstrap.py
parent29eeaa489c5836fbbb37a83abe50f752c62b6b7c (diff)
downloadjustbuild-9452e9e152b9b7e1abb71d04beebc85a62f5e6bf.tar.gz
bootstrap.py: support header dirs directly staged
Some libraries, e.g., libgit2, bring an include directory that is expected to occur directly in the search path (containing a git2 directory and a git2.h file). Support this use case by allowing "." as include_name in the bootstrap hints.
Diffstat (limited to 'bin/bootstrap.py')
-rwxr-xr-xbin/bootstrap.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/bin/bootstrap.py b/bin/bootstrap.py
index b2c9547c..8154ee7d 100755
--- a/bin/bootstrap.py
+++ b/bin/bootstrap.py
@@ -93,8 +93,13 @@ def setup_deps():
include_dir = os.path.join(subdir,
hints.get("include_dir", "."))
include_name = hints.get("include_name", repo)
- os.symlink(os.path.normpath(include_dir),
- os.path.join(include_location, include_name))
+ if include_name == ".":
+ for entry in os.listdir(include_dir):
+ os.symlink(os.path.normpath(os.path.join(include_dir, entry)),
+ os.path.join(include_location, entry))
+ else:
+ os.symlink(os.path.normpath(include_dir),
+ os.path.join(include_location, include_name))
if "build" in hints:
run(["sh", "-c", hints["build"]], cwd=subdir)
if "link" in hints: