From: Wei Liu Subject: Re: [PATCH] stubdom: fix make clean and distclean on a freshly cloned tree Date: Mon, 2 Mar 2015 14:25:22 +0000 Message-ID: <20150302142521.GD11855@zion.uk.xensource.com> References: <1425294550-8461-1-git-send-email-wei.liu2@citrix.com> <20150302111506.GA11855@zion.uk.xensource.com> <1425305743.21151.44.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1425305743.21151.44.camel@citrix.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: Wei Liu , Stefano Stabellini , Ian Jackson , xen-devel@lists.xen.org, Sander Eikelenboom , samuel.thibault@ens-lyon.org List-Id: xen-devel@lists.xenproject.org On Mon, Mar 02, 2015 at 02:15:43PM +0000, Ian Campbell wrote: > On Mon, 2015-03-02 at 11:15 +0000, Wei Liu wrote: > > > -include $(XEN_ROOT)/Config.mk > > > + > > > +ifeq (,$(findstring clean,$(MAKECMDGOALS))) > > > + ifeq ($(wildcard $(MINI_OS)/Config.mk),) > > > > + $(error Please run `make mini-os-dir' in top-level directory) > > > + endif > > > + include $(XEN_ROOT)/Config.mk > > I'm not sure why the inclusion of this apparently unrelated file > ($(MINI_OS) vs $(XEN_ROOT) is conditionalised here. > > If that wasn't here then the two ifeq's could be combined into something > like: > > ifeq(,$(findstring clean,$(MAKECMDGOALS)$(wildcard $(MINI_OS)/Config.mk)) > > or is that too subtle? > A bit subtle to me. I used the same line for all three locations so it might be easier to understand the condition. > > > +endif > > > + > > > -include $(XEN_ROOT)/config/Stubdom.mk > > > > > > GNU_TARGET_ARCH:=$(XEN_TARGET_ARCH) > > > diff --git a/stubdom/c/Makefile b/stubdom/c/Makefile > > > index c646c26..b252dca 100644 > > > --- a/stubdom/c/Makefile > > > +++ b/stubdom/c/Makefile > > > @@ -1,6 +1,8 @@ > > > XEN_ROOT = $(CURDIR)/../.. > > > > > > +ifeq (,$(findstring clean,$(MAKECMDGOALS))) > > > include $(XEN_ROOT)/Config.mk > > XEN_ROOT/Config.mk always exists. Did you misread it as MINI_OS? > No, I don't think I misread. The subtle thing is that XEN_ROOT/Config.mk has include $(XEN_ROOT)/config/$(XEN_OS).mk Here XEN_OS=MiniOS. Then in MiniOS.mk include $(XEN_ROOT)/extras/mini-os/Config.mk If you don't have extra/mini-os you get an error. Wei. > (and in the next hunk too) >