diff --git a/Makefile.base.mk b/Makefile.base.mk index aa3e4d55..36fc390e 100644 --- a/Makefile.base.mk +++ b/Makefile.base.mk @@ -35,7 +35,11 @@ DPF_MAKEFILE_BASE_INCLUDED = true # --------------------------------------------------------------------------------------------------------------------- # Auto-detect target compiler if not defined +ifeq ($(shell echo '\#test' | grep -- '\#test'),\#test) TARGET_COMPILER = $(shell echo '\#ifdef __clang__\nclang\n\#else\ngcc\n\#endif' | $(CC) -E -P -x c - 2>/dev/null) +else +TARGET_COMPILER = $(shell echo '#ifdef __clang__\nclang\n#else\ngcc\n#endif' | $(CC) -E -P -x c - 2>/dev/null) +endif ifneq ($(CLANG),true) ifneq ($(GCC),true)