From: Jeff King <peff@peff.net>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: git@vger.kernel.org, Jiang Xin <worldhello.net@gmail.com>
Subject: [PATCH 3/3] Makefile: drop CHECK_HEADER_DEPENDENCIES code
Date: Fri, 22 Aug 2014 00:33:16 -0400 [thread overview]
Message-ID: <20140822043316.GC18192@peff.net> (raw)
In-Reply-To: <20140822042716.GE27992@peff.net>
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>
---
Same as before.
Makefile | 59 -----------------------------------------------------------
1 file changed, 59 deletions(-)
diff --git a/Makefile b/Makefile
index f2b85c9..23e621f 100644
--- a/Makefile
+++ b/Makefile
@@ -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) $<
--
2.1.0.346.ga0367b9
next prev parent reply other threads:[~2014-08-22 4:33 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-08 21:58 [PATCH] Update hard-coded header dependencies Jonathan Nieder
2014-08-10 19:48 ` Jeff King
2014-08-21 8:24 ` Jeff King
2014-08-21 8:29 ` [PATCH 1/2] Makefile: use "find" to determine static " Jeff King
2014-08-21 14:48 ` Jonathan Nieder
2014-08-22 4:12 ` Jeff King
2014-08-22 4:27 ` [PATCH v2 0/3] dropping manually-maintained LIB_H Jeff King
2014-08-22 4:32 ` [PATCH 1/3] i18n: treat "make pot" as an explicitly-invoked target Jeff King
2014-08-22 4:33 ` [PATCH 2/3] Makefile: use `find` to determine static header dependencies Jeff King
2014-08-25 19:30 ` Junio C Hamano
2014-08-25 19:33 ` Jeff King
2014-08-25 19:46 ` Jonathan Nieder
2014-08-25 20:00 ` Jeff King
2014-08-25 20:09 ` Jeff King
2014-08-25 20:45 ` Jonathan Nieder
2014-08-25 21:03 ` Junio C Hamano
2014-08-25 21:27 ` Jonathan Nieder
2014-08-25 22:08 ` Junio C Hamano
2014-08-26 12:34 ` Jeff King
2014-08-26 16:54 ` Junio C Hamano
2014-08-26 17:29 ` Jeff King
2014-08-26 19:40 ` Junio C Hamano
2014-08-22 4:33 ` Jeff King [this message]
2014-08-23 11:06 ` [PATCH 1/2] Makefile: use "find" " Jiang Xin
2014-08-21 8:31 ` [PATCH 2/2] Makefile: drop CHECK_HEADER_DEPENDENCIES code Jeff King
2014-08-10 23:31 ` [PATCH] Update hard-coded header dependencies Junio C Hamano
2014-08-10 23:39 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140822043316.GC18192@peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=jrnieder@gmail.com \
--cc=worldhello.net@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).