Skip to contentSkip to conversation

build: add autoconf to replace custom checks in tools/check

PATCH In review Roger Pau Monne 4 participants 11 messages Feb 21, 2012 – Feb 29, 2012 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH v8 1/1 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 v7:

* Fixed bug that prevented the creation of "dist" directory (Ian Campbell).

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.

 .hgignore                         |    6 +
 Config.mk                         |   39 ------
 Makefile                          |    3 +-
 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, 840 insertions(+), 511 deletions(-)

# HG changeset patch
# User Roger Pau Monne <[email protected]>
# Date 1329794309 -3600
# Node ID c2f0820e48ae9cf0735c5ef81e6a6796f3d42e5a # Parent ca80eca9cfa39d1b60d1216948dac5711d550b83
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 v7:

* Fixed bug that prevented the creation of "dist" directory (Ian Campbell).

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.

.hgignore +6 -0
diff -r ca80eca9cfa3 -r c2f0820e48ae .hgignore
@@ -303,6 +303,12 @@
 ^tools/ocaml/libs/xl/xenlight\.ml$
 ^tools/ocaml/libs/xl/xenlight\.mli$
 ^tools/ocaml/xenstored/oxenstored$
+^tools/autom4te\.cache$
+^tools/config\.h$
+^tools/config\.log$
+^tools/config\.status$
+^tools/config\.cache$
+^config/Tools\.mk$
 ^xen/\.banner.*$
 ^xen/BLOG$
 ^xen/System.map$
Config.mk +0 -39
diff -r ca80eca9cfa3 -r c2f0820e48ae Config.mk
@@ -70,9 +70,6 @@ EXTRA_INCLUDES += $(EXTRA_PREFIX)/includ
 EXTRA_LIB += $(EXTRA_PREFIX)/$(LIBLEAFDIR)
 endif
 
-BISON	?= bison
-FLEX	?= flex
-
 PYTHON      ?= python
 PYTHON_PREFIX_ARG ?= --prefix="$(PREFIX)"
 # The above requires that PREFIX contains *no spaces*. This variable is here
@@ -175,32 +172,9 @@ CFLAGS += $(foreach i, $(PREPEND_INCLUDE
 APPEND_LDFLAGS += $(foreach i, $(APPEND_LIB), -L$(i))
 APPEND_CFLAGS += $(foreach i, $(APPEND_INCLUDES), -I$(i))
 
-CHECK_LIB = $(EXTRA_LIB) $(PREPEND_LIB) $(APPEND_LIB)
-CHECK_INCLUDES = $(EXTRA_INCLUDES) $(PREPEND_INCLUDES) $(APPEND_INCLUDES)
-
 EMBEDDED_EXTRA_CFLAGS := -nopie -fno-stack-protector -fno-stack-protector-all
 EMBEDDED_EXTRA_CFLAGS += -fno-exceptions
 
-CONFIG_LIBICONV   := $(shell export OS="`uname -s`"; \
-                       export CHECK_LIB="$(CHECK_LIB)"; \
-                       . $(XEN_ROOT)/tools/check/funcs.sh; \
-                       has_lib libiconv.so && echo 'y' || echo 'n')
-
-CONFIG_YAJL_VERSION := $(shell export OS="`uname -s`"; \
-                       export CHECK_INCLUDES="$(CHECK_INCLUDES)"; \
-                       . $(XEN_ROOT)/tools/check/funcs.sh; \
-                       has_header yajl/yajl_version.h && echo 'y' || echo 'n')
-
-# Enable XSM security module (by default, Flask).
-XSM_ENABLE ?= n
-FLASK_ENABLE ?= $(XSM_ENABLE)
-
-# Download GIT repositories via HTTP or GIT's own protocol?
-# GIT's protocol is faster and more robust, when it works at all (firewalls
-# may block it). We make it the default, but if your GIT repository downloads
-# fail or hang, please specify GIT_HTTP=y in your environment.
-GIT_HTTP ?= n
-
 XEN_EXTFILES_URL=http://xenbits.xensource.com/xen-extfiles
 # All the files at that location were downloaded from elsewhere on
 # the internet.  The original download URL is preserved as a comment
@@ -239,17 +213,4 @@ QEMU_TAG ?= 128de2549c5f24e4a437b86bd2e4
 # Short answer -- do not enable this unless you know what you are
 # doing and are prepared for some pain.
 
-# Optional components
-XENSTAT_XENTOP     ?= y
-VTPM_TOOLS         ?= n
-LIBXENAPI_BINDINGS ?= n
-PYTHON_TOOLS       ?= y
-OCAML_TOOLS        ?= y
-CONFIG_MINITERM    ?= n
-CONFIG_LOMOUNT     ?= n
-CONFIG_SYSTEM_LIBAIO ?= y
 CONFIG_TESTS       ?= y
-
-ifeq ($(OCAML_TOOLS),y)
-OCAML_TOOLS := $(shell ocamlopt -v > /dev/null 2>&1 && echo "y" || echo "n")
-endif
Makefile +1 -2
diff -r ca80eca9cfa3 -r c2f0820e48ae Makefile
@@ -40,11 +40,10 @@ dist: DESTDIR=$(DISTDIR)/install
 dist: dist-xen dist-kernels dist-tools dist-stubdom dist-docs dist-misc
 
 dist-misc:
-	$(INSTALL_DIR) $(DISTDIR)/check
+	$(INSTALL_DIR) $(DISTDIR)/
 	$(INSTALL_DATA) ./COPYING $(DISTDIR)
 	$(INSTALL_DATA) ./README $(DISTDIR)
 	$(INSTALL_PROG) ./install.sh $(DISTDIR)
-	$(INSTALL_PROG) tools/check/chk tools/check/check_* tools/check/funcs.sh $(DISTDIR)/check
 dist-%: DESTDIR=$(DISTDIR)/install
 dist-%: install-%
 	@: # do nothing
README +4 -0
diff -r ca80eca9cfa3 -r c2f0820e48ae README
@@ -89,9 +89,13 @@ 2. cd to xen-unstable (or whatever you s
 3. For the very first build, or if you want to destroy build trees,
    perform the following steps:
 
+    # ./configure
     # make world
     # make install
 
+   If you want, you can run ./configure --help to see the list of
+   options available options when building and installing Xen.
+
    This will create and install onto the local machine. It will build
    the xen binary (xen.gz), the tools and the documentation.
 
autogen.sh new file +3 -0
diff -r ca80eca9cfa3 -r c2f0820e48ae autogen.sh
@@ -0,0 +1,3 @@
+#!/bin/sh -e
+cd tools
+autoconf
config/Tools.mk.in new file +50 -0

50 lines not on this page · raw message

configure new file +2 -0
diff -r ca80eca9cfa3 -r c2f0820e48ae configure
@@ -0,0 +1,2 @@
+#!/bin/sh -e
+cd tools && ./configure $@
tools/Makefile +2 -1
diff -r ca80eca9cfa3 -r c2f0820e48ae tools/Makefile
@@ -6,7 +6,6 @@ SUBDIRS-libaio := libaio
 endif
 
 SUBDIRS-y :=
-SUBDIRS-y += check
 SUBDIRS-y += include
 SUBDIRS-y += libxc
 SUBDIRS-y += flask
@@ -79,6 +78,8 @@ clean: subdirs-clean
 distclean: subdirs-distclean
 	rm -rf qemu-xen-traditional-dir qemu-xen-traditional-dir-remote
 	rm -rf qemu-xen-dir qemu-xen-dir-remote
+	rm -rf ../config/Tools.mk config.h config.log config.status \
+		config.cache autom4te.cache
 
 ifneq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_ARCH))
 IOEMU_CONFIGURE_CROSS ?= --cpu=$(XEN_TARGET_ARCH) \
tools/Rules.mk +5 -2
diff -r ca80eca9cfa3 -r c2f0820e48ae tools/Rules.mk
@@ -4,6 +4,7 @@
 all:
 
 include $(XEN_ROOT)/Config.mk
+include $(XEN_ROOT)/config/Tools.mk
 
 export _INSTALL := $(INSTALL)
 INSTALL = $(XEN_ROOT)/tools/cross-install
@@ -80,8 +81,6 @@ check-$(CONFIG_X86) = $(call cc-ver-chec
                         "Xen requires at least gcc-3.4")
 $(eval $(check-y))
 
-_PYTHON_PATH := $(shell which $(PYTHON))
-PYTHON_PATH ?= $(_PYTHON_PATH)
 INSTALL_PYTHON_PROG = \
 	$(XEN_ROOT)/tools/python/install-wrap "$(PYTHON_PATH)" $(INSTALL_PROG)
 
@@ -109,3 +108,7 @@ subdir-all-% subdir-clean-% subdir-insta
 
 subdir-distclean-%: .phony
 	$(MAKE) -C $* clean
+
+$(XEN_ROOT)/config/Tools.mk:
+	@echo "You have to run ./configure before building or installing the tools"
+	@exit 1
tools/blktap/drivers/Makefile +1 -1
diff -r ca80eca9cfa3 -r c2f0820e48ae tools/blktap/drivers/Makefile
@@ -13,7 +13,7 @@ CFLAGS   += $(CFLAGS_libxenstore)
 CFLAGS   += -I $(MEMSHR_DIR)
 CFLAGS   += -D_GNU_SOURCE
 
-ifeq ($(shell . ./check_gcrypt $(CC)),yes)
+ifeq ($CONFIG_GCRYPT,y)
 CFLAGS += -DUSE_GCRYPT
 CRYPT_LIB := -lgcrypt
 else
tools/blktap/drivers/check_gcrypt deleted +0 -14
diff -r ca80eca9cfa3 -r c2f0820e48ae tools/blktap/drivers/check_gcrypt
@@ -1,14 +0,0 @@
-#!/bin/sh
-
-cat > .gcrypt.c << EOF
-#include <gcrypt.h>
-int main(void) { return 0; }
-EOF
-
-if $1 -o .gcrypt .gcrypt.c -lgcrypt 2>/dev/null ; then
-  echo "yes"
-else
-  echo "no"
-fi
-
-rm -f .gcrypt*
tools/check/Makefile deleted +0 -26
diff -r ca80eca9cfa3 -r c2f0820e48ae tools/check/Makefile
@@ -1,26 +0,0 @@
-XEN_ROOT = $(CURDIR)/../..
-include $(XEN_ROOT)/tools/Rules.mk
-
-# Export the necessary environment variables for the tests
-export PYTHON
-export LIBXENAPI_BINDINGS
-export CHECK_INCLUDES
-export CHECK_LIB
-export CONFIG_SYSTEM_LIBAIO
-
-.PHONY: all install
-all install: check-build
-
-# Check this machine is OK for building on.
-.PHONY: check-build
-check-build:
-	./chk build
-
-# Check this machine is OK for installing on.
-.PHONY: check-install
-check-install:
-	./chk install
-
-.PHONY: clean
-clean:
-	./chk clean
tools/check/README deleted +0 -20
diff -r ca80eca9cfa3 -r c2f0820e48ae tools/check/README
@@ -1,20 +0,0 @@
-Checks for the suitability of a machine for Xen build or install.
-To check for build suitability use
-
-        ./chk build
-
-To check for install suitability use
-
-        ./chk install
-
-The chk script will run checks in this directory and print
-the ones that failed. It prints nothing if checks succeed.
-The chk script exits with 0 on success and 1 on failure.
-
-The chk script runs executable files in this directory whose
-names begin with 'check_'. Files containing CHECK-BUILD
-are run for the build check, and files containing CHECK-INSTALL
-are run for the install check.
-
-Detailed output from the check scripts is in .chkbuild for build
-and .chkinstall for install.
\ No newline at end of file
tools/check/check_brctl deleted +0 -13
diff -r ca80eca9cfa3 -r c2f0820e48ae tools/check/check_brctl
@@ -1,13 +0,0 @@
-#!/bin/sh
-# CHECK-INSTALL
-
-. ./funcs.sh
-
-case $OS in
-OpenBSD|NetBSD|FreeBSD)
-	has_or_fail brconfig ;;
-Linux)
-	has_or_fail brctl ;;
-*)
-	fail "unknown OS" ;;
-esac
tools/check/check_crypto_lib deleted +0 -11
diff -r ca80eca9cfa3 -r c2f0820e48ae tools/check/check_crypto_lib
@@ -1,11 +0,0 @@
-#!/bin/sh
-# CHECK-BUILD CHECK-INSTALL
-
-. ./funcs.sh
-
-case $OS in
-FreeBSD|NetBSD|OpenBSD)
-	exit 0 ;;
-esac
-
-has_lib libcrypto.so || fail "missing libcrypto.so"
tools/check/check_curl deleted +0 -13
diff -r ca80eca9cfa3 -r c2f0820e48ae tools/check/check_curl
@@ -1,13 +0,0 @@
-#!/bin/sh
-# CHECK-BUILD CHECK-INSTALL
-
-. ./funcs.sh
-
-if [ "$LIBXENAPI_BINDINGS" != "y" ]; then
-	echo -n "unused, "
-	exit 0
-fi
-
-has_or_fail curl-config
-curl_libs=`curl-config --libs` || fail "curl-config --libs failed"
-test_link $curl_libs || fail "dependency libraries for curl are missing"
tools/check/check_iproute deleted +0 -15
diff -r ca80eca9cfa3 -r c2f0820e48ae tools/check/check_iproute
@@ -1,15 +0,0 @@
-#!/bin/sh
-# CHECK-INSTALL
-
-. ./funcs.sh
-
-PATH=/sbin:$PATH
-
-case $OS in
-OpenBSD|NetBSD|FreeBSD)
-	has_or_fail ifconfig ;;
-Linux)
-	has_or_fail ip ;;
-*)
-	fail "unknown OS" ;;
-esac
tools/check/check_libaio_devel deleted +0 -11
diff -r ca80eca9cfa3 -r c2f0820e48ae tools/check/check_libaio_devel
@@ -1,11 +0,0 @@
-#!/bin/sh
-# CHECK-BUILD
-
-. ./funcs.sh
-
-if [ X${CONFIG_SYSTEM_LIBAIO} != X"y" ] ; then
-    exit 0
-fi
-if ! has_header libaio.h ; then
-    fail "can't find libaio headers, install libaio devel package or set CONFIG_SYSTEM_LIBAIO=n"
-fi
tools/check/check_libaio_lib deleted +0 -9
diff -r ca80eca9cfa3 -r c2f0820e48ae tools/check/check_libaio_lib
@@ -1,9 +0,0 @@
-#!/bin/sh
-# CHECK-BUILD CHECK-INSTALL
-
-. ./funcs.sh
-
-if [ X${CONFIG_SYSTEM_LIBAIO} != X"y" ] ; then
-    exit 0
-fi
-has_lib libaio.so || fail "can't find libaio"
tools/check/check_openssl_devel deleted +0 -6
diff -r ca80eca9cfa3 -r c2f0820e48ae tools/check/check_openssl_devel
@@ -1,6 +0,0 @@
-#!/bin/sh
-# CHECK-BUILD
-
-. ./funcs.sh
-
-has_header openssl/md5.h || fail "missing openssl headers"
tools/check/check_python deleted +0 -13
diff -r ca80eca9cfa3 -r c2f0820e48ae tools/check/check_python
@@ -1,13 +0,0 @@
-#!/bin/sh
-# CHECK-BUILD CHECK-INSTALL
-
-. ./funcs.sh
-
-if test -z ${PYTHON}; then
-  PYTHON=python
-fi
-
-${PYTHON} -c '
-import sys
-sys.exit(sys.version_info[0] < 2 or sys.version_info[1] < 3)
-' || fail "need python version >= 2.3"
tools/check/check_python_devel deleted +0 -17
diff -r ca80eca9cfa3 -r c2f0820e48ae tools/check/check_python_devel
@@ -1,17 +0,0 @@
-#!/bin/sh
-# CHECK-BUILD
-
-. ./funcs.sh
-
-if test -z ${PYTHON}; then
-  PYTHON=python
-fi
-has_or_fail ${PYTHON}
-
-${PYTHON} -c '
-import os.path, sys
-for p in sys.path:
-	if os.path.exists(p + "/config/Makefile"):
-		sys.exit(0)
-sys.exit(1)
-' || fail "can't find python devel files"
tools/check/check_python_xml deleted +0 -12
diff -r ca80eca9cfa3 -r c2f0820e48ae tools/check/check_python_xml
@@ -1,12 +0,0 @@
-#!/bin/sh
-# CHECK-INSTALL
-
-. ./funcs.sh
-
-if test -z ${PYTHON}; then
-  PYTHON=python
-fi
-has_or_fail ${PYTHON}
-
-${PYTHON} -c 'import xml.dom.minidom' 2>/dev/null || \
-fail "can't import xml.dom.minidom"
tools/check/check_udev deleted +0 -22
diff -r ca80eca9cfa3 -r c2f0820e48ae tools/check/check_udev
@@ -1,22 +0,0 @@
-#!/bin/sh
-# CHECK-INSTALL
-
-. ./funcs.sh
-
-case $OS in
-OpenBSD|NetBSD|FreeBSD)
-	has_or_fail vnconfig
-	;;
-Linux)
-	has /sbin/udevadm && \
-		udevver=`/sbin/udevadm info -V | awk '{print $NF}'`
-	[ -z "$udevver" ] && has_or_fail udevinfo && \
-		udevver=`udevinfo -V | awk '{print $NF}'`
-	[ "$udevver" -ge 59 ] 2>/dev/null || \
-		has hotplug || \
-		fail "udev is too old, upgrade to version 59 or later"
-	;;
-*)
-	fail "unknown OS"
-	;;
-esac
tools/check/check_uuid_devel deleted +0 -7
diff -r ca80eca9cfa3 -r c2f0820e48ae tools/check/check_uuid_devel
@@ -1,7 +0,0 @@
-#!/bin/sh
-# CHECK-BUILD
-
-. ./funcs.sh
-
-has_header uuid.h || \
-has_header uuid/uuid.h || fail "missing uuid headers (package uuid-dev)"
tools/check/check_x11_devel deleted +0 -9
diff -r ca80eca9cfa3 -r c2f0820e48ae tools/check/check_x11_devel
@@ -1,9 +0,0 @@
-#!/bin/sh
-# CHECK-BUILD
-
-. ./funcs.sh
-
-has_header X11/keysymdef.h || \
-has_header /usr/X11R6/include/X11/keysymdef.h || \
-has_header /usr/X11R7/include/X11/keysymdef.h || \
-warning "can't find X11 headers"
tools/check/check_xgettext deleted +0 -6
diff -r ca80eca9cfa3 -r c2f0820e48ae tools/check/check_xgettext
@@ -1,6 +0,0 @@
-#!/bin/sh
-# CHECK-BUILD
-
-. ./funcs.sh
-
-has_or_fail xgettext
tools/check/check_xml2 deleted +0 -14
diff -r ca80eca9cfa3 -r c2f0820e48ae tools/check/check_xml2
@@ -1,14 +0,0 @@
-#!/bin/sh
-# CHECK-BUILD CHECK-INSTALL
-
-. ./funcs.sh
-
-if [ ! "$LIBXENAPI_BINDINGS" = "y" ]
-then
-    echo -n "unused, "
-    exit 0
-fi
-
-has_or_fail xml2-config
-xml2_libs=`xml2-config --libs` || fail "xml2-config --libs failed"
-test_link $xml2_libs || fail "dependency libraries for xml2 are missing"
tools/check/check_yajl_devel deleted +0 -8
diff -r ca80eca9cfa3 -r c2f0820e48ae tools/check/check_yajl_devel
@@ -1,8 +0,0 @@
-#!/bin/sh
-# CHECK-BUILD
-
-. ./funcs.sh
-
-has_header yajl/yajl_parse.h || fail "can't find yajl/yajl_parse.h"
-has_header yajl/yajl_gen.h || fail "can't find yajl/yajl_gen.h"
-has_lib libyajl.so || fail "can't find libyajl.so"
tools/check/check_zlib_devel deleted +0 -6
diff -r ca80eca9cfa3 -r c2f0820e48ae tools/check/check_zlib_devel
@@ -1,6 +0,0 @@
-#!/bin/sh
-# CHECK-BUILD
-
-. ./funcs.sh
-
-has_header zlib.h || fail "can't find zlib headers"
tools/check/check_zlib_lib deleted +0 -12
diff -r ca80eca9cfa3 -r c2f0820e48ae tools/check/check_zlib_lib
@@ -1,12 +0,0 @@
-#!/bin/sh
-# CHECK-BUILD CHECK-INSTALL
-
-. ./funcs.sh
-
-case $OS in
-FreeBSD|NetBSD|OpenBSD)
-	exit 0
-	;;
-esac
-
-has_lib libz.so || fail "can't find zlib"
tools/check/chk deleted +0 -63

