From 68184ab397ad0e27063dd74d2907d700afab0253 Mon Sep 17 00:00:00 2001 From: Jonathan Schleifer Date: Sat, 8 Feb 2020 14:27:42 +0000 Subject: [PATCH] make.fish: Use bmake for pkgsrc only if available --- config/fish/functions/make.fish | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/config/fish/functions/make.fish b/config/fish/functions/make.fish index 2ea74aa..6902a6b 100644 --- a/config/fish/functions/make.fish +++ b/config/fish/functions/make.fish @@ -1,10 +1,14 @@ -# Automatically use bmake instead of make when using pkgsrc +# Automatically use bmake instead of make when using pkgsrc, if necessary function make - if which bmake >/dev/null ^&1 && \ - string match -q -r '/pkgsrc$|/pkgsrc/' $PWD + if string match -q -r '/pkgsrc$|/pkgsrc/' $PWD # pkgsrc does not like MAKEFLAGS including -j set -lx MAKEFLAGS - command bmake $argv + + if which bmake >/dev/null ^&1 && \ + command bmake $argv + else + command make $argv + end else command make $argv end