Thread (3 messages) flat view 3 messages, 2 authors, 2016-06-15

Re: [PATCH 12/12] Teach Makefile to check header dependencies

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:48:08
Subsystem: kernel build + files below scripts/ (unless maintained elsewhere), the rest · Maintainers: Nathan Chancellor, Nicolas Schier, Linus Torvalds

Possibly related (same subject, not in this thread)

Jonathan Nieder [off-list ref] writes:
Add a target to use the gcc-generated makefile snippets for
dependencies on header files to check the hard-coded dependencies.

With this patch applied, if any dependencies are missing, then

	make clean
	make COMPUTE_HEADER_DEPENDENCIES=YesPlease
	make CHECK_HEADER_DEPENDENCIES=YesPlease

will produce an error message like the following:

	CHECK fast-import.o
	missing dependencies: exec_cmd.h
	make: *** [fast-import.o] Error 1

Signed-off-by: Jonathan Nieder <redacted>
---
That’s the end of the series.  Thanks for reading.
Thanks.

Three observations:

 * "make distclean" should remove $(dep_files);

 * "deps/" should probably be ".depend/" or something less distracting;

 * I wish CHECK_HEADER_DEPENDENCIES pointed out unnecessary dependencies
   hardcoded in the Makefile.

-- >8 --
Subject: [PATCH] Makefile: "make distclean" should remove dependency files

Signed-off-by: Junio C Hamano <redacted>
---
 Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Makefile b/Makefile
index 45b1f54..8578b31 100644
--- a/Makefile
+++ b/Makefile
@@ -2110,7 +2110,7 @@ dist-doc:
 ### Cleaning rules
 
 distclean: clean
-	$(RM) configure
+	$(RM) configure $(dep_files)
 
 clean:
 	$(RM) *.o block-sha1/*.o ppc/*.o compat/*.o compat/*/*.o xdiff/*.o \
-- 
1.7.0.rc1.141.gd3fd2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help