63 lines not on this page · raw message

tools/check/funcs.sh deleted +0 -106

106 lines not on this page · raw message

tools/config.h.in new file +16 -0
diff -r ca80eca9cfa3 -r c2f0820e48ae tools/config.h.in
@@ -0,0 +1,16 @@
+/*
+ * Copyright (C) 2012
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation; version 2.1 only. with the special
+ * exception on linking described in file LICENSE.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ */
+
+/* Define to 1 if you have the <yajl/yajl_version.h> header file. */
+#undef HAVE_YAJL_YAJL_VERSION_H
tools/configure.ac new file +192 -0

192 lines not on this page · raw message

tools/debugger/gdbsx/xg/Makefile +0 -1
diff -r ca80eca9cfa3 -r c2f0820e48ae tools/debugger/gdbsx/xg/Makefile
@@ -21,7 +21,6 @@ xg_all.a: $(XG_OBJS) Makefile $(XG_HDRS)
 #	$(CC) -m32 -c -o $@ $^
 
 xen-headers:
-	$(MAKE) -C ../../../check 
 	$(MAKE) -C ../../../include
 
 # xg_main.o: xg_main.c Makefile $(XG_HDRS)
tools/install.sh new file +1 -0
diff -r ca80eca9cfa3 -r c2f0820e48ae tools/install.sh
@@ -0,0 +1,1 @@
+../install.sh
\ No newline at end of file
tools/libfsimage/Makefile +5 -1
diff -r ca80eca9cfa3 -r c2f0820e48ae tools/libfsimage/Makefile
@@ -3,7 +3,11 @@ include $(XEN_ROOT)/tools/Rules.mk
 
 SUBDIRS-y = common ufs reiserfs iso9660 fat zfs
 SUBDIRS-$(CONFIG_X86) += xfs
-SUBDIRS-y += $(shell env CC="$(CC)" ./check-libext2fs)
+ifeq ($(CONFIG_EXT2FS), y)
+    SUBDIRS-y += ext2fs-lib
+else
+    SUBDIRS-y += ext2fs
+endif
 
 .PHONY: all clean install
 all clean install: %: subdirs-%
tools/libfsimage/check-libext2fs deleted +0 -21
diff -r ca80eca9cfa3 -r c2f0820e48ae tools/libfsimage/check-libext2fs
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-cat >ext2-test.c <<EOF
-#include <ext2fs/ext2fs.h>
-
-int main()
-{
-	ext2fs_open2;
-}
-EOF
-
-${CC-gcc} -o ext2-test ext2-test.c -lext2fs >/dev/null 2>&1
-if [ $? = 0 ]; then
-	echo ext2fs-lib
-else
-	echo ext2fs
-fi
-
-rm -f ext2-test ext2-test.c
-
-exit 0
tools/libxen/Makefile +4 -4
diff -r ca80eca9cfa3 -r c2f0820e48ae tools/libxen/Makefile
@@ -22,12 +22,12 @@ MAJOR = 1.0
 MINOR = 0
 
 CFLAGS += -Iinclude                     \
-          $(shell xml2-config --cflags) \
-          $(shell curl-config --cflags) \
+          $(shell $(XML2_CONFIG) --cflags) \
+          $(shell $(CURL_CONFIG) --cflags) \
           -fPIC
 
