mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-24 11:11:02 -07:00
Pull the .a file out of fallback targets at make time, not at config time.
This commit is contained in:
@@ -18,6 +18,7 @@ HOST_PACKAGES := $(shell $(HOST_PKG_CONFIG) --list-all | cut -d' ' -f1 | sort)
|
||||
def package(self, name, package=None, fallback: Target = None):
|
||||
emit("ifeq ($(filter %s, $(PACKAGES)),)" % package)
|
||||
if fallback:
|
||||
emit(f"PACKAGE_DEPS_{package} := ", filenamesof(fallback))
|
||||
emit(
|
||||
f"PACKAGE_CFLAGS_{package} :=",
|
||||
bubbledattrsof(fallback, "caller_cflags"),
|
||||
@@ -25,8 +26,8 @@ def package(self, name, package=None, fallback: Target = None):
|
||||
emit(
|
||||
f"PACKAGE_LDFLAGS_{package} := ",
|
||||
bubbledattrsof(fallback, "caller_ldflags"),
|
||||
f"$(filter %.a, $(PACKAGE_DEPS_{package})",
|
||||
)
|
||||
emit(f"PACKAGE_DEPS_{package} := ", filenamesof(fallback))
|
||||
else:
|
||||
emit(f"$(error Required package '{package}' not installed.)")
|
||||
emit("else")
|
||||
|
||||
Reference in New Issue
Block a user