zsh-workers
 help / color / mirror / code / Atom feed
From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: Yasuhiro KIMURA <yasu@utahime.org>
Cc: zsh-workers@zsh.org
Subject: Re: 'make install' fails when build directory is differnet from that of source tree.
Date: Sun, 31 May 2020 01:39:19 +0000	[thread overview]
Message-ID: <20200531013919.14b9899f@tarpaulin.shahaf.local2> (raw)
In-Reply-To: <20200530.180516.365810412746058204.yasu@utahime.org>

Yasuhiro KIMURA wrote on Sat, 30 May 2020 18:05 +0900:
> From: Daniel Shahaf <d.s@daniel.shahaf.name>
> 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}"

  reply	other threads:[~2020-05-31  1:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-29  6:07 Yasuhiro KIMURA
2020-05-29 22:54 ` Daniel Shahaf
2020-05-29 23:42   ` Daniel Shahaf
2020-05-30  9:05   ` Yasuhiro KIMURA
2020-05-31  1:39     ` Daniel Shahaf [this message]
2020-05-31  5:36       ` Yasuhiro KIMURA
2020-05-31  1:57     ` Daniel Shahaf
2020-05-31  7:46       ` Yasuhiro KIMURA
2020-06-01  8:03         ` Daniel Shahaf
2020-06-01 18:23           ` Yasuhiro KIMURA
2020-06-03  1:14             ` Daniel Shahaf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200531013919.14b9899f@tarpaulin.shahaf.local2 \
    --to=d.s@daniel.shahaf.name \
    --cc=yasu@utahime.org \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).