diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2024-04-16 18:43:49 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2024-04-16 18:58:51 -0400 |
commit | c4c063e9844f2bd2271b2e3391f59f872c66f69a (patch) | |
tree | d09c0852ae24c78e723e425306ae006fae16e076 /config/pkgconf.sh | |
parent | 98c539eeda8f9adfd22a3b2b6ece4fe1ca06b3b4 (diff) | |
download | bfs-c4c063e9844f2bd2271b2e3391f59f872c66f69a.tar.xz |
build: Refactor configuration
We now use a recursive make invocation to do the work of `make config`.
The new implementation is also compatible with GNU make 3.81 found on
macOS.
Diffstat (limited to 'config/pkgconf.sh')
-rwxr-xr-x | config/pkgconf.sh | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/config/pkgconf.sh b/config/pkgconf.sh index a13b30f..80dcbee 100755 --- a/config/pkgconf.sh +++ b/config/pkgconf.sh @@ -17,29 +17,29 @@ if (($# < 1)); then exit fi -if [[ "$NOLIBS" == *y* ]]; then +if [[ "$XNOLIBS" == *y* ]]; then exit 1 fi -if command -v "${PKG_CONFIG:-}" &>/dev/null; then +if command -v "${XPKG_CONFIG:-}" &>/dev/null; then case "$MODE" in "") - "$PKG_CONFIG" "$@" + "$XPKG_CONFIG" "$@" ;; --cflags) - OUT=$("$PKG_CONFIG" --cflags "$@") + OUT=$("$XPKG_CONFIG" --cflags "$@") if [ "$OUT" ]; then printf 'CFLAGS += %s\n' "$OUT" fi ;; --ldflags) - OUT=$("$PKG_CONFIG" --libs-only-L --libs-only-other "$@") + OUT=$("$XPKG_CONFIG" --libs-only-L --libs-only-other "$@") if [ "$OUT" ]; then printf 'LDFLAGS += %s\n' "$OUT" fi ;; --ldlibs) - OUT=$("$PKG_CONFIG" --libs-only-l "$@") + OUT=$("$XPKG_CONFIG" --libs-only-l "$@") if [ "$OUT" ]; then printf 'LDLIBS := %s ${LDLIBS}\n' "$OUT" fi |