All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tools/configure.ac: generate Paths.mk if it's not available
@ 2015-04-20 14:07 Wei Liu
  2015-04-21 10:16 ` Wei Liu
  0 siblings, 1 reply; 5+ messages in thread
From: Wei Liu @ 2015-04-20 14:07 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Wei Liu, Ian Campbell

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 <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
---
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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] tools/configure.ac: generate Paths.mk if it's not available
  2015-04-20 14:07 [PATCH] tools/configure.ac: generate Paths.mk if it's not available Wei Liu
@ 2015-04-21 10:16 ` Wei Liu
  2015-04-21 10:54   ` Ian Campbell
  0 siblings, 1 reply; 5+ messages in thread
From: Wei Liu @ 2015-04-21 10:16 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Wei Liu, Ian Campbell

On Mon, Apr 20, 2015 at 03:07:38PM +0100, Wei Liu wrote:
> 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.

Hmm... I just discovered that docs build also involves Paths.mk.  This
patch is ugly enough that I don't want to duplicate it for docs.
So advise on how to fix this would be much appreciated.

Or we can state clear that anyone who builds Xen from source needs to
run ./configure in top level directory, not the ones in subsystems.

Wei.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] tools/configure.ac: generate Paths.mk if it's not available
  2015-04-21 10:16 ` Wei Liu
@ 2015-04-21 10:54   ` Ian Campbell
  2015-04-21 11:30     ` Wei Liu
  0 siblings, 1 reply; 5+ messages in thread
From: Ian Campbell @ 2015-04-21 10:54 UTC (permalink / raw)
  To: Wei Liu; +Cc: Ian Jackson, xen-devel

On Tue, 2015-04-21 at 11:16 +0100, Wei Liu wrote:
> On Mon, Apr 20, 2015 at 03:07:38PM +0100, Wei Liu wrote:
> > 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.
> 
> Hmm... I just discovered that docs build also involves Paths.mk.  This
> patch is ugly enough that I don't want to duplicate it for docs.
> So advise on how to fix this would be much appreciated.

I wasn't terribly happy with having more than one place update Paths.mk
already.

> Or we can state clear that anyone who builds Xen from source needs to
> run ./configure in top level directory, not the ones in subsystems.

I think that's essentially what we've done so far, but it's not terribly
satisfactory I'll admit. Is this the only issue which prevents this?

Perhaps change each subsystem to generate+consume its own Paths
${subsys}.mk instead of a single global one? Either in config/Paths
${subsys.mk} or in ${subsys}/Paths.mk.

If you invoke from the top-level then they will all end up with the same
contents, but so what...

Ian.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] tools/configure.ac: generate Paths.mk if it's not available
  2015-04-21 10:54   ` Ian Campbell
@ 2015-04-21 11:30     ` Wei Liu
  2015-04-21 12:44       ` Ian Campbell
  0 siblings, 1 reply; 5+ messages in thread
From: Wei Liu @ 2015-04-21 11:30 UTC (permalink / raw)
  To: Ian Campbell; +Cc: Ian Jackson, Wei Liu, xen-devel

On Tue, Apr 21, 2015 at 11:54:27AM +0100, Ian Campbell wrote:
> On Tue, 2015-04-21 at 11:16 +0100, Wei Liu wrote:
> > On Mon, Apr 20, 2015 at 03:07:38PM +0100, Wei Liu wrote:
> > > 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.
> > 
> > Hmm... I just discovered that docs build also involves Paths.mk.  This
> > patch is ugly enough that I don't want to duplicate it for docs.
> > So advise on how to fix this would be much appreciated.
> 
> I wasn't terribly happy with having more than one place update Paths.mk
> already.
> 
> > Or we can state clear that anyone who builds Xen from source needs to
> > run ./configure in top level directory, not the ones in subsystems.
> 
> I think that's essentially what we've done so far, but it's not terribly
> satisfactory I'll admit. Is this the only issue which prevents this?
> 
> Perhaps change each subsystem to generate+consume its own Paths
> ${subsys}.mk instead of a single global one? Either in config/Paths
> ${subsys.mk} or in ${subsys}/Paths.mk.
> 
> If you invoke from the top-level then they will all end up with the same
> contents, but so what...
> 

I can try to refactor Paths.mk.in into several files.

> Ian.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] tools/configure.ac: generate Paths.mk if it's not available
  2015-04-21 11:30     ` Wei Liu
@ 2015-04-21 12:44       ` Ian Campbell
  0 siblings, 0 replies; 5+ messages in thread
From: Ian Campbell @ 2015-04-21 12:44 UTC (permalink / raw)
  To: Wei Liu; +Cc: Ian Jackson, xen-devel

On Tue, 2015-04-21 at 12:30 +0100, Wei Liu wrote:
> On Tue, Apr 21, 2015 at 11:54:27AM +0100, Ian Campbell wrote:
> > On Tue, 2015-04-21 at 11:16 +0100, Wei Liu wrote:
> > > On Mon, Apr 20, 2015 at 03:07:38PM +0100, Wei Liu wrote:
> > > > 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.
> > > 
> > > Hmm... I just discovered that docs build also involves Paths.mk.  This
> > > patch is ugly enough that I don't want to duplicate it for docs.
> > > So advise on how to fix this would be much appreciated.
> > 
> > I wasn't terribly happy with having more than one place update Paths.mk
> > already.
> > 
> > > Or we can state clear that anyone who builds Xen from source needs to
> > > run ./configure in top level directory, not the ones in subsystems.
> > 
> > I think that's essentially what we've done so far, but it's not terribly
> > satisfactory I'll admit. Is this the only issue which prevents this?
> > 
> > Perhaps change each subsystem to generate+consume its own Paths
> > ${subsys}.mk instead of a single global one? Either in config/Paths
> > ${subsys.mk} or in ${subsys}/Paths.mk.
> > 
> > If you invoke from the top-level then they will all end up with the same
> > contents, but so what...
> > 
> 
> I can try to refactor Paths.mk.in into several files.

I was suggesting a single input but create multiple outputs, otherwise
we have to keep all the inputs in sync.

I expect the majority of paths are common to all sub components.

Ian.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-04-21 12:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-20 14:07 [PATCH] tools/configure.ac: generate Paths.mk if it's not available Wei Liu
2015-04-21 10:16 ` Wei Liu
2015-04-21 10:54   ` Ian Campbell
2015-04-21 11:30     ` Wei Liu
2015-04-21 12:44       ` Ian Campbell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.