Roger Pau Monne
2012-Feb-21 01:35 UTC
[PATCH v7] build: add autoconf to replace custom checks in tools/check
Added autotools magic to replace custom check scripts. The previous checks have been ported to autoconf, and some additional ones have been added (plus the suggestions from running autoscan). Two files are created as a result from executing configure script, config/Tools.mk and config.h. conf/Tools.mk is included by tools/Rules.mk, and contains most of the options previously defined in .config, that can now be set passing parameters or defining environment variables when executing configure script. config.h is only used by libxl/xl to detect yajl_version.h. Changes since v6: * Readded autogen.sh. Changes since v5: * Remove dummy configure generation from autogen.sh since it''s already on the source tree. * Removed autogen.sh since it was only a wrapper for calling autoconf. * Remove comment regarding yajl_version.h from configure.ac. Changes since v4: * Updated to tip. * Include config.h from compiler command line when building libxl and xl to assure yajl_version.h presence and correctly detect yajl version. * Added glib-2.0 check with appropiate m4 macros. * Purged config.h.in from unnecessary defines that could mess with the build system. * Removed tools/config.sub, tools/config.guess, tools/configure and configure to make the patch fit mailing list limit. Changes since v3: * Copied config.guess and config.sub from automake 1.11. * Added a test to check for uuid.h on BSD and uuid/uuid.h on Linux. Changes since v2: * Changed order of config/Tools.mk include. * Added "-e" to autogen.sh shebang. * Added necessary files (config.*) and output from Autoheader and Autoconf. * Removed Autoconf from build dependencies and updated README. Changes since v1: * Moved autoconf stuff inside tools folder. * Add Makefile rules for cleaning. * Removed Automake dependency. * Create autogen.sh to automatically create configure script when building from source repository. * Cached values of options passed from command line. * Add necessary ignores to .hgignore. * Added Autoconf to the list of dependencies. * Changed hypen to underscore in XML2 and CURL variable names. * Added script to get version from xen/Makefile. * Set Ocaml tools to optional. * Added procedence of m4/ocaml.m4. Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu> .hgignore | 6 + Config.mk | 39 ------ Makefile | 2 - README | 4 + autogen.sh | 3 + config/Tools.mk.in | 50 +++++++ configure | 2 + tools/Makefile | 3 +- tools/Rules.mk | 7 +- tools/blktap/drivers/Makefile | 2 +- tools/blktap/drivers/check_gcrypt | 14 -- tools/check/Makefile | 26 ---- tools/check/README | 20 --- tools/check/check_brctl | 13 -- tools/check/check_crypto_lib | 11 - tools/check/check_curl | 13 -- tools/check/check_iproute | 15 -- tools/check/check_libaio_devel | 11 - tools/check/check_libaio_lib | 9 - tools/check/check_openssl_devel | 6 - tools/check/check_python | 13 -- tools/check/check_python_devel | 17 -- tools/check/check_python_xml | 12 - tools/check/check_udev | 22 --- tools/check/check_uuid_devel | 7 - tools/check/check_x11_devel | 9 - tools/check/check_xgettext | 6 - tools/check/check_xml2 | 14 -- tools/check/check_yajl_devel | 8 - tools/check/check_zlib_devel | 6 - tools/check/check_zlib_lib | 12 - tools/check/chk | 63 --------- tools/check/funcs.sh | 106 ---------------- tools/config.h.in | 16 ++ tools/configure.ac | 192 ++++++++++++++++++++++++++++++ tools/debugger/gdbsx/xg/Makefile | 1 - tools/install.sh | 1 + tools/libfsimage/Makefile | 6 +- tools/libfsimage/check-libext2fs | 21 --- tools/libxen/Makefile | 8 +- tools/libxl/Makefile | 7 +- tools/libxl/libxl_json.h | 2 +- tools/m4/default_lib.m4 | 8 + tools/m4/disable_feature.m4 | 13 ++ tools/m4/enable_feature.m4 | 13 ++ tools/m4/ocaml.m4 | 241 ++++++++++++++++++++++++++++++++++++++ tools/m4/path_or_fail.m4 | 6 + tools/m4/pkg.m4 | 157 ++++++++++++++++++++++++ tools/m4/python_devel.m4 | 18 ++ tools/m4/python_version.m4 | 12 + tools/m4/python_xml.m4 | 10 + tools/m4/set_cflags_ldflags.m4 | 20 +++ tools/m4/udev.m4 | 32 +++++ tools/m4/uuid.m4 | 10 + version.sh | 5 + 55 files changed, 839 insertions(+), 511 deletions(-) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Ian Jackson
2012-Feb-21 12:50 UTC
Re: [PATCH v7] build: add autoconf to replace custom checks in tools/check
Roger Pau Monne writes ("[PATCH v7] build: add autoconf to replace custom checks in tools/check"):> Added autotools magic to replace custom check scripts. The previous > checks have been ported to autoconf, and some additional ones have > been added (plus the suggestions from running autoscan). Two files are > created as a result from executing configure script, config/Tools.mk > and config.h. > > conf/Tools.mk is included by tools/Rules.mk, and contains most of the > options previously defined in .config, that can now be set passing > parameters or defining environment variables when executing configure > script. > > config.h is only used by libxl/xl to detect yajl_version.h.Thanks. Unfortunately this doesn''t seem to work for me. What I did was: hg clean --all && cp ../.config . Apply your patch chmod +x ./autogen.sh ./version.sh ./autogen.sh chmod +x ./configure cp /usr/share/misc/config.{sub,guess} tools/ chmod +x tools/config.{sub,guess} This produces the tree which I would check in. I then ran: ./configure (make -j4 && echo ok.) 2>&1 | tee ../log This did not work correctly. It failed like this: [ -d /u/iwj/work/xen-unstable-tools.hg/dist/install/boot ] || install -d -m0755 -p /u/iwj/work/xen-unstable-tools.hg/dist/install/boot install: cannot create directory `/u/iwj/work/xen-unstable-tools.hg/dist'': Not a directory make[2]: *** [_install] Error 1 make[2]: Leaving directory `/u/iwj/work/xen-unstable-tools.hg/xen'' make[1]: *** [install] Error 2 make[1]: Leaving directory `/u/iwj/work/xen-unstable-tools.hg/xen'' make: *** [install-xen] Error 2 make[2]: Leaving directory `/u/iwj/work/xen-unstable-tools.hg/docs/xen-api'' rm -f *.aux *.dvi *.bbl *.blg *.glo *.idx *.ilg *.log *.ind *.toc rm -rf /u/iwj/work/xen-unstable-tools.hg/dist/install/usr/share/doc/xen install -d -m0755 -p /u/iwj/work/xen-unstable-tools.hg/dist/install/usr/share/doc/xen install: cannot create directory `/u/iwj/work/xen-unstable-tools.hg/dist'': Not a directory make[1]: *** [install] Error 1 make[1]: Leaving directory `/u/iwj/work/xen-unstable-tools.hg/docs'' I looked at "dist" and it is indeed a file, not a directory. It contains a copy of install.sh. My .config contains this: CONFIG_QEMU=/u/iwj/work/1/qemu-iwj.git QEMU_UPSTREAM_URL=/u/iwj/work/1/qemu-upstream-unstable.git Ian.
Roger Pau Monné
2012-Feb-21 12:59 UTC
Re: [PATCH v7] build: add autoconf to replace custom checks in tools/check
2012/2/21 Ian Jackson <Ian.Jackson@eu.citrix.com>:> Roger Pau Monne writes ("[PATCH v7] build: add autoconf to replace custom checks in tools/check"): >> Added autotools magic to replace custom check scripts. The previous >> checks have been ported to autoconf, and some additional ones have >> been added (plus the suggestions from running autoscan). Two files are >> created as a result from executing configure script, config/Tools.mk >> and config.h. >> >> conf/Tools.mk is included by tools/Rules.mk, and contains most of the >> options previously defined in .config, that can now be set passing >> parameters or defining environment variables when executing configure >> script. >> >> config.h is only used by libxl/xl to detect yajl_version.h. > > Thanks. Unfortunately this doesn't seem to work for me. What I did > was: > > hg clean --all && cp ../.config . > Apply your patch > chmod +x ./autogen.sh ./version.sh > ./autogen.sh > chmod +x ./configure > cp /usr/share/misc/config.{sub,guess} tools/ > chmod +x tools/config.{sub,guess} > > This produces the tree which I would check in. I then ran: > > ./configure > (make -j4 && echo ok.) 2>&1 | tee ../log > > This did not work correctly. It failed like this: > > [ -d /u/iwj/work/xen-unstable-tools.hg/dist/install/boot ] || install -d -m0755 -p /u/iwj/work/xen-unstable-tools.hg/dist/install/boot > install: cannot create directory `/u/iwj/work/xen-unstable-tools.hg/dist': Not a directory > make[2]: *** [_install] Error 1 > make[2]: Leaving directory `/u/iwj/work/xen-unstable-tools.hg/xen' > make[1]: *** [install] Error 2 > make[1]: Leaving directory `/u/iwj/work/xen-unstable-tools.hg/xen' > make: *** [install-xen] Error 2 > make[2]: Leaving directory `/u/iwj/work/xen-unstable-tools.hg/docs/xen-api' > rm -f *.aux *.dvi *.bbl *.blg *.glo *.idx *.ilg *.log *.ind *.toc > rm -rf /u/iwj/work/xen-unstable-tools.hg/dist/install/usr/share/doc/xen > install -d -m0755 -p /u/iwj/work/xen-unstable-tools.hg/dist/install/usr/share/doc/xen > install: cannot create directory `/u/iwj/work/xen-unstable-tools.hg/dist': Not a directory > make[1]: *** [install] Error 1 > make[1]: Leaving directory `/u/iwj/work/xen-unstable-tools.hg/docs' > > I looked at "dist" and it is indeed a file, not a directory. It > contains a copy of install.sh. > > My .config contains this: > > CONFIG_QEMU=/u/iwj/work/1/qemu-iwj.git > QEMU_UPSTREAM_URL=/u/iwj/work/1/qemu-upstream-unstable.gitI'm doing a fresh checkout and I will try to reproduce the error, following the same steps.> Ian._______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Ian Campbell
2012-Feb-21 13:48 UTC
Re: [PATCH v7] build: add autoconf to replace custom checks in tools/check
On Tue, 2012-02-21 at 12:59 +0000, Roger Pau Monné wrote: arm: move check for CONFIG_DTB_FILE to xen/arch/arm/Makefile CONFIG_DTB_FILE only needs to be set when building Xen itself. Signed-off-by: David Vrabel <david.vrabel@citrix.com>I'm doing a fresh checkout and I will try to reproduce the error,> following the same steps.@@ -40,11 +40,9 @@ dist: DESTDIR=$(DISTDIR)/install dist: dist-xen dist-kernels dist-tools dist-stubdom dist-docs dist-misc dist-misc: - $(INSTALL_DIR) $(DISTDIR)/check Previously this would have implicitly also created $(DISTDIR) I think you want: - $(INSTALL_DIR) $(DISTDIR)/check + $(INSTALL_DIR) $(DISTDIR)/ Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Ian Campbell
2012-Feb-21 13:58 UTC
Re: [PATCH v7] build: add autoconf to replace custom checks in tools/check
On Tue, 2012-02-21 at 13:48 +0000, Ian Campbell wrote:> On Tue, 2012-02-21 at 12:59 +0000, Roger Pau Monné wrote: > > arm: move check for CONFIG_DTB_FILE to xen/arch/arm/Makefile > > CONFIG_DTB_FILE only needs to be set when building Xen itself. > > Signed-off-by: David Vrabel <david.vrabel@citrix.com>Oops, pasted something here unintentionally!> I'm doing a fresh > checkout and I will try to reproduce the error, > > following the same steps. > > @@ -40,11 +40,9 @@ dist: DESTDIR=$(DISTDIR)/install > dist: dist-xen dist-kernels dist-tools dist-stubdom dist-docs dist-misc > > dist-misc: > - $(INSTALL_DIR) $(DISTDIR)/check > > Previously this would have implicitly also created $(DISTDIR) I think > you want: > - $(INSTALL_DIR) $(DISTDIR)/check > + $(INSTALL_DIR) $(DISTDIR)/ > > Ian. > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Roger Pau Monné
2012-Feb-21 14:03 UTC
Re: [PATCH v7] build: add autoconf to replace custom checks in tools/check
2012/2/21 Ian Campbell <Ian.Campbell@citrix.com>:> On Tue, 2012-02-21 at 13:48 +0000, Ian Campbell wrote: >> On Tue, 2012-02-21 at 12:59 +0000, Roger Pau Monné wrote: >> >> arm: move check for CONFIG_DTB_FILE to xen/arch/arm/Makefile >> >> CONFIG_DTB_FILE only needs to be set when building Xen itself. >> >> Signed-off-by: David Vrabel <david.vrabel@citrix.com> > > Oops, pasted something here unintentionally! > >> I'm doing a fresh >> checkout and I will try to reproduce the error, >> > following the same steps. >> >> @@ -40,11 +40,9 @@ dist: DESTDIR=$(DISTDIR)/install >> dist: dist-xen dist-kernels dist-tools dist-stubdom dist-docs dist-misc >> >> dist-misc: >> - $(INSTALL_DIR) $(DISTDIR)/check >> >> Previously this would have implicitly also created $(DISTDIR) I think >> you want: >> - $(INSTALL_DIR) $(DISTDIR)/check >> + $(INSTALL_DIR) $(DISTDIR)/Yes, it's probably this that's causing the error, what I don't understand is why it has never happened to me, I've done a fresh test of this patch more than once. Probably dist-misc target was executed after some other target already created the dist folder. Thanks, I will post an updated version (again).>> >> Ian. >> >> >> _______________________________________________ >> Xen-devel mailing list >> Xen-devel@lists.xen.org >> http://lists.xen.org/xen-devel > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel