From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roger Pau Monne Subject: Re: [PATCH 2/9] tools/build: fix pygrub linking Date: Thu, 12 Jul 2012 17:30:03 +0100 Message-ID: <4FFEFB8B.3040000@citrix.com> References: <1342002232-75531-1-git-send-email-roger.pau@citrix.com> <1342002232-75531-3-git-send-email-roger.pau@citrix.com> <4FFD5CDB.8090409@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4FFD5CDB.8090409@amd.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: Christoph Egger Cc: Ian Jackson , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org Christoph Egger wrote: > On 07/11/12 12:23, 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). >> >> Cc: Ian Jackson >> Cc: Christoph Egger >> Signed-off-by: Roger Pau Monne > > > Acked-by: Christoph Egger > >> --- >> tools/pygrub/Makefile | 2 ++ >> 1 files changed, 2 insertions(+), 0 deletions(-) >> >> diff --git a/tools/pygrub/Makefile b/tools/pygrub/Makefile >> index bd22dd4..835fd43 100644 >> --- a/tools/pygrub/Makefile >> +++ b/tools/pygrub/Makefile >> @@ -14,7 +14,9 @@ install: all >> $(PYTHON_PREFIX_ARG) --root="$(DESTDIR)" \ >> --install-scripts=$(PRIVATE_BINDIR) --force >> $(INSTALL_DIR) $(DESTDIR)/var/run/xend/boot >> +#ifneq ($(readlink -f $(PRIVATE_BINDIR)), $(readlink -f $(DESTDIR)/$(BINDIR))) >> ln -sf $(PRIVATE_BINDIR)/pygrub $(DESTDIR)/$(BINDIR) >> +#endif I'm afraid I've not removed the "#" here (don't know why I've put them on the first place), and also $(shell ...) should be used to get the output. This is the correct path: 8<--------------------------------------------------------------------- Subject: [PATCH] tools/build: fix pygrub linking Prevent creating a symlink to $(DESTDIR)/$(BINDIR) if it is the same as $(PRIVATE_BINDIR) This fixes NetBSD install, where $(DESTDIR)/$(BINDIR) == $(PRIVATE_BINDIR). Cc: Ian Jackson Cc: Christoph Egger Signed-off-by: Roger Pau Monne --- tools/pygrub/Makefile | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/tools/pygrub/Makefile b/tools/pygrub/Makefile index bd22dd4..182afdd 100644 --- a/tools/pygrub/Makefile +++ b/tools/pygrub/Makefile @@ -14,7 +14,9 @@ install: all $(PYTHON_PREFIX_ARG) --root="$(DESTDIR)" \ --install-scripts=$(PRIVATE_BINDIR) --force $(INSTALL_DIR) $(DESTDIR)/var/run/xend/boot +ifneq ($(shell readlink -f $(DESTDIR)/$(BINDIR)), $(shell readlink -f $(PRIVATE_BINDIR))) ln -sf $(PRIVATE_BINDIR)/pygrub $(DESTDIR)/$(BINDIR) +endif .PHONY: clean clean: -- 1.7.7.5 (Apple Git-26)