Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: 'make install' fails when build directory is differnet from that of source tree.



From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
Subject: Re: 'make install' fails when build directory is differnet from that of source tree.
Date: Fri, 29 May 2020 22:54:01 +0000

> I would prefer to fix this by making tarball builds copy the *.1 files
> from the source directory («$(sdir)» in Doc/Makefile) to the build
> directory.  This would minimize the difference: tarball builds would
> compile the man pages using yodl and git builds would copy the
> pregenerated ones.  The following patch does this.
> 
> [[[
> diff --git a/configure.ac b/configure.ac
> index e78ebf86b..c72fe72b2 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -3178,6 +3178,13 @@ AC_CONFIG_COMMANDS([stamp-h], [echo >stamp-h])
>  
>  AC_OUTPUT
>  
> +dnl Copy pre-built man pages, for tarball out-of-tree builds.
> +for manpage in ${srcdir}/Doc/*.1; do
> +  if test x"$manpage" != x*"*"*; then
> +    cp ${manpage} ./Doc/
> +  fi
> +done
> +
>  eval "zshbin1=${bindir}"
>  eval "zshbin2=${zshbin1}"
>  eval "zshman1=${mandir}"
> ]]]
> 
> If you could test it (by applying it to «configure»), that'd be great.

Thank you for patch. I tested it and there are 3 items to report.

[Testing patch with source from tarball]

I applied the patch to source from tarball with following steps.

cd /tmp/zsh/source
tar xfpvJ /somewhere/zsh-5.8.tar.xz
cd zsh-5.8
patch -p1 -s -i /path/to/patch
./Util/preconfig

Then 'make install' succeeds with both in-tree and out-of-tree
builds. However, as you mentioned in other mail './configure' of
in-tree build complains as following.

cp: './Doc/zsh.1' and './Doc/zsh.1' are the same file
cp: './Doc/zshall.1' and './Doc/zshall.1' are the same file
cp: './Doc/zshbuiltins.1' and './Doc/zshbuiltins.1' are the same file
cp: './Doc/zshcalsys.1' and './Doc/zshcalsys.1' are the same file
cp: './Doc/zshcompctl.1' and './Doc/zshcompctl.1' are the same file
cp: './Doc/zshcompsys.1' and './Doc/zshcompsys.1' are the same file
cp: './Doc/zshcompwid.1' and './Doc/zshcompwid.1' are the same file
cp: './Doc/zshcontrib.1' and './Doc/zshcontrib.1' are the same file
cp: './Doc/zshexpn.1' and './Doc/zshexpn.1' are the same file
cp: './Doc/zshmisc.1' and './Doc/zshmisc.1' are the same file
cp: './Doc/zshmodules.1' and './Doc/zshmodules.1' are the same file
cp: './Doc/zshoptions.1' and './Doc/zshoptions.1' are the same file
cp: './Doc/zshparam.1' and './Doc/zshparam.1' are the same file
cp: './Doc/zshroadmap.1' and './Doc/zshroadmap.1' are the same file
cp: './Doc/zshtcpsys.1' and './Doc/zshtcpsys.1' are the same file
cp: './Doc/zshzftpsys.1' and './Doc/zshzftpsys.1' are the same file
cp: './Doc/zshzle.1' and './Doc/zshzle.1' are the same file 

[Testing patch with source from git repository]

I applied the patch to source from git repository with following
steps.

cd /tmp/zsh/source
cd zsh
git clone https://git.code.sf.net/p/zsh/code zsh
git checkout zsh-5.8
git apply /path/to/patch
./Util/preconfig

As with tarball case, 'make install' succeeds with both in-tree and
out-of-ree builds. In this case, however, './configure' of both builds
complains such as following.

cp: cannot stat '/tmp/zsh/source/zsh/Doc/*.1': No such file or directory

[Similar problem with help files]

Similar problem happens with 'make install.runhelp' when build is
out-of-source and source is from tarball.

cd /tmp/zsh/source
tar xfpvJ /somewhere/zsh-5.8.tar.xz
cd /tmp/zsh/build
/tmp/zsh/source/zsh-5.8/configure --srcdir=/tmp/zsh/source/zsh-5.8
make DESTDIR=/tmp/zsh/install install.runhelp

These steps result in following error.

make[1]: Entering directory '/tmp/zsh/build/Doc'
if test x"/usr/local/share/zsh/5.8/help" != x""; then \
    /bin/sh /tmp/zsh/source/zsh-5.8/mkinstalldirs /tmp/zsh/install/usr/local/share/zsh/5.8/help; \
    /bin/install -c -m 644 help/* /tmp/zsh/install/usr/local/share/zsh/5.8/help; \
    while read from to; do \
        rm -f /tmp/zsh/install/usr/local/share/zsh/5.8/help/$to || : ; \
        ln -s $from /tmp/zsh/install/usr/local/share/zsh/5.8/help/$to; \
    done < help.txt; \
fi
/bin/install: cannot stat 'help/*': No such file or directory
/bin/sh: 4: cannot open help.txt: No such file
make[1]: *** [Makefile:482: install.runhelp] Error 2
make[1]: Leaving directory '/tmp/zsh/build/Doc'
make: *** [Makefile:226: install.runhelp] Error 2

Best Regards.

---
Yasuhiro KIMURA


Messages sorted by: Reverse Date, Date, Thread, Author