From 108fdb564b06e58087a3ccfdad5996a878d39b9a Mon Sep 17 00:00:00 2001 From: Roger Pau Monne Date: Wed, 1 Aug 2012 12:46:47 +0100 Subject: 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 Acked-by: Ian Campbell Committed-by: Ian Campbell --- tools/pygrub/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tools/pygrub') 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: -- cgit v1.2.3