]> git.proxmox.com Git - cargo.git/commitdiff
Fix `make install` on Windows
authorklutzy <klutzytheklutzy@gmail.com>
Thu, 18 Sep 2014 17:34:35 +0000 (02:34 +0900)
committerklutzy <klutzytheklutzy@gmail.com>
Fri, 19 Sep 2014 01:56:55 +0000 (10:56 +0900)
Since `Makefile` passes `--destdir="$$(DESTDIR)/"` to `install.sh`,
`make install` tries to install libraries to
`$CFG_DESTDIR$CFG_PREFIX/$CFG_LIBDIR_RELATIVE` which is usually
`//path/to/usr/$CFG_LIBDIR_RELATIVE`.

The POSIX spec [1] states that if path begins with `//` it is
implementation-defined.
Usual systems treat them as normal abaolute path, but cygwin and MSYS
does not! They use `//hostname/path` syntax for network drives.
This caused `make install` issue on Windows.

This patch removes `/` of destdir to solve the issue.

[1]: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_12

Makefile.in

index 32080c892fc549318817e299e14d33215c34e458..24005dc076ea9ccc6b724e948c5a93d5ebb02427 100644 (file)
@@ -174,7 +174,7 @@ endif
 install-$(1): prepare-manifest-$(1)
        $$(PKGDIR_$(1))/install.sh \
                --prefix="$$(CFG_PREFIX)" \
-               --destdir="$$(DESTDIR)/" $$(MAYBE_DISABLE_VERIFY)
+               --destdir="$$(DESTDIR)" $$(MAYBE_DISABLE_VERIFY)
 endef
 $(foreach target,$(CFG_TARGET),$(eval $(call DO_DIST_TARGET,$(target))))