{"thread":{"id":"18060","subject":"[PATCH] autoconf: Add limited support for --htmldir","startedAt":"2009-02-28T07:23:38Z","lastAt":"2009-04-10T00:34:38Z","messageCount":4,"participants":["David Syzdek","Jakub Narebski","Nanako Shiraishi"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"106515","messageId":"9a0027270902272323y44091bfakcb640f168c33a824@mail.gmail.com","threadId":"18060","inReplyTo":null,"subject":"[PATCH] autoconf: Add limited support for --htmldir","fromName":"David Syzdek","fromEmail":"david@syzdek.net","sentAt":"2009-02-28T07:23:38Z","receivedAt":"2009-02-28T07:23:38Z","isPatch":true,"sender":{"key":"david@syzdek.net","avatar":null},"body":"On Fri, Feb 27, 2009 at 4:57 PM, Jakub Narebski <jnareb@gmail.com> wrote:\n> On Sat, 28 Feb 2009, David Syzdek wrote:\n>> On Fri, Feb 27, 2009 at 3:33 PM, Jakub Narebski <jnareb@gmail.com> wrote:\n>>> On Thu, 26 Feb 2009, Jeff King wrote:\n>>>> On Thu, Feb 26, 2009 at 09:48:29AM -0500, Tim Visher wrote:\n>>>>\n>>>>> I'm working on getting git 1.6.2-rc2 built.  I have a bin, man, info,\n>>>>> and html directory in my home folder that I'd like to use as the\n>>>>> defaults for git.  I attempted to do this through\n>>>>>\n>>>>>     make configure\n>>>>>     ./configure --XXdir=/full/path/to/dir\n>>>>>     make all man info html\n>>>>>     make install install-man install-info install-html\n> [...]\n>\n>>>> The configure support is notoriously incomplete (AFAIK, very few of the\n>>>> active developers use it regularly). Probably you need something like\n>>>> this (but I didn't test it):\n>>>>\n>>>> diff --git a/config.mak.in b/config.mak.in\n>>>> index 7cce0c1..505d5c7 100644\n>>>> --- a/config.mak.in\n>>>> +++ b/config.mak.in\n>>>> @@ -18,6 +18,8 @@ datarootdir = @datarootdir@\n>>>>  template_dir = @datadir@/git-core/templates\n>>>>\n>>>>  mandir=@mandir@\n>>>> +htmldir=@htmldir@\n>>>> +infodir=@infodir@\n>>>>\n>>>>  srcdir = @srcdir@\n>>>>  VPATH = @srcdir@\n>>>\n>>> Well, the infodir part works trivially, because autoconf (and\n>>> therefore ./configure script) has support for --infodir=DIR.\n>>> Below there is patch that adds that, with the commit message.\n>>>\n>>> But it is more difficult with respect to --htmldir. I am not autoconf\n>>> hacker, so I don't know how to add support for having --htmldir=DIR in\n>>> ./configure (in configure.ac).  What can be done is to derive htmldir\n>>> in config.mak.in from other sources, for example:\n>>\n>> Autoconf add support for --htmldir in version 2.60.  Here is a snippet from\n>> the help message from a configure script generated with 2.60:\n>>\n>> --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]\n>>\n>> --docdir=DIR            documentation root [DATAROOTDIR/doc/PROJECT_TARNAME]\n>>\n>> --htmldir=DIR           html documentation [DOCDIR]\n>>\n>>\n>> The current configure.ac requires autoconf version>= 2.59, bumping the\n>> requirement to autoconf>= 2.60 would allow the autoconf variable $(htmldir)\n>> to be used.  Bumping the required version of autoconf will affect users with\n>> older linux installations who use git to upgrade git; and may affect the\n>> maintainer's ability to create a \"release\" tarball if he has an older\n>> version of autoconf.\n>\n> Well, I have autoconf 2.59, so I cannot test the following patch\n> (and I am not sure if it is welcome). And of course it needs commit\n> message, at least with explanation why bumping required version of\n> autoconf was needed.\n\nI tested the below patch using autoconf 2.59 and autoconf 2.62.  If\nthe version of autoconf used to create the configure script supports\nthe `--htmldir' option then the htmldir is set by either autoconf or\nthe user defined value.  If the version of autoconf does not support\nthe `--htmldir' option, then htmldir defaults to [DATADIR/doc/git].\n\nThis way a newer version of autoconf is not required for users on\ndistros more than a year or so old, however users on newer distros are\nable to use the '--html' flag.\n\n-- >8 --\nAdd support for --htmdir=DIR [DATAROOT/doc/git] if the configure\nscript is created with autoconf 2.60 or higher. htmldir defaults to\n[DATADIR/doc/git] if the configure script is created with autoconf\n2.59 or lower.\n\nSigned-off-by: David M. Syzdek <david@syzdek.net>\n---\n config.mak.in |    1 +\n configure.ac  |    7 +++++++\n 2 files changed, 8 insertions(+), 0 deletions(-)\n\ndiff --git a/config.mak.in b/config.mak.in\nindex 7cce0c1..5ae076e 100644\n--- a/config.mak.in\n+++ b/config.mak.in\n@@ -18,6 +18,7 @@ datarootdir = @datarootdir@\n template_dir = @datadir@/git-core/templates\n\n mandir=@mandir@\n+htmldir=@htmldir@\n\n srcdir = @srcdir@\n VPATH = @srcdir@\ndiff --git a/configure.ac b/configure.ac\nindex 082a03d..6e16034 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -107,6 +107,13 @@ AS_HELP_STRING([],[Bare --with-tcltk will make\nthe GUI part only if])\n AS_HELP_STRING([],[Tcl/Tk interpreter will be found in a system.]),\\\n GIT_PARSE_WITH(tcltk))\n #\n+# Define ${htmldir} if the configure script was created with a version of\n+# autoconf older than 2.60.\n+if test \"x${htmldir}\" = \"x\";then\n+   htmldir=\"${datadir}/doc/${PACKAGE_TARNAME}\"\n+   AC_SUBST(htmldir, [${htmldir}])\n+fi\n+#\n\n\n ## Checks for programs.\n-- \n1.6.2.rc2.268.g13cc9\n"},{"id":"106517","messageId":"200902280859.52004.jnareb@gmail.com","threadId":"18060","inReplyTo":"9a0027270902272323y44091bfakcb640f168c33a824@mail.gmail.com","subject":"Re: [PATCH] autoconf: Add limited support for --htmldir","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2009-02-28T07:59:50Z","receivedAt":"2009-02-28T07:59:50Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"On Sat, 28 Feb 2009, David Syzdek wrote:\n\n> I tested the below patch using autoconf 2.59 and autoconf 2.62.  If\n> the version of autoconf used to create the configure script supports\n> the `--htmldir' option then the htmldir is set by either autoconf or\n> the user defined value.  If the version of autoconf does not support\n> the `--htmldir' option, then htmldir defaults to [DATADIR/doc/git].\n> \n> This way a newer version of autoconf is not required for users on\n> distros more than a year or so old, however users on newer distros are\n> able to use the '--html' flag.\n\nThanks a lot.\n-- \nJakub Narebski\nPoland\n"},{"id":"106686","messageId":"200903021030.37491.jnareb@gmail.com","threadId":"18060","inReplyTo":"9a0027270902280105hcad47c0r30bdd8379932442e@mail.gmail.com","subject":"Maintainer for autoconf in git (was: [PATCH] autoconf: Add limited support for --htmldir)","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2009-03-02T09:30:35Z","receivedAt":"2009-03-02T09:30:35Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"On Sat, 28 Feb 2009, David Syzdek wrote:\n\n> Are you more or less the maintainer of the configure.ac file?  Or is\n> it more of a \"hive\" effort?  There are a few things that could be done\n> to make the file a little more readable and maintainable.  For\n> instance, breaking the macro functions into acinclude.m4 instead of\n> keeping them in the configure.ac file.\n> \n> I'd be willing to help or take the brunt of the work, but I would like\n> to coordinate with someone whom is familiar with the interaction\n> between the Makefile and configure.ac.\n> \n> I have a decent amount of experience with using the autotools and am\n> comfortable with autoconf.\n> \n> Let me know if you think this is a good idea or not.\n\nIt is true that I have added [optional] support for autoconf to git,\nand I think the idea of having optional ./configure support in the form\nof generating configuration file for Makefile, overriding the guesswork\nbased on uname, and being overridden by user's customization is mine.\n\nBut I have next to no experience (except for the work on git) with \nautotools / autoconf. Additionally keeping up configure.ac and \nconfig.mak.in in sync with changes to Makefile (build system) needs\ntime which I don't have much of. So I very much would like for someone \nwith better knowledge of autotools to take over maintaining configure \nfor git.\n\nThe thing to remember is that ./configure has to be entirely optional...\n\n\nP.S. On of things that autoconf needs to work better is to have fallback \ninstall-sh script in git sources... which I think also would help in \nthe case where we do not use ./configure, but are on some legacy \nsystem.\n-- \nJakub Narebski\nPoland\n"},{"id":"110978","messageId":"20090410093438.6117@nanako3.lavabit.com","threadId":"18060","inReplyTo":"9a0027270902272323y44091bfakcb640f168c33a824@mail.gmail.com","subject":"Re: [PATCH] autoconf: Add limited support for --htmldir","fromName":"Nanako Shiraishi","fromEmail":"nanako3@lavabit.com","sentAt":"2009-04-10T00:34:38Z","receivedAt":"2009-04-10T00:34:38Z","isPatch":true,"sender":{"key":"nanako3@lavabit.com","avatar":"https://gravatar.com/avatar/3777b9e201c5883a62b1a6fdf7c53f2d712d1d80989146063ea861e33aad72a8?d=mp&s=160"},"body":"Quoting David Syzdek <david@syzdek.net>\n\n> I tested the below patch using autoconf 2.59 and autoconf 2.62.  If\n> the version of autoconf used to create the configure script supports\n> the `--htmldir' option then the htmldir is set by either autoconf or\n> the user defined value.  If the version of autoconf does not support\n> the `--htmldir' option, then htmldir defaults to [DATADIR/doc/git].\n> \n> This way a newer version of autoconf is not required for users on\n> distros more than a year or so old, however users on newer distros are\n> able to use the '--html' flag.\n> \n> -- >8 --\n> Add support for --htmdir=DIR [DATAROOT/doc/git] if the configure\n> script is created with autoconf 2.60 or higher. htmldir defaults to\n> [DATADIR/doc/git] if the configure script is created with autoconf\n> 2.59 or lower.\n> \n> Signed-off-by: David M. Syzdek <david@syzdek.net>\n\nJunio, may I ask what happened to this patch?\n\n-- \nNanako Shiraishi\nhttp://ivory.ap.teacup.com/nanako3/\n"}]}