aboutsummaryrefslogtreecommitdiffstats
path: root/tools/pygrub
diff options
context:
space:
mode:
authorRoger Pau Monne <roger.pau@citrix.com>2012-08-01 12:46:47 +0100
committerRoger Pau Monne <roger.pau@citrix.com>2012-08-01 12:46:47 +0100
commit108fdb564b06e58087a3ccfdad5996a878d39b9a (patch)
treeb6e33dba19104370003bea4a11528fb3270cb250 /tools/pygrub
parenta5c3771c0837c034f296fa2a646688b7ab52c486 (diff)
downloadxen-108fdb564b06e58087a3ccfdad5996a878d39b9a.tar.gz
xen-108fdb564b06e58087a3ccfdad5996a878d39b9a.tar.bz2
xen-108fdb564b06e58087a3ccfdad5996a878d39b9a.zip
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 <ian.jackson@eu.citrix.com> Cc: Christoph Egger <Christoph.Egger@amd.com> Signed-off-by: Roger Pau Monne <roger.pau@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'tools/pygrub')
-rw-r--r--tools/pygrub/Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/pygrub/Makefile b/tools/pygrub/Makefile
index bd22dd41f2..8c99e11b68 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: