Honor configure's htmldir switch
PATCH 1/1 Honor configure's htmldir switch
Honor autoconf's --htmldir switch. This allows relocating HTML docs straight from the configure script.
--- config.mak.in | 1 + 1 file changed, 1 insertion(+)
config.mak.in +1 -0
@@ -19,6 +19,7 @@ template_dir = @datadir@/git-core/templates sysconfdir = @sysconfdir@ mandir = @mandir@ +htmldir = @htmldir@ srcdir = @srcdir@ VPATH = @srcdir@
Signature · 1 line
1.8.1.2
Quoted 14 lines · Christoph J. Thompson
Honor autoconf's --htmldir switch. This allows relocating HTML docs straight from the configure script.
Signed-off-by Christoph J. Thompson <[email protected]>--- config.mak.in | 1 + 1 file changed, 1 insertion(+)config.mak.in +0
-0
config.mak.in template_dir = @datadir@/git-core/templates · line 25
Quoted 7 lines
config.mak.in +1
-0@@ -19,6 +19,7 @@ template_dir = @datadir@/git-core/templates sysconfdir = @sysconfdir@ mandir = @mandir@ +htmldir = @htmldir@ srcdir = @srcdir@ VPATH = @srcdir@
Hmph, in the output of "git grep -e mandir config.mak.in", I see
export exec_prefix mandir
which makes me wonder if we should either export htmldir as well, or drop mandir from the "export". Off-hand, I am not sure which is the right way, but in either case the inconsistency disturbs me.
Thanks.
A message that is not in the archive (sent off-list or not yet received): CA+7ShCrB_1Q=aKw5sP5hLkM1o0v-P1WR5+1iL983X7WQCHP=oQ@mail.gmail.com
Quoted 3 lines · Christoph Thompson
Will the --htmldir switch still work by exporting mandir and htmldir from the
Makefileinstead of
config.mak.in ?
It should not make a difference where you export them from. Lets see...
-- cut here -- >8 -- cut here --
$ cat >Makefile <<\EOF # The default target of this Makefile is ... all:
var1 = one
var2 = two
var5 = five
var7 = seven
var8 = eight
include config.mak
export var2 var4 var8
all:
env | grep '^var'
EOF
$ cat >config.mak <<\EOF var3 = three var4 = four var6 = six var7 = siete var8 = ocho
export var1 var3 var7
EOF
$ make env | grep '^var' var1=one var3=three var2=two var4=four var7=siete var8=ocho
-- cut here -- 8< -- cut here --
Everything behaves as I expect, I think.
A message that is not in the archive (sent off-list or not yet received): CA+7ShCqxDKHw0dzC6ASH=qpjG_MP-QZxOyMxQmoTKhXc7ZYHuA@mail.gmail.com
Christoph Thompson <[email protected]> writes:
[administrivia: why do you keep dropping git@vger from Cc???]
Quoted 5 lines
I was under the impression that configure passed on the value of it's --htmldir switch by doing
some substitution work like the following :sed 's|@htmldir@|$(htmldir)|g' config.mak.in > config.mak
The information flow goes more like this:
* configure.ac is used to generate the configure script with autoconf;
* configure script is driven by the user and finds the system characteristics and user's wish;
* what configure found out is used to generate config.mak.autogen, using config.mak.in as a template; and then
* the primary Makefile reads config.mak.autogen if exists and then config.mak if exists.
Note that use of ./configure is entirely optional for the build system of Git. You can give parameters to make on its command line (without having config.mak or config.mak.autogen), or you can give these parameters in handwritten config.mak and just say "make".
You can also use ./configure to write some reasonable values in config.mak.autogen, but if ./configure guesses things incorrrectly, you can still override them in your handwritten config.mak exactly because it is read after config.mak.autogen is read by Makefile.