[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Make depmode=cpp work with Microsoft Visual C++ on MSYS.
From: |
Ralf Wildenhues |
Subject: |
Re: Make depmode=cpp work with Microsoft Visual C++ on MSYS. |
Date: |
Tue, 3 Mar 2009 22:35:40 +0100 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
Hi Peter,
* Peter Rosin wrote on Fri, Jan 30, 2009 at 11:20:13AM CET:
> +2009-01-30 Peter Rosin <address@hidden>
> +
> + Add depmode=msvcmsys for Microsoft Visual C++ on MSYS.
> + * lib/depcomp [msvisualcpp]: Fork fewer processes. Filter out
> + libtool in the preprocessor invocation (as is done in
> + depmode=cpp). Silence compiler stderr.
> + [msvcmsys]: New depmode as a derivative of depmode=msvisualcpp.
> + msvcmsys transforms any backslashes into forward slashes to
> + make the grep in depend.m4 match, instead of the "cygpath -u"
> + that is used in msvisualcpp.
I've applied this change, both branches, but ...
> --- a/lib/depcomp
> +++ b/lib/depcomp
> @@ -85,6 +85,15 @@ if test "$depmode" = dashXmstdout; then
> depmode=dashmstdout
> fi
>
> +cygpath_u="cygpath -u -f -"
> +if test "$depmode" = msvcmsys; then
> + # This is just like msvisualcpp but w/o cygpath translation.
> + # Just convert the backslash-escaped backslashes to single forward
> + # slashes to satisfy depend.m4
> + cygpath_u="sed s:\\\\\\\\:/:g"
... changed this line to be
cygpath_u="sed s,\\\\\\\\,/,g"
for good measure; not sure if the MinGW machinery would start mangling
your nice sed script on systems with an S: drive mounted.
> + depmode=msvisualcpp
> +fi
> +
> @@ -555,16 +578,23 @@ msvisualcpp)
> ;;
> esac
> done
> - "$@" -E |
> - sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u
> \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
> + "$@" -E 2>/dev/null |
> + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u >
> "$tmpdepfile"
BTW, why was that 2>/dev/null necessary again?
Thanks again, and sorry for the long delay.
Cheers,
Ralf
- Re: Make depmode=cpp work with Microsoft Visual C++ on MSYS.,
Ralf Wildenhues <=