diff options
author | Jeff King <peff@peff.net> | 2014-08-22 00:33:16 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-08-26 12:56:31 -0700 |
commit | 14821f88224b7e6641070fb4971674971886f1ed (patch) | |
tree | 1469e31d73c12f15c0a0dfc5b94d8a79fdbfdabd | |
parent | Makefile: use `find` to determine static header dependencies (diff) | |
download | tgif-14821f88224b7e6641070fb4971674971886f1ed.tar.xz |
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 <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | Makefile | 59 |
1 files changed, 0 insertions, 59 deletions
@@ -317,9 +317,6 @@ all:: # dependency rules. The default is "auto", which means to use computed header # dependencies if your compiler is detected to support it. # -# Define CHECK_HEADER_DEPENDENCIES to check for problems in the hard-coded -# dependency rules. -# # Define NATIVE_CRLF if your platform uses CRLF for line endings. # # Define XDL_FAST_HASH to use an alternative line-hashing method in @@ -904,11 +901,6 @@ sysconfdir = etc endif endif -ifdef CHECK_HEADER_DEPENDENCIES -COMPUTE_HEADER_DEPENDENCIES = no -USE_COMPUTED_HEADER_DEPENDENCIES = -endif - ifndef COMPUTE_HEADER_DEPENDENCIES COMPUTE_HEADER_DEPENDENCIES = auto endif @@ -1809,29 +1801,13 @@ $(dep_dirs): missing_dep_dirs := $(filter-out $(wildcard $(dep_dirs)),$(dep_dirs)) dep_file = $(dir $@).depend/$(notdir $@).d dep_args = -MF $(dep_file) -MQ $@ -MMD -MP -ifdef CHECK_HEADER_DEPENDENCIES -$(error cannot compute header dependencies outside a normal build. \ -Please unset CHECK_HEADER_DEPENDENCIES and try again) -endif endif ifneq ($(COMPUTE_HEADER_DEPENDENCIES),yes) -ifndef CHECK_HEADER_DEPENDENCIES dep_dirs = missing_dep_dirs = dep_args = endif -endif - -ifdef CHECK_HEADER_DEPENDENCIES -ifndef PRINT_HEADER_DEPENDENCIES -missing_deps = $(filter-out $(notdir $^), \ - $(notdir $(shell $(MAKE) -s $@ \ - CHECK_HEADER_DEPENDENCIES=YesPlease \ - USE_COMPUTED_HEADER_DEPENDENCIES=YesPlease \ - PRINT_HEADER_DEPENDENCIES=YesPlease))) -endif -endif ASM_SRC := $(wildcard $(OBJECTS:o=S)) ASM_OBJ := $(ASM_SRC:S=o) @@ -1839,45 +1815,10 @@ C_OBJ := $(filter-out $(ASM_OBJ),$(OBJECTS)) .SUFFIXES: -ifdef PRINT_HEADER_DEPENDENCIES -$(C_OBJ): %.o: %.c FORCE - echo $^ -$(ASM_OBJ): %.o: %.S FORCE - echo $^ - -ifndef CHECK_HEADER_DEPENDENCIES -$(error cannot print header dependencies during a normal build. \ -Please set CHECK_HEADER_DEPENDENCIES and try again) -endif -endif - -ifndef PRINT_HEADER_DEPENDENCIES -ifdef CHECK_HEADER_DEPENDENCIES -$(C_OBJ): %.o: %.c $(dep_files) FORCE - @set -e; echo CHECK $@; \ - missing_deps="$(missing_deps)"; \ - if test "$$missing_deps"; \ - then \ - echo missing dependencies: $$missing_deps; \ - false; \ - fi -$(ASM_OBJ): %.o: %.S $(dep_files) FORCE - @set -e; echo CHECK $@; \ - missing_deps="$(missing_deps)"; \ - if test "$$missing_deps"; \ - then \ - echo missing dependencies: $$missing_deps; \ - false; \ - fi -endif -endif - -ifndef CHECK_HEADER_DEPENDENCIES $(C_OBJ): %.o: %.c GIT-CFLAGS $(missing_dep_dirs) $(QUIET_CC)$(CC) -o $*.o -c $(dep_args) $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $< $(ASM_OBJ): %.o: %.S GIT-CFLAGS $(missing_dep_dirs) $(QUIET_CC)$(CC) -o $*.o -c $(dep_args) $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $< -endif %.s: %.c GIT-CFLAGS FORCE $(QUIET_CC)$(CC) -o $@ -S $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $< |