From: "Luis R. Rodriguez" Subject: Re: [PATCH v6 10/13] autoconf: xen: move standard path variables to config/Paths.mk.in Date: Wed, 2 Jul 2014 21:32:19 +0200 Message-ID: <20140702193219.GX27687@wotan.suse.de> References: <1402622331-4282-1-git-send-email-mcgrof@do-not-panic.com> <1402622331-4282-11-git-send-email-mcgrof@do-not-panic.com> <1404308054.5562.82.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1X2QGT-0003Y2-TU for xen-devel@lists.xenproject.org; Wed, 02 Jul 2014 19:32:22 +0000 Content-Disposition: inline In-Reply-To: <1404308054.5562.82.camel@kazak.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: Keir Fraser , "Luis R. Rodriguez" , Tim Deegan , Ian Jackson , Jan Beulich , Samuel Thibault , xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org On Wed, Jul 02, 2014 at 02:34:14PM +0100, Ian Campbell wrote: > On Thu, 2014-06-12 at 18:18 -0700, Luis R. Rodriguez wrote: > > diff --git a/m4/paths.m4 b/m4/paths.m4 > > new file mode 100644 > > index 0000000..717fcd1 > > --- /dev/null > > +++ b/m4/paths.m4 > > @@ -0,0 +1,61 @@ > > +AC_DEFUN([AX_XEN_EXPAND_CONFIG], [ > > +dnl expand these early so we can use this for substitutions > > +test "x$prefix" = "xNONE" && prefix=$ac_default_prefix > > +test "x$exec_prefix" = "xNONE" && exec_prefix=$ac_default_prefix > > This is a bit of shame. I suppose this needs to happen in the middle of > AC_OUTPUT which isn't possible? > > autoconf itself seems to quote the prefix so it is not expanded until > later, i.e. when config.status is run. Would that work here? Its unclear what exactly the recommendation is here. > Or perhaps we should just PREFIX=$prefix AC_SUBST(PREFIX) and put all > the BINDIR=$PREFIX/bin into Paths.mk.in after PREFIX=@PREFIX@? Why though? > > +BINDIR=$prefix/bin > > +AC_SUBST(BINDIR) > > + > > +SBINDIR=$prefix/sbin > > +AC_SUBST(SBINDIR) > > + > > +dnl XXX: this should be changed to use the passed $libexec > > +dnl but can be done as a second step > > +LIBEXEC=$prefix/lib/xen/bin > > +AC_SUBST(LIBEXEC) > > + > > +LIBDIR=`eval echo $libdir` > > Why is this one an eval? Yeah you're right, its not needed this should work just as well: LIBDIR=$libdir I've amended this change. > > diff --git a/stubdom/Makefile b/stubdom/Makefile > > index c41de27..ef99e3e 100644 > > --- a/stubdom/Makefile > > +++ b/stubdom/Makefile > > @@ -7,6 +7,7 @@ export stubdom=y > > export debug=y > > include $(XEN_ROOT)/Config.mk > > -include $(XEN_ROOT)/config/Stubdom.mk > > +include $(XEN_ROOT)/config/Paths.mk > > The reason for the -include of Stubdom.mk is so that if it doesn't exist > enogh of the Makefile is still run to get: > ifeq (,$(findstring clean,$(MAKECMDGOALS))) > $(XEN_ROOT)/config/Stubdom.mk: > $(error You have to run ./configure before building or installing stubdom) > endif > > You included Paths.mk from Stubdom.mk (and Tools.mk etc) so I think > these ones are redundant. OK ammended. Luis