{"thread":{"id":"31070","subject":"[PATCH] Makefile: fix location of listing produced by \"make subdir/foo.s\"","startedAt":"2012-07-22T23:47:26Z","lastAt":"2012-07-23T05:11:21Z","messageCount":2,"participants":["Jonathan Nieder","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"195468","messageId":"20120722234726.GC2012@burratino","threadId":"31070","inReplyTo":null,"subject":"[PATCH] Makefile: fix location of listing produced by \"make subdir/foo.s\"","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2012-07-22T23:47:26Z","receivedAt":"2012-07-22T23:47:26Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"When I invoke \"make block-sha1/sha1.s\", 'make' runs $(CC) -S without\nspecifying where it should put its output and the output ends up in\n./sha1.s.  Confusing.\n\nAdd an -o option to the .s rule to fix this.  We were already doing\nthat for most compiler invocations but had forgotten it for the\nassembler listings.\n\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\n---\nHi,\n\nThis patch is from below the scissors at\nhttp://thread.gmane.org/gmane.comp.version-control.git/201434/focus=201485\n\nI think it's a good change, but as usual it's nice if someone else\ntakes a look at it and gives it a sanity check.  If it seems sane,\nI'd be happy to see it applied.  What do you think?\n\nThanks,\nJonathan\n\n Makefile |    2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/Makefile b/Makefile\nindex 285c660e..8bfa19cd 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -2263,7 +2263,7 @@ $(ASM_OBJ): %.o: %.S GIT-CFLAGS $(missing_dep_dirs)\n endif\n \n %.s: %.c GIT-CFLAGS FORCE\n-\t$(QUIET_CC)$(CC) -S $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $<\n+\t$(QUIET_CC)$(CC) -o $@ -S $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $<\n \n ifdef USE_COMPUTED_HEADER_DEPENDENCIES\n # Take advantage of gcc's on-the-fly dependency generation\n-- \n1.7.10.4\n"},{"id":"195492","messageId":"7vk3xvnjt2.fsf@alter.siamese.dyndns.org","threadId":"31070","inReplyTo":"20120722234726.GC2012@burratino","subject":"Re: [PATCH] Makefile: fix location of listing produced by \"make subdir/foo.s\"","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-07-23T05:11:21Z","receivedAt":"2012-07-23T05:11:21Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jonathan Nieder <jrnieder@gmail.com> writes:\n\n> When I invoke \"make block-sha1/sha1.s\", 'make' runs $(CC) -S without\n> specifying where it should put its output and the output ends up in\n> ./sha1.s.  Confusing.\n>\n> Add an -o option to the .s rule to fix this.  We were already doing\n> that for most compiler invocations but had forgotten it for the\n> assembler listings.\n>\n> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>\n> ---\n> Hi,\n>\n> This patch is from below the scissors at\n> http://thread.gmane.org/gmane.comp.version-control.git/201434/focus=201485\n>\n> I think it's a good change, but as usual it's nice if someone else\n> takes a look at it and gives it a sanity check.  If it seems sane,\n> I'd be happy to see it applied.  What do you think?\n>\n> Thanks,\n> Jonathan\n\nYeah, I think it is a sensible thing to do.\n\n>  Makefile |    2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/Makefile b/Makefile\n> index 285c660e..8bfa19cd 100644\n> --- a/Makefile\n> +++ b/Makefile\n> @@ -2263,7 +2263,7 @@ $(ASM_OBJ): %.o: %.S GIT-CFLAGS $(missing_dep_dirs)\n>  endif\n>  \n>  %.s: %.c GIT-CFLAGS FORCE\n> -\t$(QUIET_CC)$(CC) -S $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $<\n> +\t$(QUIET_CC)$(CC) -o $@ -S $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $<\n>  \n>  ifdef USE_COMPUTED_HEADER_DEPENDENCIES\n>  # Take advantage of gcc's on-the-fly dependency generation\n"}]}