summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlejandro Sior <aho@sior.be>2022-08-07 14:29:10 +0200
committerAlejandro Sior <aho@sior.be>2022-08-07 14:29:10 +0200
commite3f26569e012bc961bc355d25c731303856fec04 (patch)
tree3ea87640ce99ea56af31584a9ed320a2ff2f80d8
parent7e75a1223a66f1b062cc01f666b6a846a7da830f (diff)
cook: check if output of pkgconfig is not empty string
-rwxr-xr-xcook.py2
-rw-r--r--test/.build3
2 files changed, 3 insertions, 2 deletions
diff --git a/cook.py b/cook.py
index 8917145..c42de23 100755
--- a/cook.py
+++ b/cook.py
@@ -532,6 +532,8 @@ def CDependency(name):
try:
inc = subproc([pkgconfig.path, "--cflags", name]).strip().decode("utf-8")
lib = subproc([pkgconfig.path, "--libs", name]).strip().decode("utf-8")
+ inc = inc if inc != "" else []
+ lib = lib if lib != "" else []
module.mkdep(shared_ld_args = lib, shared_cc_args = inc)
return module
except subprocess.CalledProcessError:
diff --git a/test/.build b/test/.build
index f616f70..94be6b4 100644
--- a/test/.build
+++ b/test/.build
@@ -1,6 +1,5 @@
mod.link(
- "Mrm", "Uil", "Xm", "Xt",
- "libpcre"
+ "Mrm", "Uil", "Xm", "Xt", "libpcre"
)
mod.src("main.c", "hai.c") \ No newline at end of file