git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 31, 2010, 20:42 UTC
Message-ID
<7viqaic8gs.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20100126155714.GM4895@progeny.tock>
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
Previous: Jonathan NiederNext: Jonathan Nieder
Message 22 of 27 in “Makefile: add missing header dependency rules”
  1. 0/5 Makefile: add missing header dependency rulesJonathan Nieder, Jan 23, 2010
  2. 1/5 Makefile: add missing header file dependenciesJonathan Nieder, Jan 23, 2010
  3. 2/5 Makefile: make sure test helpers are rebuilt when headers changeJonathan Nieder, Jan 23, 2010
  4. 3/5 Makefile: remove wt-status.h from LIB_HJonathan Nieder, Jan 23, 2010
  5. 4/5 Makefile: clean up http-walker.o dependency rulesJonathan Nieder, Jan 23, 2010
  6. 5/5 Makefile: drop dependency on $(wildcard */*.h)Jonathan Nieder, Jan 23, 2010
  7. Junio C HamanoJan 25, 2010
  8. 00/12 Re: Makefile: add missing header dependency rulesJonathan Nieder, Jan 26, 2010
  9. 01/12 Makefile: add missing header file dependenciesJonathan Nieder, Jan 26, 2010
  10. 02/12 Makefile: make sure test helpers are rebuilt when headers changeJonathan Nieder, Jan 26, 2010
  11. 03/12 Makefile: remove wt-status.h from LIB_HJonathan Nieder, Jan 26, 2010
  12. 04/12 Makefile: clean up http-walker.o dependency rulesJonathan Nieder, Jan 26, 2010
  13. 05/12 Makefile: drop dependency on $(wildcard */*.h)Jonathan Nieder, Jan 26, 2010
  14. 06/12 Makefile: transport.o depends on branch.h nowJonathan Nieder, Jan 26, 2010
  15. 07/12 Makefile: rearrange dependency rulesJonathan Nieder, Jan 26, 2010
  16. 08/12 Makefile: disable default implicit rulesJonathan Nieder, Jan 26, 2010
  17. 09/12 Makefile: list generated object files in OBJECTSJonathan Nieder, Jan 26, 2010
  18. 10/12 Makefile: lazily compute header dependenciesJonathan Nieder, Jan 26, 2010
  19. 11/12 Makefile: list standalone program object files in PROGRAM_OBJSJonathan Nieder, Jan 26, 2010
  20. 11/12 Makefile: list standalone program object files in PROGRAM_OBJSJonathan Nieder, Jan 27, 2010
  21. 12/12 Teach Makefile to check header dependenciesJonathan Nieder, Jan 26, 2010
  22. Junio C HamanoJan 31, 2010
  23. Jonathan NiederJan 31, 2010
  24. Junio C HamanoJan 31, 2010
  25. 14/12 Makefile: always remove .depend directories on 'make clean'Jonathan Nieder, Jan 31, 2010
  26. 13/12 Makefile: tuck away generated makefile fragments in .dependJonathan Nieder, Jan 31, 2010
  27. Jonathan NiederJan 26, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.