Re: [PATCH 12/12] Teach Makefile to check header dependencies
Jonathan Nieder <jrnieder@gmail.com> writes:
Show 18 quoted lines
> 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 <jrnieder@gmail.com>
> ---
> 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 <gitster@pobox.com>
---
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