Skip to content

Commit 1015cc4

Browse files
jrngitster
authored andcommitted
Makefile: fix location of listing produced by "make subdir/foo.s"
When I invoke "make block-sha1/sha1.s", 'make' runs $(CC) -S without specifying where it should put its output and the output ends up in ./sha1.s. Confusing. Add an -o option to the .s rule to fix this. We were already doing that for most compiler invocations but had forgotten it for the assembler listings. Signed-off-by: Jonathan Nieder <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d0f1ea6 commit 1015cc4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2116,7 +2116,7 @@ $(ASM_OBJ): %.o: %.S GIT-CFLAGS $(missing_dep_dirs)
21162116
endif
21172117

21182118
%.s: %.c GIT-CFLAGS FORCE
2119-
$(QUIET_CC)$(CC) -S $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $<
2119+
$(QUIET_CC)$(CC) -o $@ -S $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $<
21202120

21212121
ifdef USE_COMPUTED_HEADER_DEPENDENCIES
21222122
# Take advantage of gcc's on-the-fly dependency generation

0 commit comments

Comments
 (0)