Merge branch 'da/make-auto-header-dependencies'

* da/make-auto-header-dependencies:
  Makefile: Improve compiler header dependency check
This commit is contained in:
Junio C Hamano 2011-10-05 12:36:18 -07:00
Родитель 79814585b7 1816bf26ec
Коммит 821b315ebe
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -1240,9 +1240,9 @@ COMPUTE_HEADER_DEPENDENCIES =
USE_COMPUTED_HEADER_DEPENDENCIES = USE_COMPUTED_HEADER_DEPENDENCIES =
else else
ifndef COMPUTE_HEADER_DEPENDENCIES ifndef COMPUTE_HEADER_DEPENDENCIES
dep_check = $(shell sh -c \ dep_check = $(shell $(CC) $(ALL_CFLAGS) \
'$(CC) -c -MF /dev/null -MMD -MP -x c /dev/null -o /dev/null 2>&1; \ -c -MF /dev/null -MMD -MP -x c /dev/null -o /dev/null 2>&1; \
echo $$?') echo $$?)
ifeq ($(dep_check),0) ifeq ($(dep_check),0)
COMPUTE_HEADER_DEPENDENCIES=YesPlease COMPUTE_HEADER_DEPENDENCIES=YesPlease
endif endif