{"thread":{"id":"30884","subject":"[PATCH] Makefile: limit specifying -DGIT_USER_AGENT=... to keep ccache efficient","startedAt":"2012-06-24T12:37:37Z","lastAt":"2012-06-24T14:56:32Z","messageCount":2,"participants":["Nguyễn Thái Ngọc Duy","Nguyen Thai Ngoc Duy"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"194157","messageId":"1340541457-9056-1-git-send-email-pclouds@gmail.com","threadId":"30884","inReplyTo":null,"subject":"[PATCH] Makefile: limit specifying -DGIT_USER_AGENT=... to keep ccache efficient","fromName":"Nguyễn Thái Ngọc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2012-06-24T12:37:37Z","receivedAt":"2012-06-24T12:37:37Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"GIT_USER_AGENT changes as HEAD changes. Defining it in BASIC_FLAGS\nmeans every time HEAD changes, the compiling options for every object\nfile is changed, which defeats the purpose of using ccache.\n\nAs version.c is the only file that uses this definition, limit\ndefining only when compiling this file.\n\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\n---\n Makefile |    4 ++--\n 1 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex f62ca2a..b3ce00d 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -1929,7 +1929,6 @@ endif\n GIT_USER_AGENT_SQ = $(subst ','\\'',$(GIT_USER_AGENT))\n GIT_USER_AGENT_CQ = \"$(subst \",\\\",$(subst \\,\\\\,$(GIT_USER_AGENT)))\"\n GIT_USER_AGENT_CQ_SQ = $(subst ','\\'',$(GIT_USER_AGENT_CQ))\n-BASIC_CFLAGS += -DGIT_USER_AGENT='$(GIT_USER_AGENT_CQ_SQ)'\n \n ifdef DEFAULT_HELP_FORMAT\n BASIC_CFLAGS += -DDEFAULT_HELP_FORMAT='\"$(DEFAULT_HELP_FORMAT)\"'\n@@ -2000,7 +1999,8 @@ builtin/help.sp builtin/help.s builtin/help.o: EXTRA_CPPFLAGS = \\\n \t'-DGIT_INFO_PATH=\"$(infodir_SQ)\"'\n \n version.sp version.s version.o: EXTRA_CPPFLAGS = \\\n-\t'-DGIT_VERSION=\"$(GIT_VERSION)\"'\n+\t'-DGIT_VERSION=\"$(GIT_VERSION)\"' \\\n+\t'-DGIT_USER_AGENT=\"$(GIT_USER_AGENT)\"'\n \n $(BUILT_INS): git$X\n \t$(QUIET_BUILT_IN)$(RM) $@ && \\\n-- \n1.7.8\n"},{"id":"194163","messageId":"CACsJy8BJmDy4pXoKM2eHhh-R0BvTxgfYTn87qZsGffEfpOQDuA@mail.gmail.com","threadId":"30884","inReplyTo":"1340541457-9056-1-git-send-email-pclouds@gmail.com","subject":"Re: [PATCH] Makefile: limit specifying -DGIT_USER_AGENT=... to keep ccache efficient","fromName":"Nguyen Thai Ngoc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2012-06-24T14:56:32Z","receivedAt":"2012-06-24T14:56:32Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Sun, Jun 24, 2012 at 7:37 PM, Nguyễn Thái Ngọc Duy <pclouds@gmail.com> wrote:\n> GIT_USER_AGENT changes as HEAD changes. Defining it in BASIC_FLAGS\n> means every time HEAD changes, the compiling options for every object\n> file is changed, which defeats the purpose of using ccache.\n>\n> As version.c is the only file that uses this definition, limit\n> defining only when compiling this file.\n\nUhm.. something like this is in jk/version-string-dependency already.\nSorry for the noise.\n-- \nDuy\n"}]}