[vlc-commits] tools: patch automake to recognize the dependencies of CLang on MINGW64

Steve Lhomme git at videolan.org
Thu May 16 10:01:53 CEST 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Mar  1 11:39:21 2019 +0100| [8ef151d9b10433b21dbf2e55075734f95213ebb2] | committer: Steve Lhomme

tools: patch automake to recognize the dependencies of CLang on MINGW64

It's like gcc but the pathes are Windows pathes.
GNU Make has no problem with these kind of dependencies.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8ef151d9b10433b21dbf2e55075734f95213ebb2
---

 extras/tools/automake-clang.patch | 39 +++++++++++++++++++++++++++++++++++++++
 extras/tools/tools.mak            |  1 +
 2 files changed, 40 insertions(+)

diff --git a/extras/tools/automake-clang.patch b/extras/tools/automake-clang.patch
new file mode 100644
index 0000000000..63fb668f91
--- /dev/null
+++ b/extras/tools/automake-clang.patch
@@ -0,0 +1,39 @@
+--- automake/lib/depcomp.clangmsvc	2014-12-31 14:26:32.000000000 +0100
++++ automake/lib/depcomp	2019-03-01 11:33:02.672713200 +0100
+@@ -563,6 +563,36 @@ msvc7msys)
+   exit 1
+   ;;
+ 
++gccwindows)
++## clang producing windows pathes
++  for arg
++  do
++    case $arg in
++    -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
++    *)  set fnord "$@" "$arg" ;;
++    esac
++    shift # fnord
++    shift # $arg
++  done
++  "$@"
++  stat=$?
++  if test $stat -ne 0; then
++    rm -f "$tmpdepfile"
++    exit $stat
++  fi
++  rm -f "$depfile"
++
++  # Extracts the file names and escapes backslashes for cygpath.
++  sed < "$tmpdepfile" '
++/^*\(.*\)/ {
++  s//\1/
++  s/\\/\\\\/g
++  p
++}' | $cygpath_u | sed "s, /, \\\\,g" >> "$depfile"
++  echo >> "$depfile" # make sure the fragment doesn't end with a backslash
++  rm -f "$tmpdepfile"
++  ;;
++
+ #nosideeffect)
+   # This comment above is used by automake to tell side-effect
+   # dependency tracking mechanisms from slower ones.
diff --git a/extras/tools/tools.mak b/extras/tools/tools.mak
index 8e17911a25..f20934284d 100644
--- a/extras/tools/tools.mak
+++ b/extras/tools/tools.mak
@@ -199,6 +199,7 @@ automake-$(AUTOMAKE_VERSION).tar.gz:
 
 automake: automake-$(AUTOMAKE_VERSION).tar.gz
 	$(UNPACK)
+	$(APPLY) automake-clang.patch
 	$(MOVE)
 
 .buildautomake: automake .autoconf



More information about the vlc-commits mailing list