From: Ian Campbell Subject: Re: [PATCH v2 1/5] tools/build: fix pygrub linking Date: Wed, 1 Aug 2012 12:47:40 +0100 Message-ID: <1343821660.27221.82.camel@zakaz.uk.xensource.com> References: <1343332476-33765-1-git-send-email-roger.pau@citrix.com> <1343332476-33765-2-git-send-email-roger.pau@citrix.com> <1343378909.6812.86.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1343378909.6812.86.camel@zakaz.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: Roger Pau Monne Cc: Christoph Egger , Ian Jackson , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Fri, 2012-07-27 at 09:48 +0100, Ian Campbell wrote: > On Thu, 2012-07-26 at 20:54 +0100, Roger Pau Monne wrote: > > Prevent creating a symlink to $(DESTDIR)/$(BINDIR) if it is the same > > as $(PRIVATE_BINDIR) > > > > This fixes NetBSD install, where $(DESTDIR)/$(BINDIR) == > > $(PRIVATE_BINDIR). > > [...] > > Changes since v1: > > > > * Do the check in shell instead of Makefile. > > > > Cc: Ian Jackson > > Cc: Christoph Egger > > Signed-off-by: Roger Pau Monne > > Acked-by: Ian Campbell Applied, thanks. > > > --- > > tools/pygrub/Makefile | 5 ++++- > > 1 files changed, 4 insertions(+), 1 deletions(-) > > > > diff --git a/tools/pygrub/Makefile b/tools/pygrub/Makefile > > index bd22dd4..8c99e11 100644 > > --- a/tools/pygrub/Makefile > > +++ b/tools/pygrub/Makefile > > @@ -14,7 +14,10 @@ install: all > > $(PYTHON_PREFIX_ARG) --root="$(DESTDIR)" \ > > --install-scripts=$(PRIVATE_BINDIR) --force > > $(INSTALL_DIR) $(DESTDIR)/var/run/xend/boot > > - ln -sf $(PRIVATE_BINDIR)/pygrub $(DESTDIR)/$(BINDIR) > > + set -e; if [ `readlink -f $(DESTDIR)/$(BINDIR)` != \ > > + `readlink -f $(PRIVATE_BINDIR)` ]; then \ > > + ln -sf $(PRIVATE_BINDIR)/pygrub $(DESTDIR)/$(BINDIR); \ > > + fi > > > > .PHONY: clean > > clean: > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel