From: Junio C Hamano Date: Tue, 19 Feb 2013 23:40:16 GMT Subject: Re: [PATCH] Bugfix: undefined htmldir in config.mak.autogen Message-ID: <7v4nh750v3.fsf@alter.siamese.dyndns.org> In-Reply-To: <7v8v6j52qf.fsf@alter.siamese.dyndns.org> Junio C Hamano writes: > Jiang Xin writes: > >> Html documents will be installed to root dir (/) no matter what prefix >> is set, if run these commands before `make` and `make install-html`: >> >> $ make configure >> $ ./configure --prefix= >> >> After the installation, all the html documents will copy to rootdir (/), >> and: >> >> $ git --html-path >> >> >> $ git help -w something >> fatal: '': 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 but /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 to it in system_path(). What I was describing was what happens when you only mention @docdir@ but not PACKAGE_TARNAME in the file. > 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. 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?