]> xenbits.xensource.com Git - people/iwj/xen.git/commitdiff
tools/pygrub: Fix install when $(BINDIR) and $(PRIVATE_BINDIR) are the same
authorChristoph Egger <chegger@amazon.de>
Wed, 24 Apr 2013 11:19:31 +0000 (12:19 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Wed, 24 Apr 2013 11:19:31 +0000 (12:19 +0100)
Do not override pygrub with a symbolic link in this case.

Signed-off-by: Christoph Egger <chegger@amazon.de>
Reviewed-by: Matt Wilson <msw@amazon.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
[ ijc -- reworded summary to fit on one line ]

tools/pygrub/Makefile

index 039f7f7e4a18d19549555287616e218b180d213b..0191638ad1ff6717e876068d85c1a725cc476161 100644 (file)
@@ -14,7 +14,8 @@ install: all
                $(PYTHON_PREFIX_ARG) --root="$(DESTDIR)" \
                --install-scripts=$(PRIVATE_BINDIR) --force
        $(INSTALL_DIR) $(DESTDIR)/var/run/xend/boot
-       set -e; if [ "`readlink -f $(DESTDIR)/$(BINDIR)`" != \
+       set -e; if [ $(BINDIR) != $(PRIVATE_BINDIR) -a \
+                    "`readlink -f $(DESTDIR)/$(BINDIR)`" != \
                     "`readlink -f $(PRIVATE_BINDIR)`" ]; then \
            ln -sf $(PRIVATE_BINDIR)/pygrub $(DESTDIR)/$(BINDIR); \
        fi