]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
rust: fix vendor use on MinGW 4490/head
authorVictor Julien <victor@inliniac.net>
Fri, 17 Jan 2020 15:40:38 +0000 (16:40 +0100)
committerJason Ish <jason.ish@oisf.net>
Fri, 17 Jan 2020 22:02:03 +0000 (16:02 -0600)
configure.ac
rust/.cargo/config.in
rust/Makefile.am

index 3a76ece0e39d7b248347bc715ae33caf707b6f4c..8ca1f6744e57aef179d693257246ff58b7dff962 100644 (file)
@@ -85,7 +85,7 @@
     AC_PROG_GREP
 
     AC_PATH_PROG(HAVE_CYGPATH, cygpath, "no")
-    AM_CONDITIONAL([HAVE_CYGPATH], [test "x$enable_cygpath" = "xyes"])
+    AM_CONDITIONAL([HAVE_CYGPATH], [test "x$HAVE_CYGPATH" != "xno"])
 
     AC_PATH_PROG(HAVE_PKG_CONFIG, pkg-config, "no")
     if test "$HAVE_PKG_CONFIG" = "no"; then
@@ -2415,7 +2415,12 @@ fi
     AC_SUBST(RUST_SURICATA_LIB)
     AC_SUBST(RUST_LDADD)
     if test "x$CARGO_HOME" = "x"; then
-      AC_SUBST([CARGO_HOME], [~/.cargo])
+        if test "x$HAVE_CYGPATH" != "no"; then
+          CYGPATH_CARGO_HOME=$(cygpath -a -t mixed ~/.cargo)
+          AC_SUBST([CARGO_HOME], [$CYGPATH_CARGO_HOME])
+        else
+          AC_SUBST([CARGO_HOME], [~/.cargo])
+        fi
     else
       AC_SUBST([CARGO_HOME], [$CARGO_HOME])
     fi
index 86b29f81c42045a6dcfbeaafbdcde0009f8ec6a6..e96f9fbc1da3acd4ab98f590c9da2c6b99bda952 100644 (file)
@@ -5,4 +5,4 @@
 @rust_vendor_comment@replace-with = 'vendored-sources'
 @rust_vendor_comment@
 @rust_vendor_comment@[source.vendored-sources]
-@rust_vendor_comment@directory = '@abs_top_srcdir@/rust/vendor'
+@rust_vendor_comment@directory = '@e_rustdir@/vendor'
index aaa589e1a7d3756315ec4e20497551eb43bd0f21..747a59fb05fb8b7315d3fcd1675c82f7de8c86c1 100644 (file)
@@ -27,10 +27,9 @@ if HAVE_PYTHON
        cd $(top_srcdir)/rust && $(HAVE_PYTHON) ./gen-c-headers.py
 endif
 if HAVE_CYGPATH
-       rustpath=`cygpath -a -t mixed $(abs_top_builddir)`
        @rustup_home@ \
                CARGO_HOME="$(CARGO_HOME)" \
-               CARGO_TARGET_DIR="$$rustpath/rust/target" \
+               CARGO_TARGET_DIR="$(e_rustdir)/target" \
                $(CARGO) build $(RELEASE) \
                        --features "$(RUST_FEATURES)" $(RUST_TARGET)
 else