git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] autoconf: Add limited support for --htmldir
@ 2009-02-28  7:23 David Syzdek
  2009-02-28  7:59 ` Jakub Narebski
  2009-04-10  0:34 ` [PATCH] autoconf: Add limited support for --htmldir Nanako Shiraishi
  0 siblings, 2 replies; 4+ messages in thread
From: David Syzdek @ 2009-02-28  7:23 UTC (permalink / raw
  To: Jakub Narebski; +Cc: git, Jeff King, Tim Visher

On Fri, Feb 27, 2009 at 4:57 PM, Jakub Narebski <jnareb@gmail.com> wrote:
> On Sat, 28 Feb 2009, David Syzdek wrote:
>> On Fri, Feb 27, 2009 at 3:33 PM, Jakub Narebski <jnareb@gmail.com> wrote:
>>> On Thu, 26 Feb 2009, Jeff King wrote:
>>>> On Thu, Feb 26, 2009 at 09:48:29AM -0500, Tim Visher wrote:
>>>>
>>>>> I'm working on getting git 1.6.2-rc2 built.  I have a bin, man, info,
>>>>> and html directory in my home folder that I'd like to use as the
>>>>> defaults for git.  I attempted to do this through
>>>>>
>>>>>     make configure
>>>>>     ./configure --XXdir=/full/path/to/dir
>>>>>     make all man info html
>>>>>     make install install-man install-info install-html
> [...]
>
>>>> The configure support is notoriously incomplete (AFAIK, very few of the
>>>> active developers use it regularly). Probably you need something like
>>>> this (but I didn't test it):
>>>>
>>>> diff --git a/config.mak.in b/config.mak.in
>>>> index 7cce0c1..505d5c7 100644
>>>> --- a/config.mak.in
>>>> +++ b/config.mak.in
>>>> @@ -18,6 +18,8 @@ datarootdir = @datarootdir@
>>>>  template_dir = @datadir@/git-core/templates
>>>>
>>>>  mandir=@mandir@
>>>> +htmldir=@htmldir@
>>>> +infodir=@infodir@
>>>>
>>>>  srcdir = @srcdir@
>>>>  VPATH = @srcdir@
>>>
>>> Well, the infodir part works trivially, because autoconf (and
>>> therefore ./configure script) has support for --infodir=DIR.
>>> Below there is patch that adds that, with the commit message.
>>>
>>> But it is more difficult with respect to --htmldir. I am not autoconf
>>> hacker, so I don't know how to add support for having --htmldir=DIR in
>>> ./configure (in configure.ac).  What can be done is to derive htmldir
>>> in config.mak.in from other sources, for example:
>>
>> Autoconf add support for --htmldir in version 2.60.  Here is a snippet from
>> the help message from a configure script generated with 2.60:
>>
>> --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
>>
>> --docdir=DIR            documentation root [DATAROOTDIR/doc/PROJECT_TARNAME]
>>
>> --htmldir=DIR           html documentation [DOCDIR]
>>
>>
>> The current configure.ac requires autoconf version>= 2.59, bumping the
>> requirement to autoconf>= 2.60 would allow the autoconf variable $(htmldir)
>> to be used.  Bumping the required version of autoconf will affect users with
>> older linux installations who use git to upgrade git; and may affect the
>> maintainer's ability to create a "release" tarball if he has an older
>> version of autoconf.
>
> Well, I have autoconf 2.59, so I cannot test the following patch
> (and I am not sure if it is welcome). And of course it needs commit
> message, at least with explanation why bumping required version of
> autoconf was needed.

I tested the below patch using autoconf 2.59 and autoconf 2.62.  If
the version of autoconf used to create the configure script supports
the `--htmldir' option then the htmldir is set by either autoconf or
the user defined value.  If the version of autoconf does not support
the `--htmldir' option, then htmldir defaults to [DATADIR/doc/git].

This way a newer version of autoconf is not required for users on
distros more than a year or so old, however users on newer distros are
able to use the '--html' flag.

-- >8 --
Add support for --htmdir=DIR [DATAROOT/doc/git] if the configure
script is created with autoconf 2.60 or higher. htmldir defaults to
[DATADIR/doc/git] if the configure script is created with autoconf
2.59 or lower.

Signed-off-by: David M. Syzdek <david@syzdek.net>
---
 config.mak.in |    1 +
 configure.ac  |    7 +++++++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/config.mak.in b/config.mak.in
index 7cce0c1..5ae076e 100644
--- a/config.mak.in
+++ b/config.mak.in
@@ -18,6 +18,7 @@ datarootdir = @datarootdir@
 template_dir = @datadir@/git-core/templates

 mandir=@mandir@
+htmldir=@htmldir@

 srcdir = @srcdir@
 VPATH = @srcdir@
diff --git a/configure.ac b/configure.ac
index 082a03d..6e16034 100644
--- a/configure.ac
+++ b/configure.ac
@@ -107,6 +107,13 @@ AS_HELP_STRING([],[Bare --with-tcltk will make
the GUI part only if])
 AS_HELP_STRING([],[Tcl/Tk interpreter will be found in a system.]),\
 GIT_PARSE_WITH(tcltk))
 #
+# Define ${htmldir} if the configure script was created with a version of
+# autoconf older than 2.60.
+if test "x${htmldir}" = "x";then
+   htmldir="${datadir}/doc/${PACKAGE_TARNAME}"
+   AC_SUBST(htmldir, [${htmldir}])
+fi
+#


 ## Checks for programs.
-- 
1.6.2.rc2.268.g13cc9

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] autoconf: Add limited support for --htmldir
  2009-02-28  7:23 [PATCH] autoconf: Add limited support for --htmldir David Syzdek
@ 2009-02-28  7:59 ` Jakub Narebski
       [not found]   ` <9a0027270902280105hcad47c0r30bdd8379932442e@mail.gmail.com>
  2009-04-10  0:34 ` [PATCH] autoconf: Add limited support for --htmldir Nanako Shiraishi
  1 sibling, 1 reply; 4+ messages in thread
From: Jakub Narebski @ 2009-02-28  7:59 UTC (permalink / raw
  To: David Syzdek; +Cc: git

On Sat, 28 Feb 2009, David Syzdek wrote:

> I tested the below patch using autoconf 2.59 and autoconf 2.62.  If
> the version of autoconf used to create the configure script supports
> the `--htmldir' option then the htmldir is set by either autoconf or
> the user defined value.  If the version of autoconf does not support
> the `--htmldir' option, then htmldir defaults to [DATADIR/doc/git].
> 
> This way a newer version of autoconf is not required for users on
> distros more than a year or so old, however users on newer distros are
> able to use the '--html' flag.

Thanks a lot.
-- 
Jakub Narebski
Poland

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Maintainer for autoconf in git (was: [PATCH] autoconf: Add limited support for --htmldir)
       [not found]   ` <9a0027270902280105hcad47c0r30bdd8379932442e@mail.gmail.com>
@ 2009-03-02  9:30     ` Jakub Narebski
  0 siblings, 0 replies; 4+ messages in thread
From: Jakub Narebski @ 2009-03-02  9:30 UTC (permalink / raw
  To: David Syzdek; +Cc: git, Junio C Hamano

On Sat, 28 Feb 2009, David Syzdek wrote:

> Are you more or less the maintainer of the configure.ac file?  Or is
> it more of a "hive" effort?  There are a few things that could be done
> to make the file a little more readable and maintainable.  For
> instance, breaking the macro functions into acinclude.m4 instead of
> keeping them in the configure.ac file.
> 
> I'd be willing to help or take the brunt of the work, but I would like
> to coordinate with someone whom is familiar with the interaction
> between the Makefile and configure.ac.
> 
> I have a decent amount of experience with using the autotools and am
> comfortable with autoconf.
> 
> Let me know if you think this is a good idea or not.

It is true that I have added [optional] support for autoconf to git,
and I think the idea of having optional ./configure support in the form
of generating configuration file for Makefile, overriding the guesswork
based on uname, and being overridden by user's customization is mine.

But I have next to no experience (except for the work on git) with 
autotools / autoconf. Additionally keeping up configure.ac and 
config.mak.in in sync with changes to Makefile (build system) needs
time which I don't have much of. So I very much would like for someone 
with better knowledge of autotools to take over maintaining configure 
for git.

The thing to remember is that ./configure has to be entirely optional...


P.S. On of things that autoconf needs to work better is to have fallback 
install-sh script in git sources... which I think also would help in 
the case where we do not use ./configure, but are on some legacy 
system.
-- 
Jakub Narebski
Poland

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] autoconf: Add limited support for --htmldir
  2009-02-28  7:23 [PATCH] autoconf: Add limited support for --htmldir David Syzdek
  2009-02-28  7:59 ` Jakub Narebski
@ 2009-04-10  0:34 ` Nanako Shiraishi
  1 sibling, 0 replies; 4+ messages in thread
From: Nanako Shiraishi @ 2009-04-10  0:34 UTC (permalink / raw
  To: Junio C Hamano; +Cc: git, David Syzdek, Jakub Narebski, Jeff King, Tim Visher

Quoting David Syzdek <david@syzdek.net>

> I tested the below patch using autoconf 2.59 and autoconf 2.62.  If
> the version of autoconf used to create the configure script supports
> the `--htmldir' option then the htmldir is set by either autoconf or
> the user defined value.  If the version of autoconf does not support
> the `--htmldir' option, then htmldir defaults to [DATADIR/doc/git].
> 
> This way a newer version of autoconf is not required for users on
> distros more than a year or so old, however users on newer distros are
> able to use the '--html' flag.
> 
> -- >8 --
> Add support for --htmdir=DIR [DATAROOT/doc/git] if the configure
> script is created with autoconf 2.60 or higher. htmldir defaults to
> [DATADIR/doc/git] if the configure script is created with autoconf
> 2.59 or lower.
> 
> Signed-off-by: David M. Syzdek <david@syzdek.net>

Junio, may I ask what happened to this patch?

-- 
Nanako Shiraishi
http://ivory.ap.teacup.com/nanako3/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-04-10  0:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-28  7:23 [PATCH] autoconf: Add limited support for --htmldir David Syzdek
2009-02-28  7:59 ` Jakub Narebski
     [not found]   ` <9a0027270902280105hcad47c0r30bdd8379932442e@mail.gmail.com>
2009-03-02  9:30     ` Maintainer for autoconf in git (was: [PATCH] autoconf: Add limited support for --htmldir) Jakub Narebski
2009-04-10  0:34 ` [PATCH] autoconf: Add limited support for --htmldir Nanako Shiraishi

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).