-LDFLAGS += $(shell xml2-config --libs) \
-           $(shell curl-config --libs)
+LDFLAGS += $(shell $(XML2_CONFIG) --libs) \
+           $(shell $(CURL_CONFIG) --libs)
 
 LIBXENAPI_HDRS = $(wildcard include/xen/api/*.h) include/xen/api/xen_all.h
 LIBXENAPI_OBJS = $(patsubst %.c, %.o, $(wildcard src/*.c))
tools/libxl/Makefile +2 -5
diff -r ca80eca9cfa3 -r c2f0820e48ae tools/libxl/Makefile
@@ -19,10 +19,6 @@ ifeq ($(CONFIG_Linux),y)
 LIBUUID_LIBS += -luuid
 endif
 
-ifeq ($(CONFIG_YAJL_VERSION),y)
-CFLAGS += -DHAVE_YAJL_VERSION
-endif
-
 LIBXL_LIBS =
 LIBXL_LIBS = $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) $(LDLIBS_libxenstore) $(LDLIBS_libblktapctl) $(UTIL_LIBS) $(LIBUUID_LIBS)
 
@@ -56,7 +52,7 @@ LIBXL_OBJS = flexarray.o libxl.o libxl_c
 			libxl_qmp.o libxl_event.o $(LIBXL_OBJS-y)
 LIBXL_OBJS += _libxl_types.o libxl_flask.o _libxl_types_internal.o
 
-$(LIBXL_OBJS): CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenguest) $(CFLAGS_libxenstore) $(CFLAGS_libblktapctl)
+$(LIBXL_OBJS): CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenguest) $(CFLAGS_libxenstore) $(CFLAGS_libblktapctl) -include $(XEN_ROOT)/tools/config.h
 
 AUTOINCS= libxlu_cfg_y.h libxlu_cfg_l.h _libxl_list.h
 AUTOSRCS= libxlu_cfg_y.c libxlu_cfg_l.c
@@ -69,6 +65,7 @@ CLIENTS = xl testidl
 XL_OBJS = xl.o xl_cmdimpl.o xl_cmdtable.o xl_sxp.o
 $(XL_OBJS): CFLAGS += $(CFLAGS_libxenctrl) # For xentoollog.h
 $(XL_OBJS): CFLAGS += $(CFLAGS_libxenlight)
+$(XL_OBJS): CFLAGS += -include $(XEN_ROOT)/tools/config.h # libxl_json.h needs it.
 
 testidl.o: CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenlight)
 testidl.c: libxl_types.idl gentest.py libxl.h $(AUTOINCS)
tools/libxl/libxl_json.h +1 -1
diff -r ca80eca9cfa3 -r c2f0820e48ae tools/libxl/libxl_json.h
@@ -18,7 +18,7 @@
 #include <yajl/yajl_gen.h>
 #include <yajl/yajl_parse.h>
 
-#ifdef HAVE_YAJL_VERSION
+#ifdef HAVE_YAJL_YAJL_VERSION_H
 #  include <yajl/yajl_version.h>
 #endif
 
tools/m4/default_lib.m4 new file +8 -0
diff -r ca80eca9cfa3 -r c2f0820e48ae tools/m4/default_lib.m4
@@ -0,0 +1,8 @@
+AC_DEFUN([AX_DEFAULT_LIB],
+[AS_IF([test -d "$prefix/lib64"], [
+    LIB_PATH="lib64"
+],[
+    LIB_PATH="lib"
+])
+AC_SUBST(LIB_PATH)])
+
tools/m4/disable_feature.m4 new file +13 -0
diff -r ca80eca9cfa3 -r c2f0820e48ae tools/m4/disable_feature.m4
@@ -0,0 +1,13 @@
+AC_DEFUN([AX_ARG_DISABLE_AND_EXPORT],
+[AC_ARG_ENABLE([$1],
+    AS_HELP_STRING([--disable-$1], [$2]))
+
+AS_IF([test "x$enable_$1" = "xno"], [
+    ax_cv_$1="n"
+], [test "x$enable_$1" = "xyes"], [
+    ax_cv_$1="y"
+], [test -z $ax_cv_$1], [
+    ax_cv_$1="y"
+])
+$1=$ax_cv_$1
+AC_SUBST($1)])
tools/m4/enable_feature.m4 new file +13 -0
diff -r ca80eca9cfa3 -r c2f0820e48ae tools/m4/enable_feature.m4
@@ -0,0 +1,13 @@
+AC_DEFUN([AX_ARG_ENABLE_AND_EXPORT],
+[AC_ARG_ENABLE([$1],
+    AS_HELP_STRING([--enable-$1], [$2]))
+
+AS_IF([test "x$enable_$1" = "xyes"], [
+    ax_cv_$1="y"
+], [test "x$enable_$1" = "xno"], [
+    ax_cv_$1="n"
+], [test -z $ax_cv_$1], [
+    ax_cv_$1="n"
+])
+$1=$ax_cv_$1
+AC_SUBST($1)])
tools/m4/ocaml.m4 new file +241 -0

241 lines not on this page · raw message

tools/m4/path_or_fail.m4 new file +6 -0
diff -r ca80eca9cfa3 -r c2f0820e48ae tools/m4/path_or_fail.m4
@@ -0,0 +1,6 @@
+AC_DEFUN([AX_PATH_PROG_OR_FAIL],
+[AC_PATH_PROG([$1], [$2], [no])
+if test x"${$1}" == x"no" 
+then
+    AC_MSG_ERROR([Unable to find $2, please install $2])
+fi])
tools/m4/pkg.m4 new file +157 -0

157 lines not on this page · raw message

tools/m4/python_devel.m4 new file +18 -0
diff -r ca80eca9cfa3 -r c2f0820e48ae tools/m4/python_devel.m4
@@ -0,0 +1,18 @@
+AC_DEFUN([AX_CHECK_PYTHON_DEVEL],
+[AC_MSG_CHECKING([for python devel])
+
+`$PYTHON -c '
+import os.path, sys
+for p in sys.path:
+    if os.path.exists(p + "/config/Makefile"):
+        sys.exit(0)
+sys.exit(1)
+' > /dev/null 2>&1`
+
+if test "$?" != "0"
+then
+    AC_MSG_RESULT([no])
+    AC_MSG_ERROR([Python devel package not found])
+else
+    AC_MSG_RESULT([yes])
+fi])
tools/m4/python_version.m4 new file +12 -0
diff -r ca80eca9cfa3 -r c2f0820e48ae tools/m4/python_version.m4
@@ -0,0 +1,12 @@
+AC_DEFUN([AX_CHECK_PYTHON_VERSION],
+[AC_MSG_CHECKING([for python version >= $1.$2 ])
+`$PYTHON -c 'import sys; exit(eval("sys.version_info < ($1, $2)"))'`
+if test "$?" != "0"
+then
+    python_version=`$PYTHON -V 2>&1`
+    AC_MSG_RESULT([no])
+    AC_MSG_ERROR(
+        [$python_version is too old, minimum required version is $1.$2])
+else
+    AC_MSG_RESULT([yes])
+fi])
tools/m4/python_xml.m4 new file +10 -0
diff -r ca80eca9cfa3 -r c2f0820e48ae tools/m4/python_xml.m4
@@ -0,0 +1,10 @@
+AC_DEFUN([AX_CHECK_PYTHON_XML],
+[AC_MSG_CHECKING([for python xml.dom.minidom])
+`$PYTHON -c 'import xml.dom.minidom'`
+if test "$?" != "0"
+then
+    AC_MSG_RESULT([no])
+    AC_MSG_ERROR([Unable to find xml.dom.minidom module])
+else
+    AC_MSG_RESULT([yes])
+fi])
tools/m4/set_cflags_ldflags.m4 new file +20 -0
diff -r ca80eca9cfa3 -r c2f0820e48ae tools/m4/set_cflags_ldflags.m4
@@ -0,0 +1,20 @@
+AC_DEFUN([AX_SET_FLAGS],
+[for cflag in $PREPEND_INCLUDES
+do
+    PREPEND_CFLAGS+=" -I$cflag"
+done
+for ldflag in $PREPEND_LIB
+do
+    PREPEND_LDFLAGS+=" -L$ldflag"
+done
+for cflag in $APPEND_INCLUDES
+do
+    APPEND_CFLAGS+=" -I$cflag"
+done
+for ldflag in $APPEND_LIB
+do
+    APPEND_LDFLAGS+=" -L$ldflag"
+done
+CFLAGS="$PREPEND_CFLAGS $CFLAGS $APPEND_CFLAGS"
+LDFLAGS="$PREPEND_LDFLAGS $LDFLAGS $APPEND_LDFLAGS"])
+
tools/m4/udev.m4 new file +32 -0
diff -r ca80eca9cfa3 -r c2f0820e48ae tools/m4/udev.m4
@@ -0,0 +1,32 @@
+AC_DEFUN([AX_CHECK_UDEV],
+[if test "x$host_os" == "xlinux-gnu"
+then
+    AC_PATH_PROG([UDEVADM], [udevadm], [no])
+    if test x"${UDEVADM}" == x"no" 
+    then
+        AC_PATH_PROG([UDEVINFO], [udevinfo], [no])
+        if test x"${UDEVINFO}" == x"no"
+        then
+            AC_MSG_ERROR(
+                [Unable to find udevadm or udevinfo, please install udev])
+        fi
+        udevver=`${UDEVINFO} -V | awk '{print $NF}'`
+    else
+        udevver=`${UDEVADM} info -V | awk '{print $NF}'`
+    fi
+    if test ${udevver} -lt 59
+    then
+        AC_PATH_PROG([HOTPLUG], [hotplug], [no])
+        if test x"${HOTPLUG}" == x"no"
+        then
+            AC_MSG_ERROR([udev is too old, upgrade to version 59 or later])
+        fi
+    fi
+else
+    AC_PATH_PROG([VNCONFIG], [vnconfig], [no])
+    if test x"${VNCONFIG}" == x"no"
+    then
+        AC_MSG_ERROR([Not a Linux system and unable to find vnd])
+    fi
+fi
+])
tools/m4/uuid.m4 new file +10 -0
diff -r ca80eca9cfa3 -r c2f0820e48ae tools/m4/uuid.m4
@@ -0,0 +1,10 @@
+AC_DEFUN([AX_CHECK_UUID],
+[if test "x$host_os" == "xlinux-gnu"
+then
+    AC_CHECK_HEADER([uuid/uuid.h],,
+	    [AC_MSG_ERROR([cannot find uuid headers])])
+else
+    AC_CHECK_HEADER([uuid.h],,
+	    [AC_MSG_ERROR([cannot find uuid headers])])
+fi
+])
version.sh new file +5 -0
diff -r ca80eca9cfa3 -r c2f0820e48ae version.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+MAJOR=`grep "export XEN_VERSION" $1 | sed 's/.*=//g' | tr -s " "`
+MINOR=`grep "export XEN_SUBVERSION" $1 | sed 's/.*=//g' | tr -s " "`
+printf "%d.%d" $MAJOR $MINOR

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#1 lore raw

Roger Pau Monne writes ("[PATCH v8] build: add autoconf to replace custom checks in tools/check"):

Quoted 5 lines

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.

Thanks, I have now managed to successfuly test this. It's looking good.

I have made a change to the test system to deal with it (as otherwise of course all the builds will fail), and I will apply your autoconf patch when I get a push on the test system.

I'll also apply the .gitignore patch below.

Ian.

commit 6e9893f665a3f6fc6eef45fc53cf446f8c0856c4

Author: Ian Jackson <[email protected]>
Date:   Tue Feb 21 16:12:46 2012 +0000

.gitignore: add autoconf-related files

.gitignore +6 -0
index d1a503b..8810b35 100644
@@ -105,6 +105,12 @@ stubdom/lwip/
 stubdom/ioemu/
 stubdom/stubdompath.sh
 tools/*/build/lib*/*.py
+tools/autom4te.cache
+tools/config.h
+tools/config.log
+tools/config.status
+tools/config.cache
+config/Tools.mk
 tools/blktap2/daemon/blktapctrl
 tools/blktap2/drivers/img2qcow
 tools/blktap2/drivers/lock-util
#2 lore raw

2012/2/21 Ian Jackson <[email protected]>:

Quoted 7 lines

Roger Pau Monne writes ("[PATCH v8] build: add autoconf to replace custom checks in tools/check"):

Quoted 5 lines

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.

Quoted 6 lines

Thanks, I have now managed to successfuly test this.  It's looking good.

I have made a change to the test system to deal with it (as otherwise of course all the builds will fail), and I will apply your autoconf patch when I get a push on the test system.

Thats good, I'm happy that this is finally looking ok.

Quoted 1 line

I'll also apply the .gitignore patch below.

Isn't that already on my patch?

Quoted 24 lines

Ian.

commit 6e9893f665a3f6fc6eef45fc53cf446f8c0856c4
Author: Ian Jackson <[email protected]>
Date:   Tue Feb 21 16:12:46 2012 +0000

   .gitignore: add autoconf-related files

.gitignore +0 -0
index d1a503b..8810b35 100644
@@ -105,6 +105,12 @@ stubdom/lwip/

 stubdom/ioemu/
 stubdom/stubdompath.sh
 tools/*/build/lib*/*.py

.gitignore +6 -0
+tools/autom4te.cache
+tools/config.h
+tools/config.log
+tools/config.status
+tools/config.cache
+config/Tools.mk
Quoted 3 lines

 tools/blktap2/daemon/blktapctrl
 tools/blktap2/drivers/img2qcow
 tools/blktap2/drivers/lock-util

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#3 lore raw

Roger Pau Monné writes ("Re: [PATCH v8] build: add autoconf to replace custom checks in tools/check"):

Quoted 4 lines

2012/2/21 Ian Jackson <[email protected]>:

Quoted 1 line

I'll also apply the .gitignore patch below.

Isn't that already on my patch?

No, yours has the .hgignore. If I (and my git) are not mistaken.

Ian.

#4 lore raw
In reply to Roger Pau Monne

tools/configure.ac line 109

Quoted 11 lines · Roger Pau Monne
tools/configure.ac new file +11 -0
+AS_IF([test "x$pythontools" = "xy"], [
+    AS_IF([echo "$PYTHON" | grep -q "^/"], [
+        PYTHONPATH=$PYTHON
+        PYTHON=`basename $PYTHONPATH`
+    ],[test -z "$PYTHON"], [PYTHON="python"],
+    [AC_MSG_ERROR([PYTHON specified, but is not an absolute path])])
+    AX_PATH_PROG_OR_FAIL([PYTHONPATH], [$PYTHON])
+    AX_CHECK_PYTHON_VERSION([2], [3])
+    AX_CHECK_PYTHON_XML()
+    AX_CHECK_PYTHON_DEVEL()
+])

Is the AX_CHECK_PYTHON_XML check really required for compilation? It seems to check for xml.dom.minidom which is used in xend at runtime.

Olaf

#5 lore raw
In reply to Roger Pau Monne

tools/check/check_python

Quoted 6 lines · Roger Pau Monne

-${PYTHON} -c '

tools/check/check_python deleted +1 -3
-import sys
-sys.exit(sys.version_info[0] < 2 or sys.version_info[1] < 3)
-' || fail "need python version >= 2.3"
 
+`$PYTHON -c 'import sys; exit(eval("sys.version_info < ($1, $2)"))'`

Old python can not handle that new syntax:

 $ python
Python 2.4.2 (#1, Feb 16 2011, 12:49:02)
[GCC 4.1.2 20070115 (SUSE Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

import sys
exit(eval("sys.version_info < (2, 3)"))

Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: 'str' object is not callable

Quoted 1 line
Quoted 1 line
Quoted 1 line
#6 lore raw

All,

I was attempting to perform a 'make dist' and installing from the 'dist' onto another machine. It looks like the last line of the install.sh script in the dist folder wants to check the prerequisites from the 'check' directory. I wanted to ask what the dist install methodology is with the autoconf configuration. I can give a hand, just wanted to check if people were working on this and what the thoughts were.

###/dist/install.sh
cd $src/../check
./chk install
echo "All done."

Quoted 24 lines · Olaf Hering

tools/check/check_python

Quoted 6 lines · Roger Pau Monne

-${PYTHON} -c '

tools/check/check_python deleted +1 -3
-import sys
-sys.exit(sys.version_info[0] < 2 or sys.version_info[1] < 3)
-' || fail "need python version >= 2.3"
 
+`$PYTHON -c 'import sys; exit(eval("sys.version_info < ($1, $2)"))'`

Old python can not handle that new syntax:

 $ python
Python 2.4.2 (#1, Feb 16 2011, 12:49:02)
[GCC 4.1.2 20070115 (SUSE Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

import sys
exit(eval("sys.version_info < (2, 3)"))

Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: 'str' object is not callable

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 5 lines

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#7 lore raw
In reply to Olaf Hering
Quoted 1 line

Added autotools magic to replace custom check scripts

Let me start over on this one... What is the install methodology with the replacement of the custom checks with "autotools magic?" I am working on a dist build and realized that the dist build goes over and grabs the checks out of the tools directory to check the installation.
So if I were to:

#hg clone -r 24869 http://xenbits.xen.org/hg/xen-unstable.hg
#cd xen-unstable
#./configure
#make dist
#tar cvfz something.tar.gz dist
#scp something.tar.gz xen@newhost:/temp
#ssh xen@newhost
#....
#./install.sh
...
Checking to see whether prerequisite tools are installed... ./install.sh: line 53: cd: ./install/../check: No such file or directory ./install.sh: line 54: ./chk: No such file or directory
All done.

#ls dist
COPYING install install.sh README

#tail -n 6 dist/install.sh
echo "Checking to see whether prerequisite tools are installed..." cd $src/../check
./chk install
echo "All done."

exit 0

#8 lore raw

2012/2/28 Jeffrey Karrels <[email protected]>:

Quoted 8 lines
Quoted 1 line

Added autotools magic to replace custom check scripts

Let me start over on this one...  What is the install methodology with the replacement of the custom checks with "autotools magic?" I am working on a dist build and realized that the dist build goes over and grabs the checks out of the tools directory to check the installation. So if I were to:

Quoted 14 lines

#hg clone -r 24869 http://xenbits.xen.org/hg/xen-unstable.hg
#cd xen-unstable
#./configure
#make dist
#tar cvfz something.tar.gz dist
#scp something.tar.gz xen@newhost:/temp
#ssh xen@newhost
#....
#./install.sh
...
Checking to see whether prerequisite tools are installed... ./install.sh: line 53: cd: ./install/../check: No such file or directory ./install.sh: line 54: ./chk: No such file or directory
All done.

This should fix it (I haven't tested):

8<--------------------------------------------

install: remove old checks from install.sh

install.sh +0 -5
diff -r e1fdc5509bb4 install.sh
@@ -49,9 +49,4 @@ rm -rf "$tmp"
 
 echo "All done."
 
-echo "Checking to see whether prerequisite tools are installed..."
-cd $src/../check
-./chk install
-echo "All done."
-
 exit 0

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#9 lore raw
Quoted 2 lines

This should fix it (I haven't tested):

That was what I did as well. Seems to work fine for me. Thanks.