From: Harald Hoyer Date: Fri, 12 Mar 2021 09:27:31 +0000 (+0100) Subject: test: check for shfmt in Makefile X-Git-Tag: 054~298 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=07b65603ffd08b396abe122ba9899533689129fd;p=thirdparty%2Fdracut.git test: check for shfmt in Makefile --- diff --git a/Makefile b/Makefile index 8b2a64ebf..a031440c2 100644 --- a/Makefile +++ b/Makefile @@ -9,6 +9,8 @@ ifeq ($(DRACUT_FULL_VERSION),) DRACUT_FULL_VERSION = $(DRACUT_VERSION) endif +HAVE_SHFMT ?= $(shell which shfmt >/dev/null 2>&1 && echo yes) + -include Makefile.inc KVERSION ?= $(shell uname -r) @@ -92,7 +94,9 @@ dracut-util: util/util indent: indent -i8 -nut -br -linux -l120 $(wildcard *.[ch] */*.[ch]) - if type -P shfmt >/dev/null; then shfmt -w -s .; fi +ifeq ($(HAVE_SHFMT),yes) + shfmt -w -s . +endif doc: $(manpages) dracut.html