From 11c34c86ca4a0a355276d675eb46ae084ab7f7e8 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Mon, 24 Feb 2014 13:52:08 +0100 Subject: build: Set SHELL make variable to bash if possible On Debian/Ubuntu systems, /bin/sh is /bin/dash which doesn't understand the -e option to the `echo' builtin. Thus the build output looks something like the following: Building netsniff-ng toolkit (0.5.8-rc5+) for x86_64-linux-gnu: Building netsniff-ng: -e CC dissector.c -e CC dissector_eth.c -e CC dissector_80211.c ... Prevent this by setting SHELL to /bin/bash if it exists on the system, otherwise stick to /bin/sh. Signed-off-by: Tobias Klauser --- Cmds | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Cmds b/Cmds index c0e6032..8db24f5 100644 --- a/Cmds +++ b/Cmds @@ -1,6 +1,9 @@ # Be quite and do not echo the cmd Q = @ +# Try to use bash as shell for make +SHELL := $(shell if [ -x /bin/bash ]; then echo /bin/bash; else echo /bin/sh; fi ; fi) + # GCC related stuff LD = $(Q)echo -e " LD\t$@" && $(CCACHE) $(CROSS_COMPILE)gcc CCNQ = $(CCACHE) $(CROSS_COMPILE)gcc -- cgit v1.2.3-54-g00ecf