From: Wei Liu Subject: [PATCH] tools/configure.ac: generate Paths.mk if it's not available Date: Mon, 20 Apr 2015 15:07:38 +0100 Message-ID: <1429538858-23122-1-git-send-email-wei.liu2@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: Ian Jackson , Wei Liu , Ian Campbell List-Id: xen-devel@lists.xenproject.org Xen toolstack references many variables in Paths.mk when building and installing, so tools' configure should generate Paths.mk if it's not available. Also make inclusion of Paths.mk mandatory in Tools.mk. Signed-off-by: Wei Liu Cc: Ian Campbell Cc: Ian Jackson --- Please rerun autogen.sh --- config/Tools.mk.in | 2 +- tools/configure | 27 +++++++++++++++++++++++++++ tools/configure.ac | 5 +++++ 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/config/Tools.mk.in b/config/Tools.mk.in index e7da99d..b1ad33f 100644 --- a/config/Tools.mk.in +++ b/config/Tools.mk.in @@ -1,4 +1,4 @@ --include $(XEN_ROOT)/config/Paths.mk +include $(XEN_ROOT)/config/Paths.mk CONFIG_RUMP := @CONFIG_RUMP@ ifeq ($(CONFIG_RUMP),y) diff --git a/tools/configure b/tools/configure index a752acd..d252a34 100755 --- a/tools/configure +++ b/tools/configure @@ -9000,6 +9000,32 @@ if test "x$systemd" = "xy"; then : fi +# In case Paths.mk is not generated, i.e. toplevel ./configure is not invoked. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ../config/Paths.mk" >&5 +$as_echo_n "checking for ../config/Paths.mk... " >&6; } +if ${ac_cv_file____config_Paths_mk+:} false; then : + $as_echo_n "(cached) " >&6 +else + test "$cross_compiling" = yes && + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 +if test -r "../config/Paths.mk"; then + ac_cv_file____config_Paths_mk=yes +else + ac_cv_file____config_Paths_mk=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file____config_Paths_mk" >&5 +$as_echo "$ac_cv_file____config_Paths_mk" >&6; } +if test "x$ac_cv_file____config_Paths_mk" = xyes; then : + +else + + ac_config_files="$ac_config_files ../config/Paths.mk" + + +fi + + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -9716,6 +9742,7 @@ do "hotplug/Linux/systemd/xenstored.service") CONFIG_FILES="$CONFIG_FILES hotplug/Linux/systemd/xenstored.service" ;; "hotplug/Linux/systemd/xenstored.socket") CONFIG_FILES="$CONFIG_FILES hotplug/Linux/systemd/xenstored.socket" ;; "hotplug/Linux/systemd/xenstored_ro.socket") CONFIG_FILES="$CONFIG_FILES hotplug/Linux/systemd/xenstored_ro.socket" ;; + "../config/Paths.mk") CONFIG_FILES="$CONFIG_FILES ../config/Paths.mk" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac diff --git a/tools/configure.ac b/tools/configure.ac index d31c2f3..83095f1 100644 --- a/tools/configure.ac +++ b/tools/configure.ac @@ -395,5 +395,10 @@ AS_IF([test "x$systemd" = "xy"], [ ]) ]) +# In case Paths.mk is not generated, i.e. toplevel ./configure is not invoked. +AC_CHECK_FILE([../config/Paths.mk],,[ + AC_CONFIG_FILES([../config/Paths.mk]) +]) + AC_OUTPUT() -- 1.9.1