Check CLANG_FORMAT is executable.
If clang-format is not available, AC_CHECK_PROG sets CLANG_FORMAT=no, not empty string. This results in an error at build time for those without clang-format installed. Instead check if the program is executable.
This commit is contained in:

committed by
Luke Howard

parent
9b46d6436f
commit
be2c28cc34
@@ -147,7 +147,7 @@ SUFFIXES += .x .z .hx
|
||||
# clang-format styles is to sort includes, but in many cases in-tree we really
|
||||
# don't want to do that.
|
||||
.x.c:
|
||||
@if [ -z "$(CLANG_FORMAT)" ]; then \
|
||||
@if [ ! -x "$(CLANG_FORMAT)" ]; then \
|
||||
cmp -s $< $@ 2> /dev/null || cp $< $@; \
|
||||
else \
|
||||
cp $< $@.tmp.c; \
|
||||
|
Reference in New Issue
Block a user