threads / patch / 8331

patchmove template_dir logic to configure script.

Subject: [PATCH] move template_dir logic to configure script.

## tl;dr

2 messages between May 26, 2007 and May 29, 2007. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

Han-Wen Nienhuys· May 26, 2007, 23:07 UTC · lore
---
 config.mak.in |    2 +-
 configure.ac  |    6 ++++++
 2 files changed, 7 insertions(+), 1 deletions(-)
Show changes to 2 files +7 −1

config.mak.in, configure.ac

diff --git a/config.mak.in b/config.mak.in
index 9a57840..12a541f 100644
--- a/config.mak.in
+++ b/config.mak.in
@@ -12,7 +12,7 @@ exec_prefix = @exec_prefix@
 bindir = @bindir@
 #gitexecdir = @libexecdir@/git-core/
 datarootdir = @datarootdir@
-template_dir = @datadir@/git-core/templates/
+template_dir = @template_dir@
 
 mandir=@mandir@
 
diff --git a/configure.ac b/configure.ac
index 7cfb3a0..d1622a6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -323,6 +323,12 @@ GIT_PARSE_WITH(iconv))
 # change being considered an inode change from the update-cache perspective.
 
 
+
+AC_SUBST(template_dir)
+if test "$template_dir" = ""; then
+  template_dir='${datadir}/git-core/templates/'
+fi
+
 ## Output files
 AC_CONFIG_FILES(["${config_file}":"${config_in}":"${config_append}"])
 AC_OUTPUT
-- 
1.5.0.6


-- 
 Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen
Junio C Hamano· May 29, 2007, 06:46 UTC · re: Han-Wen Nienhuys · lore

Re: [PATCH] move template_dir logic to configure script.

Han-Wen Nienhuys <hanwen@xs4all.nl> writes:
> ---
Could I have at least three lines above the --- marker, please?
 (1) Defend _why_ this is a good change --- I would agree that
     this would make it more flexible, and I suspect that your
     main thrust with this is on some platforms (perhaps
     Windows?) you would want to have template_dir that is
     somewhere away from datarootdir.
 (2) an empty line between (1) and (3)
 (3) Signed-off-by: line.
>  config.mak.in |    2 +-
>  configure.ac  |    6 ++++++
>  2 files changed, 7 insertions(+), 1 deletions(-)

← back to recent threads