Skip to content

Commit 14821f8

Browse files
peffgitster
authored andcommitted
Makefile: drop CHECK_HEADER_DEPENDENCIES code
This code was useful when we kept a static list of header files, and it was easy to forget to update it. Since the last commit, we generate the list dynamically. Technically this could still be used to find a dependency that our dynamic check misses (e.g., a header file without a ".h" extension). But that is reasonably unlikely to be added, and even less likely to be noticed by this tool (because it has to be run manually)., It is not worth carrying around the cruft in the Makefile. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d85b0df commit 14821f8

File tree

1 file changed

+0
-59
lines changed

1 file changed

+0
-59
lines changed

Makefile

Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -317,9 +317,6 @@ all::
317317
# dependency rules. The default is "auto", which means to use computed header
318318
# dependencies if your compiler is detected to support it.
319319
#
320-
# Define CHECK_HEADER_DEPENDENCIES to check for problems in the hard-coded
321-
# dependency rules.
322-
#
323320
# Define NATIVE_CRLF if your platform uses CRLF for line endings.
324321
#
325322
# Define XDL_FAST_HASH to use an alternative line-hashing method in
@@ -904,11 +901,6 @@ sysconfdir = etc
904901
endif
905902
endif
906903

907-
ifdef CHECK_HEADER_DEPENDENCIES
908-
COMPUTE_HEADER_DEPENDENCIES = no
909-
USE_COMPUTED_HEADER_DEPENDENCIES =
910-
endif
911-
912904
ifndef COMPUTE_HEADER_DEPENDENCIES
913905
COMPUTE_HEADER_DEPENDENCIES = auto
914906
endif
@@ -1809,75 +1801,24 @@ $(dep_dirs):
18091801
missing_dep_dirs := $(filter-out $(wildcard $(dep_dirs)),$(dep_dirs))
18101802
dep_file = $(dir $@).depend/$(notdir $@).d
18111803
dep_args = -MF $(dep_file) -MQ $@ -MMD -MP
1812-
ifdef CHECK_HEADER_DEPENDENCIES
1813-
$(error cannot compute header dependencies outside a normal build. \
1814-
Please unset CHECK_HEADER_DEPENDENCIES and try again)
1815-
endif
18161804
endif
18171805

18181806
ifneq ($(COMPUTE_HEADER_DEPENDENCIES),yes)
1819-
ifndef CHECK_HEADER_DEPENDENCIES
18201807
dep_dirs =
18211808
missing_dep_dirs =
18221809
dep_args =
18231810
endif
1824-
endif
1825-
1826-
ifdef CHECK_HEADER_DEPENDENCIES
1827-
ifndef PRINT_HEADER_DEPENDENCIES
1828-
missing_deps = $(filter-out $(notdir $^), \
1829-
$(notdir $(shell $(MAKE) -s $@ \
1830-
CHECK_HEADER_DEPENDENCIES=YesPlease \
1831-
USE_COMPUTED_HEADER_DEPENDENCIES=YesPlease \
1832-
PRINT_HEADER_DEPENDENCIES=YesPlease)))
1833-
endif
1834-
endif
18351811

18361812
ASM_SRC := $(wildcard $(OBJECTS:o=S))
18371813
ASM_OBJ := $(ASM_SRC:S=o)
18381814
C_OBJ := $(filter-out $(ASM_OBJ),$(OBJECTS))
18391815

18401816
.SUFFIXES:
18411817

1842-
ifdef PRINT_HEADER_DEPENDENCIES
1843-
$(C_OBJ): %.o: %.c FORCE
1844-
echo $^
1845-
$(ASM_OBJ): %.o: %.S FORCE
1846-
echo $^
1847-
1848-
ifndef CHECK_HEADER_DEPENDENCIES
1849-
$(error cannot print header dependencies during a normal build. \
1850-
Please set CHECK_HEADER_DEPENDENCIES and try again)
1851-
endif
1852-
endif
1853-
1854-
ifndef PRINT_HEADER_DEPENDENCIES
1855-
ifdef CHECK_HEADER_DEPENDENCIES
1856-
$(C_OBJ): %.o: %.c $(dep_files) FORCE
1857-
@set -e; echo CHECK $@; \
1858-
missing_deps="$(missing_deps)"; \
1859-
if test "$$missing_deps"; \
1860-
then \
1861-
echo missing dependencies: $$missing_deps; \
1862-
false; \
1863-
fi
1864-
$(ASM_OBJ): %.o: %.S $(dep_files) FORCE
1865-
@set -e; echo CHECK $@; \
1866-
missing_deps="$(missing_deps)"; \
1867-
if test "$$missing_deps"; \
1868-
then \
1869-
echo missing dependencies: $$missing_deps; \
1870-
false; \
1871-
fi
1872-
endif
1873-
endif
1874-
1875-
ifndef CHECK_HEADER_DEPENDENCIES
18761818
$(C_OBJ): %.o: %.c GIT-CFLAGS $(missing_dep_dirs)
18771819
$(QUIET_CC)$(CC) -o $*.o -c $(dep_args) $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $<
18781820
$(ASM_OBJ): %.o: %.S GIT-CFLAGS $(missing_dep_dirs)
18791821
$(QUIET_CC)$(CC) -o $*.o -c $(dep_args) $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $<
1880-
endif
18811822

18821823
%.s: %.c GIT-CFLAGS FORCE
18831824
$(QUIET_CC)$(CC) -o $@ -S $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $<

0 commit comments

Comments
 (0)