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

[PATCH 1/5] Makefile: regenerate assembler listings when asked

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Jan 6, 2010, 08:04 UTC
Message-ID
<20100106080420.GB7298@progeny.tock>
In-Reply-To
<20100106080216.GA7298@progeny.tock>

'make var.s' fails to regenerate an assembler listing if var.c has not changed but a header it includes has:

	$ make var.s
	    CC var.s
	$ touch cache.h
	$ make var.s
	$

The corresponding problem for 'make var.o' does not occur because the Makefile lists dependencies for each .o target explicitly; analogous dependency rules for the .s targets are not present. Rather than add some, it seems better to force 'make' to always regenerate assembler listings, since the assembler listing targets are only invoked when specifically requested on the make command line.

Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
 Makefile |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index c11719c..ba4d071 100644
--- a/Makefile
+++ b/Makefile
@@ -1633,7 +1633,7 @@ git.o git.spec \
 
 %.o: %.c GIT-CFLAGS
 	$(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) $<
-%.s: %.c GIT-CFLAGS
+%.s: %.c GIT-CFLAGS .FORCE-LISTING
 	$(QUIET_CC)$(CC) -S $(ALL_CFLAGS) $<
 %.o: %.S
 	$(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) $<
@@ -1978,7 +1978,7 @@ endif
 .PHONY: all install clean strip
 .PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell
 .PHONY: .FORCE-GIT-VERSION-FILE TAGS tags cscope .FORCE-GIT-CFLAGS
-.PHONY: .FORCE-GIT-BUILD-OPTIONS
+.PHONY: .FORCE-GIT-BUILD-OPTIONS .FORCE-LISTING
 
 ### Check documentation
 #
-- 
1.6.6.rc2
Previous: Jonathan NiederNext: Jonathan Nieder
Message 9 of 20 in “Makefile fixes”
  1. 0/4 Makefile fixesJonathan Nieder, Nov 28, 2009
  2. 1/4 Makefile: fix http-push.o dependenciesJonathan Nieder, Nov 28, 2009
  3. Junio C HamanoNov 28, 2009
  4. 2/4 Makefile: make ppc/sha1ppc.o depend on GIT-CFLAGSJonathan Nieder, Nov 28, 2009
  5. Makefile: make ppc/sha1ppc.o depend on GIT-CFLAGSJonathan Nieder, Jan 6, 2010
  6. Nicolas PitreJan 6, 2010
  7. 3/4 Makefile: fix .s pattern rule dependenciesJonathan Nieder, Nov 28, 2009
  8. 0/5 Makefile: fix generation of assembler listingsJonathan Nieder, Jan 6, 2010
  9. 1/5 Makefile: regenerate assembler listings when askedJonathan Nieder, Jan 6, 2010
  10. 2/5 Makefile: use target-specific variable to pass flags to ccJonathan Nieder, Jan 6, 2010
  11. Jonathan NiederJan 7, 2010
  12. 3/5 Makefile: learn to generate listings for targets requiring special flagsJonathan Nieder, Jan 6, 2010
  13. 4/5 Makefile: consolidate .FORCE-* targetsJonathan Nieder, Jan 6, 2010
  14. 5/5 git-gui/Makefile: consolidate .FORCE-* targetsJonathan Nieder, Jan 6, 2010
  15. Shawn O. PearceJan 7, 2010
  16. Linus TorvaldsJan 6, 2010
  17. 4/4 Makefile: do not clean arm directoryJonathan Nieder, Nov 28, 2009
  18. Nanako ShiraishiJan 1, 2010
  19. Junio C HamanoJan 6, 2010
  20. Jonathan NiederJan 6, 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.