From: Wei Liu Subject: Re: [PATCH for 4.6] build: fix tarball stubdom build Date: Fri, 28 Aug 2015 09:47:27 +0100 Message-ID: <20150828084727.GB17809@zion.uk.xensource.com> References: <1440690841-10076-1-git-send-email-wei.liu2@citrix.com> <55DF5184020000780009D8B6@prv-mh.provo.novell.com> <20150827162436.GT22586@zion.uk.xensource.com> <55E01EAB020000780009DA8A@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZVFJs-0002jh-92 for xen-devel@lists.xenproject.org; Fri, 28 Aug 2015 08:47:32 +0000 Content-Disposition: inline In-Reply-To: <55E01EAB020000780009DA8A@prv-mh.provo.novell.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: Jan Beulich Cc: Ian Jackson , Wei Liu , Ian Campbell , Xen-devel List-Id: xen-devel@lists.xenproject.org On Fri, Aug 28, 2015 at 12:41:15AM -0600, Jan Beulich wrote: > >>> On 27.08.15 at 18:24, wrote: > > On Thu, Aug 27, 2015 at 10:05:56AM -0600, Jan Beulich wrote: > >> >>> On 27.08.15 at 17:54, wrote: > >> > When we create a source code tarball, mini-os is extracted to > >> > extras/mini-os directory. When building a source code tarball, we > >> > shouldn't clone mini-os again. > >> > > >> > Only clone mini-os when that directory doesn't exist. This fixes tarball > >> > build and doesn't affect non-tarball build. > >> > > >> > Signed-off-by: Wei Liu > >> > Cc: Ian Campbell > >> > Cc: Ian Jackson > >> > --- > >> > Makefile | 10 ++++++---- > >> > 1 file changed, 6 insertions(+), 4 deletions(-) > >> > > >> > diff --git a/Makefile b/Makefile > >> > index e8a75ff..ba0df70 100644 > >> > --- a/Makefile > >> > +++ b/Makefile > >> > @@ -19,10 +19,12 @@ include Config.mk > >> > > >> > .PHONY: mini-os-dir > >> > mini-os-dir: > >> > - GIT=$(GIT) $(XEN_ROOT)/scripts/git-checkout.sh \ > >> > - $(MINIOS_UPSTREAM_URL) \ > >> > - $(MINIOS_UPSTREAM_REVISION) \ > >> > - $(XEN_ROOT)/extras/mini-os > >> > + if [ ! -d $(XEN_ROOT)/extras/mini-os ]; then \ > >> > + GIT=$(GIT) $(XEN_ROOT)/scripts/git-checkout.sh \ > >> > + $(MINIOS_UPSTREAM_URL) \ > >> > + $(MINIOS_UPSTREAM_REVISION) \ > >> > + $(XEN_ROOT)/extras/mini-os ; \ > >> > + fi > >> > >> Wouldn't his better be done (avoiding the need for the shell > >> conditional) by simply renaming the make target from > >> mini-os-dir to extras/mini-os (and dropping the .PHONY)? > > > > All targets for external trees follow some conventions defined in > > tools/Makefile. Although I didn't strictly follow the same rules in > > mini-os's case, I don't want it to deviate from the original rules too > > much. > > That's not true: ${target}-dir are actual directories (and hence > not phony targets) in tools/Makefile (they might also be symlinks, > but that's not of interest for the purposes here). Which is > precisely what I'm asking to be done here too, just that I'd see > the existing naming (extra/mini-os) preserved rather than > changed to extra/mini-os-dir). > Yeah. That's why I said "I didn't strictly follow the same rules". To strictly follow rules, mini-os source code should have been in mini-os-dir (a symlink to mini-os-dir-remote or real directory containing source code). Target mini-os-dir should have been mini-os-dir-find. That would cause less confusion. But because stubdom build system is very fragile, I didn't want to touch its Makefile too much so the name mini-os is preserved. And because mini-os doesn't support out-of-tree build, mini-os-dir again was not necessary. I can submit another patch to make mini-os-dir mini-os-dir-find? Other than that trying to wire up everything to consistently follow the rules is too much effort for too little gain. Wei. > Jan