1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-06-27 16:09:52 +00:00

Invoke .depend only on build targets

Add a constraint so that the dependency build only occurs when users
actually run build tasks.

This fixes a bug on some systems where gcc/g++ is not available.

closes https://github.com/official-stockfish/Stockfish/pull/4255

No functional change
This commit is contained in:
MinetaS 2022-12-06 21:32:42 +09:00 committed by Joost VandeVondele
parent cb0c7a9848
commit 74fb936dbd

View file

@ -512,7 +512,7 @@ endif
### Sometimes gcc is really clang
ifeq ($(COMP),gcc)
gccversion = $(shell $(CXX) --version)
gccversion = $(shell $(CXX) --version 2>/dev/null)
gccisclang = $(findstring clang,$(gccversion))
ifneq ($(gccisclang),)
profile_make = clang-profile-make
@ -1006,4 +1006,6 @@ icc-profile-use:
.depend: $(SRCS)
-@$(CXX) $(DEPENDFLAGS) -MM $(SRCS) > $@ 2> /dev/null
ifneq (, $(filter $(MAKECMDGOALS), build profile-build))
-include .depend
endif