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.



Yasuhiro KIMURA wrote on Sat, 30 May 2020 18:05 +0900:
> 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.
> 

Thanks for testing.  More below.

> [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/zshzle.1' and './Doc/zshzle.1' are the same file 

I'm attaching a revised patch which should resolve this.

> [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

The revised patch attached should resolve this, too.

I'll reply to the third issue separately.

Thanks for the thorough testing,

Daniel

diff --git a/configure.ac b/configure.ac
index e78ebf86b..eed458849 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 `cd ${srcdir} && echo Doc/*.1`; do
+  if test x"$manpage" != x"Doc/*.1" && ! test -e "${manpage}"; then
+    cp ${srcdir}/${manpage} ./Doc/
+  fi
+done
+
 eval "zshbin1=${bindir}"
 eval "zshbin2=${zshbin1}"
 eval "zshman1=${mandir}"



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