From c4c063e9844f2bd2271b2e3391f59f872c66f69a Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Tue, 16 Apr 2024 18:43:49 -0400 Subject: 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. --- config/pkgconf.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'config/pkgconf.sh') 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 -- cgit v1.2.3