threads / patch / 32813

patchHonor configure's htmldir switch

Subject: [PATCH] Honor configure's htmldir switch

## tl;dr

4 messages between Feb 2, 2013 and Feb 3, 2013. Diffs are folded; open one to read it.

replies: 3people: 2as markdown or json

Christoph J. Thompson· Feb 2, 2013, 21:25 UTC · lore

Honor autoconf's --htmldir switch. This allows relocating HTML docs straight from the configure script.

Signed-off-by: Christoph J. Thompson <cjsthompson@gmail.com>
---
 config.mak.in | 1 +
 1 file changed, 1 insertion(+)
Show changes to config.mak.in +1 −0
diff --git a/config.mak.in b/config.mak.in
index e8a9bb4..d7c49cd 100644
--- a/config.mak.in
+++ b/config.mak.in
@@ -19,6 +19,7 @@ template_dir = @datadir@/git-core/templates
 sysconfdir = @sysconfdir@
 
 mandir = @mandir@
+htmldir = @htmldir@
 
 srcdir = @srcdir@
 VPATH = @srcdir@
-- 
1.8.1.2
Junio C Hamano· Feb 3, 2013, 01:27 UTC · re: Christoph J. Thompson · lore

Re: [PATCH] Honor configure's htmldir switch

"Christoph J. Thompson" <cjsthompson@gmail.com> writes:
Show 21 quoted lines
> Honor autoconf's --htmldir switch. This allows relocating HTML docs 
> straight from the configure script.
>
>
> Signed-off-by: Christoph J. Thompson <cjsthompson@gmail.com>
> ---
>  config.mak.in | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/config.mak.in b/config.mak.in
> index e8a9bb4..d7c49cd 100644
> --- a/config.mak.in
> +++ b/config.mak.in
> @@ -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.
Junio C Hamano· Feb 3, 2013, 03:31 UTC · lore

Re: [PATCH] Honor configure's htmldir switch

Christoph Thompson <cjsthompson@gmail.com> writes:
> Will the --htmldir switch still work by exporting mandir and htmldir from
> the Makefile instead 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.
Junio C Hamano· Feb 3, 2013, 04:50 UTC · lore

Re: [PATCH] Honor configure's htmldir switch

Christoph Thompson <cjsthompson@gmail.com> writes:
[administrivia: why do you keep dropping git@vger from Cc???]
Show 5 quoted 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.

← back to recent threads