From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 29093 invoked from network); 29 May 2020 22:55:00 -0000 Received: from ns1.primenet.com.au (HELO primenet.com.au) (203.24.36.2) by inbox.vuxu.org with ESMTPUTF8; 29 May 2020 22:55:00 -0000 Received: (qmail 11121 invoked by alias); 29 May 2020 22:54:48 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 45937 Received: (qmail 18509 invoked by uid 1010); 29 May 2020 22:54:48 -0000 X-Qmail-Scanner-Diagnostics: from out3-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.3/25821. spamassassin: 3.4.4. Clear:RC:0(66.111.4.27):SA:0(-2.6/5.0):. Processed in 4.849253 secs); 29 May 2020 22:54:48 -0000 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at daniel.shahaf.name does not designate permitted sender hosts) X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedruddvledgudefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfgjfhfogggtgfesthhqtddtredtjeenucfhrhhomhepffgrnhhi vghlucfuhhgrhhgrfhcuoegurdhssegurghnihgvlhdrshhhrghhrghfrdhnrghmvgeqne cuggftrfgrthhtvghrnhepieejvdefgffgtdeuheeutefhgeetieevgefgjeevveegteei jeetheefuefgjeffnecuffhomhgrihhnpeihohdrnhhopdhvvghrshhiohhnrdhmkhdpmh hkrdhnohenucfkphepjeelrddujeeirdefledrieelnecuvehluhhsthgvrhfuihiivgep tdenucfrrghrrghmpehmrghilhhfrhhomhepugdrshesuggrnhhivghlrdhshhgrhhgrfh drnhgrmhgv X-ME-Proxy: Date: Fri, 29 May 2020 22:54:01 +0000 From: Daniel Shahaf To: Yasuhiro KIMURA Cc: zsh-workers@zsh.org Subject: Re: 'make install' fails when build directory is differnet from that of source tree. Message-ID: <20200529225401.640a2b75@tarpaulin.shahaf.local2> In-Reply-To: <20200529.150752.1706439437681626208.yasu@utahime.org> References: <20200529.150752.1706439437681626208.yasu@utahime.org> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Yasuhiro KIMURA wrote on Fri, 29 May 2020 15:07 +0900: > 1. cd /tmp/zsh/source > 2. tar xfpvJ /somewhere/zsh-5.8.tar.xz > 3. cd /tmp/zsh/build > 4. /tmp/zsh/source/zsh-5.8/configure --srcdir=3D/tmp/zsh/source/zsh-5.8 > 5. make > 6. make DESTDIR=3D/tmp/zsh/install install > ---------------------------------------------------------------------- > make[1]: Entering directory '/tmp/zsh/build/Doc' > /bin/sh /tmp/zsh/source/zsh-5.8/mkinstalldirs /tmp/zsh/install/usr/local/= share/man/man1 > mkdir -m 755 -p -- /tmp/zsh/install/usr/local/share/man/man1 > for file in zsh.1 zshbuiltins.1 zshcalsys.1 zshcompctl.1 zshcompwid.1 zsh= compsys.1 zshcontrib.1 zshexpn.1 zshmisc.1 zshmodules.1 zshoptions.1 zshpar= am.1 zshroadmap.1 zshtcpsys.1 zshzftpsys.1 zshzle.1 zshall.1; do \ > test -s $file || exit 1; \ > /bin/install -c -m 644 $file /tmp/zsh/install/usr/local/share/man/man= 1/`echo $file | sed 's|zsh|zsh|'` || exit 1; \done > make[1]: *** [Makefile:474: install.man] Error 1 > make[1]: Leaving directory '/tmp/zsh/build/Doc' > make: *** [Makefile:222: install.man] Error 2 I can reproduce this. I added =C2=ABset -x=C2=BB to Doc/Makefile [sic] in front of the loop. It fails on =C2=ABtest -s zsh.1=C2=BB. > But if I checked out source tree from git repository such problem > doesn't happen. Good catch. > Why such difference happens? And how it is fixed? In git builds the manual pages are generated in the build directory. I made it work this way a few years ago (workers/43692, commit zsh-5.6.2-54-g76a16498d) on the principle that the source directory should never be written to by out-of-tree builds. (That fix only was a step in the right direction, rather than a complete fix. =C2=ABmake=C2=BB = still puts some files in the source directory.) In contrast, in tarball builds pre-build manual pages are shipped in the tarball, so they'll be found in the source directory (/tmp/zsh/source/Doc/*= .1) rather than the build directory (/tmp/zsh/build/Doc/*.1). I suppose we don't require yodl for tarball builds. In Doc/Makefile rule there is ".yo.1" suffix rule that's supposed to generate man pages. In tarball out-of-tree builds, the commands of that rule don't run because neither the target file nor any of its dependencies exist. I'm appending the relevant part of make(1) debug output for reference. I would prefer to fix this by making tarball builds copy the *.1 files from the source directory (=C2=AB$(sdir)=C2=BB 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]) =20 AC_OUTPUT =20 +dnl Copy pre-built man pages, for tarball out-of-tree builds. +for manpage in ${srcdir}/Doc/*.1; do + if test x"$manpage" !=3D x*"*"*; then + cp ${manpage} ./Doc/ + fi +done + eval "zshbin1=3D${bindir}" eval "zshbin2=3D${zshbin1}" eval "zshman1=3D${mandir}" ]]] If you could test it (by applying it to =C2=ABconfigure=C2=BB), that'd be g= reat. Thanks for the bug report and for pinpointing the problem! Daniel [[[ % make -dC Doc Considering target file 'zsh.1'. Looking for an implicit rule for 'zsh.1'. Trying pattern rule with stem 'zsh'. Trying implicit prerequisite 'zsh.yo'. Found an implicit rule for 'zsh.1'. Considering target file 'zsh.yo'. Looking for an implicit rule for 'zsh.yo'. Trying pattern rule with stem 'zsh.yo'. Trying implicit prerequisite 'zsh.yo,v'. Trying pattern rule with stem 'zsh.yo'. Trying implicit prerequisite 'RCS/zsh.yo,v'. Trying pattern rule with stem 'zsh.yo'. Trying implicit prerequisite 'RCS/zsh.yo'. Trying pattern rule with stem 'zsh.yo'. Trying implicit prerequisite 's.zsh.yo'. Trying pattern rule with stem 'zsh.yo'. Trying implicit prerequisite 'SCCS/s.zsh.yo'. No implicit rule found for 'zsh.yo'. Finished prerequisites of target file 'zsh.yo'. No need to remake target 'zsh.yo'; using VPATH name '../../tarball/Do= c/zsh.yo'. Considering target file 'version.yo'. Considering target file '../../tarball/Config/version.mk'. Looking for an implicit rule for '../../tarball/Config/version.mk'. Trying pattern rule with stem 'version.mk'. Trying implicit prerequisite '../../tarball/Config/version.mk,v'. Trying pattern rule with stem 'version.mk'. Trying implicit prerequisite '../../tarball/Config/RCS/version.mk,= v'. Trying pattern rule with stem 'version.mk'. Trying implicit prerequisite '../../tarball/Config/RCS/version.mk'. Trying pattern rule with stem 'version.mk'. Trying implicit prerequisite '../../tarball/Config/s.version.mk'. Trying pattern rule with stem 'version.mk'. Trying implicit prerequisite '../../tarball/Config/SCCS/s.version.= mk'. No implicit rule found for '../../tarball/Config/version.mk'. Finished prerequisites of target file '../../tarball/Config/versio= n.mk'. No need to remake target '../../tarball/Config/version.mk'. Finished prerequisites of target file 'version.yo'. Prerequisite '../../tarball/Config/version.mk' is older than target = 'version.yo'. No need to remake target 'version.yo'; using VPATH name '../../tarbal= l/Doc/version.yo'. Considering target file 'zmacros.yo'. Looking for an implicit rule for 'zmacros.yo'. Trying pattern rule with stem 'zmacros.yo'. Trying implicit prerequisite 'zmacros.yo,v'. Trying pattern rule with stem 'zmacros.yo'. Trying implicit prerequisite 'RCS/zmacros.yo,v'. Trying pattern rule with stem 'zmacros.yo'. Trying implicit prerequisite 'RCS/zmacros.yo'. Trying pattern rule with stem 'zmacros.yo'. Trying implicit prerequisite 's.zmacros.yo'. Trying pattern rule with stem 'zmacros.yo'. Trying implicit prerequisite 'SCCS/s.zmacros.yo'. No implicit rule found for 'zmacros.yo'. Finished prerequisites of target file 'zmacros.yo'. No need to remake target 'zmacros.yo'; using VPATH name '../../tarbal= l/Doc/zmacros.yo'. Considering target file 'zman.yo'. Looking for an implicit rule for 'zman.yo'. Trying pattern rule with stem 'zman.yo'. Trying implicit prerequisite 'zman.yo,v'. Trying pattern rule with stem 'zman.yo'. Trying implicit prerequisite 'RCS/zman.yo,v'. Trying pattern rule with stem 'zman.yo'. Trying implicit prerequisite 'RCS/zman.yo'. Trying pattern rule with stem 'zman.yo'. Trying implicit prerequisite 's.zman.yo'. Trying pattern rule with stem 'zman.yo'. Trying implicit prerequisite 'SCCS/s.zman.yo'. No implicit rule found for 'zman.yo'. Finished prerequisites of target file 'zman.yo'. No need to remake target 'zman.yo'; using VPATH name '../../tarball/D= oc/zman.yo'. Considering target file 'Zsh/intro.yo'. Looking for an implicit rule for 'Zsh/intro.yo'. Trying pattern rule with stem 'intro.yo'. Trying implicit prerequisite 'Zsh/intro.yo,v'. Trying pattern rule with stem 'intro.yo'. Trying implicit prerequisite 'Zsh/RCS/intro.yo,v'. Trying pattern rule with stem 'intro.yo'. Trying implicit prerequisite 'Zsh/RCS/intro.yo'. Trying pattern rule with stem 'intro.yo'. Trying implicit prerequisite 'Zsh/s.intro.yo'. Trying pattern rule with stem 'intro.yo'. Trying implicit prerequisite 'Zsh/SCCS/s.intro.yo'. No implicit rule found for 'Zsh/intro.yo'. Finished prerequisites of target file 'Zsh/intro.yo'. No need to remake target 'Zsh/intro.yo'; using VPATH name '../../tarb= all/Doc/Zsh/intro.yo'. Considering target file 'Zsh/metafaq.yo'. Looking for an implicit rule for 'Zsh/metafaq.yo'. Trying pattern rule with stem 'metafaq.yo'. Trying implicit prerequisite 'Zsh/metafaq.yo,v'. Trying pattern rule with stem 'metafaq.yo'. Trying implicit prerequisite 'Zsh/RCS/metafaq.yo,v'. Trying pattern rule with stem 'metafaq.yo'. Trying implicit prerequisite 'Zsh/RCS/metafaq.yo'. Trying pattern rule with stem 'metafaq.yo'. Trying implicit prerequisite 'Zsh/s.metafaq.yo'. Trying pattern rule with stem 'metafaq.yo'. Trying implicit prerequisite 'Zsh/SCCS/s.metafaq.yo'. No implicit rule found for 'Zsh/metafaq.yo'. Finished prerequisites of target file 'Zsh/metafaq.yo'. No need to remake target 'Zsh/metafaq.yo'; using VPATH name '../../ta= rball/Doc/Zsh/metafaq.yo'. Considering target file 'Zsh/invoke.yo'. Looking for an implicit rule for 'Zsh/invoke.yo'. Trying pattern rule with stem 'invoke.yo'. Trying implicit prerequisite 'Zsh/invoke.yo,v'. Trying pattern rule with stem 'invoke.yo'. Trying implicit prerequisite 'Zsh/RCS/invoke.yo,v'. Trying pattern rule with stem 'invoke.yo'. Trying implicit prerequisite 'Zsh/RCS/invoke.yo'. Trying pattern rule with stem 'invoke.yo'. Trying implicit prerequisite 'Zsh/s.invoke.yo'. Trying pattern rule with stem 'invoke.yo'. Trying implicit prerequisite 'Zsh/SCCS/s.invoke.yo'. No implicit rule found for 'Zsh/invoke.yo'. Finished prerequisites of target file 'Zsh/invoke.yo'. No need to remake target 'Zsh/invoke.yo'; using VPATH name '../../tar= ball/Doc/Zsh/invoke.yo'. Considering target file 'Zsh/files.yo'. Looking for an implicit rule for 'Zsh/files.yo'. Trying pattern rule with stem 'files.yo'. Trying implicit prerequisite 'Zsh/files.yo,v'. Trying pattern rule with stem 'files.yo'. Trying implicit prerequisite 'Zsh/RCS/files.yo,v'. Trying pattern rule with stem 'files.yo'. Trying implicit prerequisite 'Zsh/RCS/files.yo'. Trying pattern rule with stem 'files.yo'. Trying implicit prerequisite 'Zsh/s.files.yo'. Trying pattern rule with stem 'files.yo'. Trying implicit prerequisite 'Zsh/SCCS/s.files.yo'. No implicit rule found for 'Zsh/files.yo'. Finished prerequisites of target file 'Zsh/files.yo'. No need to remake target 'Zsh/files.yo'; using VPATH name '../../tarb= all/Doc/Zsh/files.yo'. Considering target file 'Zsh/filelist.yo'. Looking for an implicit rule for 'Zsh/filelist.yo'. Trying pattern rule with stem 'filelist.yo'. Trying implicit prerequisite 'Zsh/filelist.yo,v'. Trying pattern rule with stem 'filelist.yo'. Trying implicit prerequisite 'Zsh/RCS/filelist.yo,v'. Trying pattern rule with stem 'filelist.yo'. Trying implicit prerequisite 'Zsh/RCS/filelist.yo'. Trying pattern rule with stem 'filelist.yo'. Trying implicit prerequisite 'Zsh/s.filelist.yo'. Trying pattern rule with stem 'filelist.yo'. Trying implicit prerequisite 'Zsh/SCCS/s.filelist.yo'. No implicit rule found for 'Zsh/filelist.yo'. Finished prerequisites of target file 'Zsh/filelist.yo'. No need to remake target 'Zsh/filelist.yo'; using VPATH name '../../t= arball/Doc/Zsh/filelist.yo'. Pruning file '../../tarball/Doc/Zsh/filelist.yo'. Considering target file 'Zsh/seealso.yo'. Looking for an implicit rule for 'Zsh/seealso.yo'. Trying pattern rule with stem 'seealso.yo'. Trying implicit prerequisite 'Zsh/seealso.yo,v'. Trying pattern rule with stem 'seealso.yo'. Trying implicit prerequisite 'Zsh/RCS/seealso.yo,v'. Trying pattern rule with stem 'seealso.yo'. Trying implicit prerequisite 'Zsh/RCS/seealso.yo'. Trying pattern rule with stem 'seealso.yo'. Trying implicit prerequisite 'Zsh/s.seealso.yo'. Trying pattern rule with stem 'seealso.yo'. Trying implicit prerequisite 'Zsh/SCCS/s.seealso.yo'. No implicit rule found for 'Zsh/seealso.yo'. Finished prerequisites of target file 'Zsh/seealso.yo'. No need to remake target 'Zsh/seealso.yo'; using VPATH name '../../ta= rball/Doc/Zsh/seealso.yo'. Considering target file 'Zsh/compat.yo'. Looking for an implicit rule for 'Zsh/compat.yo'. Trying pattern rule with stem 'compat.yo'. Trying implicit prerequisite 'Zsh/compat.yo,v'. Trying pattern rule with stem 'compat.yo'. Trying implicit prerequisite 'Zsh/RCS/compat.yo,v'. Trying pattern rule with stem 'compat.yo'. Trying implicit prerequisite 'Zsh/RCS/compat.yo'. Trying pattern rule with stem 'compat.yo'. Trying implicit prerequisite 'Zsh/s.compat.yo'. Trying pattern rule with stem 'compat.yo'. Trying implicit prerequisite 'Zsh/SCCS/s.compat.yo'. No implicit rule found for 'Zsh/compat.yo'. Finished prerequisites of target file 'Zsh/compat.yo'. No need to remake target 'Zsh/compat.yo'; using VPATH name '../../tar= ball/Doc/Zsh/compat.yo'. Considering target file 'Zsh/restricted.yo'. Looking for an implicit rule for 'Zsh/restricted.yo'. Trying pattern rule with stem 'restricted.yo'. Trying implicit prerequisite 'Zsh/restricted.yo,v'. Trying pattern rule with stem 'restricted.yo'. Trying implicit prerequisite 'Zsh/RCS/restricted.yo,v'. Trying pattern rule with stem 'restricted.yo'. Trying implicit prerequisite 'Zsh/RCS/restricted.yo'. Trying pattern rule with stem 'restricted.yo'. Trying implicit prerequisite 'Zsh/s.restricted.yo'. Trying pattern rule with stem 'restricted.yo'. Trying implicit prerequisite 'Zsh/SCCS/s.restricted.yo'. No implicit rule found for 'Zsh/restricted.yo'. Finished prerequisites of target file 'Zsh/restricted.yo'. No need to remake target 'Zsh/restricted.yo'; using VPATH name '../..= /tarball/Doc/Zsh/restricted.yo'. Finished prerequisites of target file 'zsh.1'. Prerequisite '../../tarball/Doc/zsh.yo' is older than target 'zsh.1'. Prerequisite '../../tarball/Doc/version.yo' is older than target 'zsh.= 1'. Prerequisite '../../tarball/Doc/zmacros.yo' is older than target 'zsh.= 1'. Prerequisite '../../tarball/Doc/zman.yo' is older than target 'zsh.1'. Prerequisite '../../tarball/Doc/Zsh/intro.yo' is older than target 'zs= h.1'. Prerequisite '../../tarball/Doc/Zsh/metafaq.yo' is older than target '= zsh.1'. Prerequisite '../../tarball/Doc/Zsh/invoke.yo' is older than target 'z= sh.1'. Prerequisite '../../tarball/Doc/Zsh/files.yo' is older than target 'zs= h.1'. Prerequisite '../../tarball/Doc/Zsh/filelist.yo' is older than target = 'zsh.1'. Prerequisite '../../tarball/Doc/Zsh/filelist.yo' is older than target = 'zsh.1'. Prerequisite '../../tarball/Doc/Zsh/seealso.yo' is older than target '= zsh.1'. Prerequisite '../../tarball/Doc/Zsh/compat.yo' is older than target 'z= sh.1'. Prerequisite '../../tarball/Doc/Zsh/restricted.yo' is older than targe= t 'zsh.1'. No need to remake target 'zsh.1'. ]]]