[Omake] Re: preprocessor for computing dependencies

malc malc at pulsesoft.com
Wed Sep 13 14:24:01 PDT 2006


On Thu, 14 Sep 2006, Jason Hickey wrote:

> B?r?ur ?rantsson wrote:
> > I think VC+6.0 has basically been obsoleted by the free VC++ which
>> Microsoft released some time ago. I'm not really interested in the Windows 
>> platform, but I *think* this is it:
>>
>>   http://msdn.microsoft.com/vstudio/express/visualC/default.aspx
>> 
>> It *may* have an option for doing dependency analysis.
>
> It looks like it might.  It seems reasonable at least to put in a check for 
> the /showIncludes option, and use it if possible.

I think i mentioned that already a few times, there's an utility that
post-process whatever cl has to offer and output make style dependency
information. Works on both windows and unix (cl in this case runs via
WINE and the tool goes through the trouble of dealing with drive
letters, fixing the paths, case sensetiveness and so on) The tool is
written in OCaml. And is in fact integrated into my own OMake based build
system.

Available at:
http://www.boblycat.org/~malc/imt/

<example-transcript>
imt$ ls -l
total 4
-rw-rw-r--   1 malc     malc           71 Sep 14 01:12 a.c
-rw-rw-r--   1 malc     malc            0 Sep 14 01:11 a.h
-rw-rw-r--   1 malc     malc            0 Sep 14 01:11 b.h

imt$ cat a.c
#include <stdlib.h>
#include "a.h"
#include "e:/home/malc/tmp/imt/b.h"

imt$ imt dep7 a.o a.c
a.c
a.o: /home/malc/tmp/imt/a.h /home/malc/tmp/imt/b.h 
/mnt/big/win/vctoolkit/include/stdlib.h

imt$ imt dep a.o a.c
a.c
a.o: a.c /mnt/big/win/vctoolkit/include/stdlib.h /home/malc/tmp/imt/b.h 
/home/malc/tmp/imt/a.h

imt$ export IMT_REJ=/mnt/big/win/

imt$ imt dep7 a.o a.c
a.c
a.o: /home/malc/tmp/imt/a.h /home/malc/tmp/imt/b.h

imt$ readlink ~/.wine/dosdevices/e:
/
</example-transcript>

imt dep subcommand parses /E output
imt dep7 uses /showIncludes

a.c that is present in the transcript is what ends in stderr, i.e. it
is safe to redirect this output or let OMake deal with it in .SCANNER
rule.

--
mailto:malc at pulsesoft.com


More information about the Omake mailing list