git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Bugfix: undefined htmldir in config.mak.autogen

From
Jiang Xin <worldhello.net@gmail.com>
Date
Feb 20, 2013, 01:39 UTC
Message-ID
<CANYiYbF0C2qormAWNVhHm45TVQ6woECD7u1cCxxNuwyZxziNpw@mail.gmail.com>
In-Reply-To
<7v4nh750v3.fsf@alter.siamese.dyndns.org>
2013/2/20 Junio C Hamano <gitster@pobox.com>:
Show 24 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
>>> After the installation, all the html documents will copy to rootdir (/),
>>> and:
>>>
>>>     $ git --html-path
>>>     <PREFIX>
>>>
>>>     $ git help -w something
>>>     fatal: '<PREFIX>': not a documentation directory.
>>
>> I am not sure if this description is correct.  The generated configure
>> seems to set
>>
>>       datarootdir='${prefix}/share'
>>       htmldir='${docdir}'
>>       docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
>>
>> so it is likely you would get not <PREFIX> but <PREFIX>/share, no?
>
> This was a mis-diag; without docdir mentioned in config.mak.in, we
> do not even get that far, and htmldir will end up being empty, and
> the runtime code adds <PREFIX> to it in system_path().  What I was
> describing was what happens when you only mention @docdir@ but not
> PACKAGE_TARNAME in the file.
I also doubt about it after sleep, so I check it again:
    ## gettext is installed in non-standard location on Mac
    $ export CFLAGS=-I/usr/local/include; export LDFLAGS=-L/usr/local/lib
    $ make config
    $ ./configure --prefix=/opt/git/v1.8.2
    $ make && sudo make install
    ## already symlink /opt/git/v1.8.2/bin/* to /usr/local/bin/
    $ git --html-path
    /opt/git/v1.8.2/
    $ git help -w help
    fatal: '/opt/git/v1.8.2/': not a documentation directory.
>> And the worst part is that having to know that the file needs to
>> export docdir and PACKAGE_TARNAME feels to me that we are tying
>> ourselves to too much detail in the internal implementation detail
>> of versions of autoconf we happen to have for testing this change.

I am not familiar with autoconf. After clone autoconf and check, I cannot find a neat way to change "htmldir" default location to use ${datarootdir} (just like mandir). In file "lib/autoconf/general.m4", there are:

    AC_SUBST([docdir],         [m4_ifset([AC_PACKAGE_TARNAME],
                 ['${datarootdir}/doc/${PACKAGE_TARNAME}'],
                 ['${datarootdir}/doc/${PACKAGE}'])])dnl
    ...
    AC_SUBST([htmldir],        ['${docdir}'])dnl
    ...
    AC_SUBST([pdfdir],         ['${docdir}'])dnl
    ...
    AC_SUBST([mandir],         ['${datarootdir}/man'])dnl
Show 10 quoted lines
> This still stands. It really feels wrong that this file has to be
> aware of such an implementation detail of autoconf.  But as an
> interim workaround, setting these two otherwise unused variables may
> be the best we could do.
>
> I am not sure if such a layout can be actually used for installing,
> though.  Didn't we see some issues around the relativeness of
> htmldir and mandir vs passing them down to Documentation/Makefile,
> or is it not an issue when ./configure and config.mak.autogen is
> used?
-- 
蒋鑫

北京群英汇信息技术有限公司
邮件: worldhello.net@gmail.com
网址: http://www.ossxp.com/
博客: http://www.worldhello.net/
微博: http://weibo.com/gotgit/
电话: 010-51262007, 18601196889
Previous: Junio C HamanoNext: Stefano Lattarini
Message 5 of 9 in “Bugfix: undefined htmldir in config.mak.autogen”
  1. Bugfix: undefined htmldir in config.mak.autogenJiang Xin, Feb 19, 2013
  2. Junio C HamanoFeb 19, 2013
  3. Junio C HamanoFeb 19, 2013
  4. Junio C HamanoFeb 19, 2013
  5. Jiang XinFeb 20, 2013
  6. Stefano LattariniFeb 20, 2013
  7. Jiang XinFeb 20, 2013
  8. Stefano LattariniFeb 20, 2013
  9. John KeepingFeb 20, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.