[Libreoffice] Use cl.exe's -showIncludes to generate dependencies
kendy at suse.cz
Thu Apr 7 08:52:59 PDT 2011
On 2011-04-06 at 10:59 +0200, Bjoern Michaelsen wrote:
> 1) Handling of errors
> Maybe I missed it, but arent you eating all compiler errors?
I think I am not eating them ;-) stderr is not redirected (so it should
work OK), and also I pass every line that does not start with the Note:,
apart from the first one, which is useless, and makes the output ugly).
> 2) l10n of MSVC
> Localized versions of cl.exe will localize the "Note: including
> file:" string. Thus one would best make a "test-compile" in
> configure and find out how the string actually looks like on this
Ah, pffff... OK ;-)
> 3) case sensitivity
> For '#include ""' includes cl.exe creates all lowercase filepaths,
> while for '#include <>' it does the right thing and keeps case. make
> however is case sensitive (which makes sense, given that is is
> multiplatform and we are using a version running on a unix emulation
> even on windows). $(OUTDIR)/Foo.h and $(OUTDIR)/foo.h are different
> beasts for make.
So I was trying to spot this somewhere, and this is not happening here;
ie. the .d's seem to have correct case even for the includes that have
been included via "".
> 3) is the hard one, as there is no easy way to derive the case of
> filenames from the all lowercase path. Checking on the fly is IO and
> thus expensive. Caching the filenames might make thing easier, but is
> also introducing complexity and fragility.
Indeed - but seems that it is not an issue at least with my compiler
(Visual Studio 9), so no idea if is it something worth solving. Do you
have more details, like what exact compiler version was doing this? In
the worst case, this might make some failures in an incremental build,
but anything else? Release builds are clean builds anyway, so does not
sound like worth all the trouble we might have if we tried to cover
Additionally, I googled other scripts that do exactly the same thing
(generating .d from the -showIncludes), but none was addressing this...
More information about the LibreOffice