Merge branch 'jn/auto-depend-workaround-buggy-ccache' into maint

Buggy versions of ccache broke the auto-generation of dependencies.

* jn/auto-depend-workaround-buggy-ccache:
  Makefile: explicitly set target name for autogenerated dependencies
This commit is contained in:
Junio C Hamano 2013-02-07 15:13:34 -08:00
commit 45bb6cbb49

View File

@ -1475,7 +1475,8 @@ endif
ifeq ($(COMPUTE_HEADER_DEPENDENCIES),auto) ifeq ($(COMPUTE_HEADER_DEPENDENCIES),auto)
dep_check = $(shell $(CC) $(ALL_CFLAGS) \ dep_check = $(shell $(CC) $(ALL_CFLAGS) \
-c -MF /dev/null -MMD -MP -x c /dev/null -o /dev/null 2>&1; \ -c -MF /dev/null -MQ /dev/null -MMD -MP \
-x c /dev/null -o /dev/null 2>&1; \
echo $$?) echo $$?)
ifeq ($(dep_check),0) ifeq ($(dep_check),0)
override COMPUTE_HEADER_DEPENDENCIES = yes override COMPUTE_HEADER_DEPENDENCIES = yes
@ -2329,7 +2330,7 @@ $(dep_dirs):
missing_dep_dirs := $(filter-out $(wildcard $(dep_dirs)),$(dep_dirs)) missing_dep_dirs := $(filter-out $(wildcard $(dep_dirs)),$(dep_dirs))
dep_file = $(dir $@).depend/$(notdir $@).d dep_file = $(dir $@).depend/$(notdir $@).d
dep_args = -MF $(dep_file) -MMD -MP dep_args = -MF $(dep_file) -MQ $@ -MMD -MP
ifdef CHECK_HEADER_DEPENDENCIES ifdef CHECK_HEADER_DEPENDENCIES
$(error cannot compute header dependencies outside a normal build. \ $(error cannot compute header dependencies outside a normal build. \
Please unset CHECK_HEADER_DEPENDENCIES and try again) Please unset CHECK_HEADER_DEPENDENCIES and try again)