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

[PATCH] Pass -DDEFAULT_GIT_TEMPLATE_DIR only where actually used.

From
YLYakov Lerner <iler.ml@gmail.com>
Date
Jun 22, 2006, 01:47 UTC
Message-ID
<0J1800MC1NKJD2C0@mxout2.netvision.net.il>

Before this patch, -DDEFAULT_GIT_TEMPLATE_DIR was passed on compilation command line to all and every %c compiled. In fact the macro is used by only one .c file, and unused by all other .c files. Remove -DDEFAULT_GIT_TEMPLATE_DIR where unused. Follow the examlpe of exec_cmd.o. Pass -DDEFAULT_GIT_TEMPLATE_DIR only where actually used.

Signed-off-by: Yakov Lerner <iler.ml@gmail.com>
---
 Makefile |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/Makefile b/Makefile
index c602099..7af0937 100644
--- a/Makefile
+++ b/Makefile
@@ -472,7 +472,6 @@ PYTHON_PATH_SQ = $(subst ','\'',$(PYTHON
 GIT_PYTHON_DIR_SQ = $(subst ','\'',$(GIT_PYTHON_DIR))
 
 ALL_CFLAGS += -DSHA1_HEADER='$(SHA1_HEADER_SQ)' $(COMPAT_CFLAGS)
-ALL_CFLAGS += -DDEFAULT_GIT_TEMPLATE_DIR='"$(template_dir_SQ)"'
 LIB_OBJS += $(COMPAT_OBJS)
 export prefix TAR INSTALL DESTDIR SHELL_PATH template_dir
 ### Build rules
@@ -548,6 +547,8 @@ git$X git.spec \
 
 exec_cmd.o: exec_cmd.c GIT-CFLAGS
 	$(CC) -o $*.o -c $(ALL_CFLAGS) '-DGIT_EXEC_PATH="$(gitexecdir_SQ)"' $<
+builtin-init-db.o: builtin-init-db.c GIT-CFLAGS
+	$(CC) -o $*.o -c $(ALL_CFLAGS) -DDEFAULT_GIT_TEMPLATE_DIR='"$(template_dir_SQ)"' $<
 
 http.o: http.c GIT-CFLAGS
 	$(CC) -o $*.o -c $(ALL_CFLAGS) -DGIT_USER_AGENT='"git/$(GIT_VERSION)"' $<
-- 
1.4.0.ga40a
Next: Junio C Hamano
Message 1 of 8 in “Pass -DDEFAULT_GIT_TEMPLATE_DIR only where actually used.”
  1. Pass -DDEFAULT_GIT_TEMPLATE_DIR only where actually used.Yakov Lerner, Jun 22, 2006
  2. Junio C HamanoJun 22, 2006
  3. Timo HirvonenJun 22, 2006
  4. Junio C HamanoJun 22, 2006
  5. Petr BaudisJun 22, 2006
  6. Junio C HamanoJun 22, 2006
  7. Petr BaudisJun 22, 2006
  8. Junio C HamanoJun 22, 2006

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.