]> git.proxmox.com Git - cargo.git/commitdiff
Set PWD in a unix fashion for distcheck
authorAlex Crichton <alex@alexcrichton.com>
Wed, 17 Sep 2014 19:30:58 +0000 (12:30 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Wed, 17 Sep 2014 20:03:25 +0000 (13:03 -0700)
See comments in the makefile

Makefile.in

index 359f09a08bac8ccc0ccbffba1ed95cdb19164e84..32080c892fc549318817e299e14d33215c34e458 100644 (file)
@@ -130,16 +130,21 @@ $(DOC_DIR)/%: src/doc/%
 define DO_DIST_TARGET
 dist-$(1): $$(DISTDIR_$(1))/$$(PKG_NAME)-$(1).tar.gz
 
+# One may wonder why some of the commands here are prefixed with `cd -P .`, and
+# that's a good question! On some of the windows bots, PWD has a windows-style
+# path, and that ends up choking the installation script in various ways.
+# Prefixing commands with this `cd -P .` helps the bots to set the right PWD env
+# var.
 distcheck-$(1): dist-$(1)
        rm -rf $$(TARGET_$(1))/distcheck
        mkdir -p $$(TARGET_$(1))/distcheck
        (cd $$(TARGET_$(1))/distcheck && tar xf ../dist/$$(PKG_NAME)-$(1).tar.gz)
-       $$(TARGET_$(1))/distcheck/$$(PKG_NAME)-$(1)/install.sh \
+       cd -P . && $$(TARGET_$(1))/distcheck/$$(PKG_NAME)-$(1)/install.sh \
                --prefix=$$(TARGET_$(1))/distcheck/install
        $$(TARGET_$(1))/distcheck/install/bin/cargo -V > /dev/null
-       $$(TARGET_$(1))/distcheck/$$(PKG_NAME)-$(1)/install.sh \
+       cd -P . && $$(TARGET_$(1))/distcheck/$$(PKG_NAME)-$(1)/install.sh \
                --prefix=$$(TARGET_$(1))/distcheck/install --uninstall
-       [ -f $$(TARGET_$(1))/distcheck/install/bin/cargo ] && exit 1 || exit 0
+       [ -f $$(TARGET_$(1))/distcheck/install/bin/cargo$(X) ] && exit 1 || exit 0
 
 $$(DISTDIR_$(1))/$$(PKG_NAME)-$(1).tar.gz: prepare-manifest-$(1)
        tar -czvf $$@ -C $$(@D) $$(PKG_NAME)-$(1)