doc: buildsystem fixes - use correct pathes (make gmake dist-docs from toplevel directory work) - configure detects perl as tools/configure does Signed-off-by: Christoph Egger <chegger@amazon.de> Reviewed-by: Matthew Wilson <msw@amazon.de> diff -r f1ed2ada40b8 -r fe9b7562b2c8 config/Docs.mk.in --- a/config/Docs.mk.in Tue Mar 12 14:19:36 2013 +0000 +++ b/config/Docs.mk.in Fri May 10 13:44:43 2013 +0000 @@ -11,3 +11,4 @@ POD2HTML := @POD2HTML@ POD2TEXT := @POD2TEXT@ MARKDOWN := @MARKDOWN@ +PERL := @PERL@ diff -r f1ed2ada40b8 -r fe9b7562b2c8 docs/Makefile --- a/docs/Makefile Tue Mar 12 14:19:36 2013 +0000 +++ b/docs/Makefile Fri May 10 13:44:43 2013 +0000 @@ -1,5 +1,3 @@ -#!/usr/bin/make -f - XEN_ROOT=$(CURDIR)/.. include $(XEN_ROOT)/Config.mk -include $(XEN_ROOT)/config/Docs.mk @@ -75,7 +73,7 @@ .PHONY: distclean distclean: clean - rm -rf ../config/Docs.mk config.log config.status config.cache \ + rm -rf $(XEN_ROOT)/config/Docs.mk config.log config.status config.cache \ autom4te.cache .PHONY: install @@ -88,8 +86,8 @@ cp -R man5 $(DESTDIR)$(MANDIR) [ ! -d html ] || cp -R html $(DESTDIR)$(DOCDIR) -html/index.html: $(DOC_HTML) ./gen-html-index INDEX - perl -w -- ./gen-html-index -i INDEX html $(DOC_HTML) +html/index.html: $(DOC_HTML) $(CURDIR)/gen-html-index INDEX + $(PERL) -w -- $(CURDIR)/gen-html-index -i INDEX html $(DOC_HTML) html/%.html: %.markdown $(INSTALL_DIR) $(@D) @@ -123,13 +121,13 @@ @echo "pod2html not installed; skipping $<." endif -html/hypercall/index.html: ./xen-headers +html/hypercall/index.html: $(CURDIR)/xen-headers rm -rf $(@D) $(INSTALL_DIR) $(@D) - ./xen-headers -O $(@D) \ + $(PERL) -w $(CURDIR)/xen-headers -O $(@D) \ -T ''arch-x86_64 - Xen public headers'' \ -X arch-x86_32 -X xen-x86_32 -X arch-arm \ - ../xen include/public include/xen/errno.h + $(XEN_ROOT)/xen include/public include/xen/errno.h -include html/hypercall/.deps diff -r f1ed2ada40b8 -r fe9b7562b2c8 docs/configure.ac --- a/docs/configure.ac Tue Mar 12 14:19:36 2013 +0000 +++ b/docs/configure.ac Fri May 10 13:44:43 2013 +0000 @@ -10,6 +10,7 @@ # M4 Macro includes m4_include([../m4/docs_tool.m4]) +m4_include([../m4/path_or_fail.m4]) AX_DOCS_TOOL_PROG([FIG2DEV], [fig2dev]) AX_DOCS_TOOL_PROG([POD2MAN], [pod2man]) @@ -17,4 +18,7 @@ AX_DOCS_TOOL_PROG([POD2TEXT], [pod2text]) AX_DOCS_TOOL_PROGS([MARKDOWN], [markdown], [markdown markdown_py]) +AC_ARG_VAR([PERL], [Path to Perl parser]) +AX_PATH_PROG_OR_FAIL([PERL], [perl]) + AC_OUTPUT() _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
On Fri, 2013-05-10 at 15:07 +0100, Christoph Egger wrote:> doc: buildsystem fixes > > - use correct pathes (make gmake dist-docs from toplevel directory work)This ("make dist-docs") seems to work for me, how does it fail for you?> - configure detects perl as tools/configure does > > Signed-off-by: Christoph Egger <chegger@amazon.de> > Reviewed-by: Matthew Wilson <msw@amazon.de>Regardless of the above this patch is in itself correct so: Acked + applied.
On 13.05.13 12:44, Ian Campbell wrote:> On Fri, 2013-05-10 at 15:07 +0100, Christoph Egger wrote: >> doc: buildsystem fixes >> >> - use correct pathes (make gmake dist-docs from toplevel directory work) > > This ("make dist-docs") seems to work for me, how does it fail for you?On the toplevel directory ''../xen'' and ''../config'' point to non-existent directories. On the toplevel directory ''./gen-html-index'' does not exist.>> - configure detects perl as tools/configure does >> >> Signed-off-by: Christoph Egger <chegger@amazon.de> >> Reviewed-by: Matthew Wilson <msw@amazon.de> > > Regardless of the above this patch is in itself correct so: > Acked + applied.Thanks. Christoph
On Mon, 2013-05-13 at 12:25 +0100, Christoph Egger wrote:> On 13.05.13 12:44, Ian Campbell wrote: > > On Fri, 2013-05-10 at 15:07 +0100, Christoph Egger wrote: > >> doc: buildsystem fixes > >> > >> - use correct pathes (make gmake dist-docs from toplevel directory work) > > > > This ("make dist-docs") seems to work for me, how does it fail for you? > > On the toplevel directory ''../xen'' and ''../config'' point to > non-existent directories. > On the toplevel directory ''./gen-html-index'' does not exist.I''m confused. By toplevel you mean "xen.git" and not "xen.git/docs", right? make dist-docs turns into "make -C docs install" (with DESTDIR set) so at the time ../xen or ../config are evaluated you should be in xen.git/docs. Or are you saying that you are extracting the docs subdir out to elsewhere? Perhaps you are doing an out of tree build or something else complex? I''m not suggesting your changes are wrong. I''d just like to understand the breakage... Ian.
On 13.05.13 13:34, Ian Campbell wrote:> On Mon, 2013-05-13 at 12:25 +0100, Christoph Egger wrote: >> On 13.05.13 12:44, Ian Campbell wrote: >>> On Fri, 2013-05-10 at 15:07 +0100, Christoph Egger wrote: >>>> doc: buildsystem fixes >>>> >>>> - use correct pathes (make gmake dist-docs from toplevel directory work) >>> >>> This ("make dist-docs") seems to work for me, how does it fail for you? >> >> On the toplevel directory ''../xen'' and ''../config'' point to >> non-existent directories. >> On the toplevel directory ''./gen-html-index'' does not exist. > > I''m confused. By toplevel you mean "xen.git" and not "xen.git/docs", > right?Yes.> make dist-docs turns into "make -C docs install" (with DESTDIR set) so > at the time ../xen or ../config are evaluated you should be in > xen.git/docs. > > Or are you saying that you are extracting the docs subdir out to > elsewhere? Perhaps you are doing an out of tree build or something else > complex?No. My build procedure is: - run configure - gmake -jN dist-xen - gmake -jN dist-tools - gmake dist-docs> I''m not suggesting your changes are wrong. I''d just like to understand > the breakage...I retried w/o my patch to get the error message: xen.git$ gmake dist-docs [...] ./xen-headers -O html/hypercall \ -T ''arch-x86_64 - Xen public headers'' \ -X arch-x86_32 -X xen-x86_32 -X arch-arm \ ../xen include/public include/xen/errno.h gmake[1]: ./xen-headers: Command not found gmake[1]: *** [html/hypercall/index.html] Error 127 gmake[1]: Leaving directory `/home/chegger/xen.git/docs'' gmake: *** [install-docs] Error 2 xen.git$ Since I am on the toplevel directory (or the shell at least) calling ./xen-headers can''t be found, of course. That''s my thinking. I also made general cleanup to make ''docs'' consistent with the other parts of the buildsystem. Christoph
On Mon, 2013-05-13 at 13:11 +0100, Christoph Egger wrote:> On 13.05.13 13:34, Ian Campbell wrote: > > On Mon, 2013-05-13 at 12:25 +0100, Christoph Egger wrote: > >> On 13.05.13 12:44, Ian Campbell wrote: > >>> On Fri, 2013-05-10 at 15:07 +0100, Christoph Egger wrote: > >>>> doc: buildsystem fixes > >>>> > >>>> - use correct pathes (make gmake dist-docs from toplevel directory work) > >>> > >>> This ("make dist-docs") seems to work for me, how does it fail for you? > >> > >> On the toplevel directory ''../xen'' and ''../config'' point to > >> non-existent directories. > >> On the toplevel directory ''./gen-html-index'' does not exist. > > > > I''m confused. By toplevel you mean "xen.git" and not "xen.git/docs", > > right? > > Yes. > > > make dist-docs turns into "make -C docs install" (with DESTDIR set) so > > at the time ../xen or ../config are evaluated you should be in > > xen.git/docs. > > > > Or are you saying that you are extracting the docs subdir out to > > elsewhere? Perhaps you are doing an out of tree build or something else > > complex? > > No. > My build procedure is: > > - run configure > - gmake -jN dist-xen > - gmake -jN dist-tools > - gmake dist-docs > > > I''m not suggesting your changes are wrong. I''d just like to understand > > the breakage... > > I retried w/o my patch to get the error message: > > xen.git$ gmake dist-docs > [...] > ./xen-headers -O html/hypercall \ > -T ''arch-x86_64 - Xen public headers'' \ > -X arch-x86_32 -X xen-x86_32 -X arch-arm \ > ../xen include/public include/xen/errno.h > gmake[1]: ./xen-headers: Command not found > gmake[1]: *** [html/hypercall/index.html] Error 127 > gmake[1]: Leaving directory `/home/chegger/xen.git/docs'' > gmake: *** [install-docs] Error 2 > xen.git$ > > Since I am on the toplevel directory (or the shell at least) > calling ./xen-headers can''t be found, of course. That''s my thinking.I think you are mistaken, since the Leaving directory `/home/chegger/xen.git/docs'' tells us that gmake previously entered this directory. That is how make (not just gmake) normally operates and is what "make -C docs" does. Prior to your recent patch the invocation of ./xen-headers was via: perl -w -- ./gen-html-index Which is not consistent with your logs above. Do you have some other local patches which remove the "perl -w -- " prefix? If you cropped it from the logs by mistake then the "Command not found" likely refers to "perl" and not "./xen-headers". If you are trying to execute ./gen-html-index directly then the "Command not found" might be down to the shebang in the script which refers to /usr/bin/perl, which doesn''t exist for you. On Linux that would come out as "Bad interpreter", but NetBSD may differ I suppose. Ian.
At 14:11 +0200 on 13 May (1368454317), Christoph Egger wrote:> On 13.05.13 13:34, Ian Campbell wrote: > > I''m not suggesting your changes are wrong. I''d just like to understand > > the breakage... > > I retried w/o my patch to get the error message: > > xen.git$ gmake dist-docs > [...] > ./xen-headers -O html/hypercall \ > -T ''arch-x86_64 - Xen public headers'' \ > -X arch-x86_32 -X xen-x86_32 -X arch-arm \ > ../xen include/public include/xen/errno.h > gmake[1]: ./xen-headers: Command not found > gmake[1]: *** [html/hypercall/index.html] Error 127 > gmake[1]: Leaving directory `/home/chegger/xen.git/docs'' > gmake: *** [install-docs] Error 2 > xen.git$ > > Since I am on the toplevel directory (or the shell at least) > calling ./xen-headers can''t be found, of course. That''s my thinking.make has gone into docs/ for you -- I suspect the ''Command not found'' comes from the ''#!/usr/bin/perl -w'' at the top of docs/xen-headers, and so the important change in the patch is to use $(PERL) in the invocation. Cheers, Tim.
On 13.05.13 14:23, Ian Campbell wrote:> On Mon, 2013-05-13 at 13:11 +0100, Christoph Egger wrote: >> On 13.05.13 13:34, Ian Campbell wrote: >>> On Mon, 2013-05-13 at 12:25 +0100, Christoph Egger wrote: >>>> On 13.05.13 12:44, Ian Campbell wrote: >>>>> On Fri, 2013-05-10 at 15:07 +0100, Christoph Egger wrote: >>>>>> doc: buildsystem fixes >>>>>> >>>>>> - use correct pathes (make gmake dist-docs from toplevel directory work) >>>>> >>>>> This ("make dist-docs") seems to work for me, how does it fail for you? >>>> >>>> On the toplevel directory ''../xen'' and ''../config'' point to >>>> non-existent directories. >>>> On the toplevel directory ''./gen-html-index'' does not exist. >>> >>> I''m confused. By toplevel you mean "xen.git" and not "xen.git/docs", >>> right? >> >> Yes. >> >>> make dist-docs turns into "make -C docs install" (with DESTDIR set) so >>> at the time ../xen or ../config are evaluated you should be in >>> xen.git/docs. >>> >>> Or are you saying that you are extracting the docs subdir out to >>> elsewhere? Perhaps you are doing an out of tree build or something else >>> complex? >> >> No. >> My build procedure is: >> >> - run configure >> - gmake -jN dist-xen >> - gmake -jN dist-tools >> - gmake dist-docs >> >>> I''m not suggesting your changes are wrong. I''d just like to understand >>> the breakage... >> >> I retried w/o my patch to get the error message: >> >> xen.git$ gmake dist-docs >> [...] >> ./xen-headers -O html/hypercall \ >> -T ''arch-x86_64 - Xen public headers'' \ >> -X arch-x86_32 -X xen-x86_32 -X arch-arm \ >> ../xen include/public include/xen/errno.h >> gmake[1]: ./xen-headers: Command not found >> gmake[1]: *** [html/hypercall/index.html] Error 127 >> gmake[1]: Leaving directory `/home/chegger/xen.git/docs'' >> gmake: *** [install-docs] Error 2 >> xen.git$ >> >> Since I am on the toplevel directory (or the shell at least) >> calling ./xen-headers can''t be found, of course. That''s my thinking. > > I think you are mistaken, since the > Leaving directory `/home/chegger/xen.git/docs'' > tells us that gmake previously entered this directory. That is how make > (not just gmake) normally operates and is what "make -C docs" does. > > Prior to your recent patch the invocation of ./xen-headers was via: > perl -w -- ./gen-html-index > Which is not consistent with your logs above. Do you have some other > local patches which remove the "perl -w -- " prefix?No, there is no other local patch in docs/ Same lines with my patch: /usr/pkg/bin/perl -w /home/chegger/xen.git/docs/xen-headers -O html/hypercall \ -T ''arch-x86_64 - Xen public headers'' \ -X arch-x86_32 -X xen-x86_32 -X arch-arm \ /home/chegger/xen.git/docs/../xen include/public include/xen/errno.h /usr/pkg/bin/perl -w -- /home/chegger/xen.git/docs/gen-html-index -i INDEX html html/misc/hvm-emulated-unplug.html html/misc/xl-numa-placement.html html/misc/efi.html html/misc/qemu-upstream_howto_use_it.html html/misc/xl-network-configuration.html html/misc/xen-command-line.html html/misc/xenstore-paths.html html/misc/coverage.html html/man/xm.1.html html/man/xl.1.html html/man/xl.conf.5.html html/man/xend-config.sxp.5.html html/man/xl.cfg.5.html html/man/xmdomain.cfg.5.html html/man/xlcpupool.cfg.5.html html/misc/dump-core-format.txt html/misc/kexec_and_kdump.txt html/misc/grant-tables.txt html/misc/xenpaging.txt html/misc/vtpm.txt html/misc/xen-error-handling.txt html/misc/xsm-flask.txt html/misc/console.txt html/misc/vtd.txt html/misc/distro_mapping.txt html/misc/libxl_memory.txt html/ misc/crashdb.txt html/misc/xl-disk-configuration.txt html/misc/sedf_scheduler_mini-HOWTO.txt html/misc/xenstore.txt html/misc/vbd-interface.txt html/misc/tscmode.txt html/hypercall/index.ht! ml> If you cropped it from the logs by mistake then the "Command not found" > likely refers to "perl" and not "./xen-headers". > > If you are trying to execute ./gen-html-index directly then the "Command > not found" might be down to the shebang in the script which refers > to /usr/bin/perl, which doesn''t exist for you.Yes, make configure to define $(PERL) is the real fix as Tim stated out in the other mail.> On Linux that would come out as "Bad interpreter", but NetBSD may differ > I suppose.More likely a difference to the korn-shell: xen.git/docs$ ./xen-headers ksh: ./xen-headers: No such file or directory xen.git/docs$ ./gen-html-index ksh: ./gen-html-index: cannot execute - Permission denied xen.git/docs$ Christoph