automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Make depmode=cpp work with Microsoft Visual C++ on MSYS.


From: Peter Rosin
Subject: Re: Make depmode=cpp work with Microsoft Visual C++ on MSYS.
Date: Wed, 25 Feb 2009 14:28:39 +0100
User-agent: Thunderbird 2.0.0.19 (Windows/20081209)

Den 2009-01-31 23:04 skrev Peter Rosin:
Den 2009-01-31 10:44, skrev Ralf Wildenhues:
* Peter Rosin wrote on Fri, Jan 30, 2009 at 11:20:13AM CET:
Here is an update that forks *a lot* less.

Thanks.

Dependencies work as far as I can see when I compile libltdl using
MSVC on both Cygwin (depmode=msvisualcpp) and MSYS (depmode=msvcmsys).

Just to be sure: that means
- it doesn't cause spurious rebuilds when nothing has changed,
- it rebuilds when a (directly or indirectly) included header changed,
- it fails to fully rebuild if a header is removed, or changed to
  contain a synyax error.
Right?

Confirmed on all counts, both Cygwin/MSVC and MSYS/MSVC.

But native MSVC on
Cygwin fails during link, but that's totally unrelated...

Please, post error output for such a statement.

It's libtool being incomplete and therefore confusing MS lib
with /posix/paths when it wants C:\Win32\paths. Sorry for not
being more informative first time around... I have preliminary
fixes for the libtool problem and have now built libltdl with
MSVC on Cygwin (oh, I also needed a couple of tiny fixes in
the compile script, will send those in another mail later).

("cygpath -f -" support was checked into cvs April 2000.)

OK.

+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.

Hmm.  Can you expand on this a bit?  The way I read this now, it looks
like we're working around some wart in depend.m4.  But from the
discussion, I gather that you're doing this forward/backward slashes
thing in order to be able to differentiate between Cygwin and MinGW.
Is that correct?  If not, why not change depend.m4 to fit?  Then you
can save another fork with MSYS, by factorizing a bit differently.

No need to generate a new patch, I'm just asking for clarification at
this point.

The MSVC preprocessor output has paths like this
    C:\\foo\\bar\\gazonk.h
I.e. C style strings. I was a bit defensive and wanted to convert that to
    C:\foo\bar\gazonk.h
but knowing that depend.m4 looked specifically for / and not backslash
I decided to also slashify it since / is also valid (in very nearly all
cases) on Win32.

It has some appeal that with /es, the change is confined to depcomp,
and it will be easy to manually update packages that have not yet picked
up a fresh automake.

Final thing that made me not optimize out this fork that I don't know
offhand how to write the pipe with one optional component, short of
using eval which would change quoting semantics which I was afraid of.

So, it had nothing to do with Cygwin/MinGW differentiation...

Ping?

Cheers,
Peter




reply via email to

[Prev in Thread] Current Thread [Next in Thread]