On Wed, Oct 1, 2014 at 10:04 AM, Freddie Chopin <[email protected]>
wrote:

> On 10/01/2014 03:31 PM, [email protected] wrote:
> > http://sqlitebrowser.org/
> >
> > Just open .tup/db and inspect table "node".
>
> OK, I'm browsing through my projects and I see a lot of nodes that have
> "-1" in mtime column. By "a lot" I mean about 80% of all the nodes have
> "-1" there. These are:
> - all system headers,
> - all system libraries,
> - all tup build files,
> - all directories,
> - .gch files (precompiled headers - these files are created and deleted
> during compilation),
> - some source files that I did not edit for a long time or that were
> created recently and edited (this is actually strange...).
>
> So I guess that's pretty normal to have "-1" there... In my case it does
> no harm - no unneccessary rebuilds are done. I'm currently on linux, but I
> had no problems on Windows...
>

Whether or not the mtime has any meaning depends on the "type" field. A lot
of these files with -1 timestamps are probably "ghost" nodes, which are
placeholder nodes for files that would impact the build, but haven't been
created yet. For example:

gcc -Ia -Ib -c foo.c -o foo.o

If foo.c does a #include foo.h, and only b/foo.h exists, then tup will have
nodes like:

a/foo.h - ghost (type 5, mtime -1)
b/foo.h - regular file (type 0, valid mtime)
foo.c - regular file (type 0, valid mtime)
foo.o - generated file (type 4, valid mtime)
"gcc -Ia -Ib -c foo.c" - command node (type 1, mtime == command runtime in
milliseconds)

The generated files are initially added to the database when the Tupfile is
parsed, and have an mtime of -1 there. However, after the command actually
executes, tup is supposed to stat each file and see what the new mtime is
and save that to the db. For some reason, that isn't happening in
Bernhard's case. To me it's looking like a bug in tup - I'd guess however
it is creating the files is slightly different from how other programs like
gcc do it, but it's hard to guess why.

Bernhard, are you comfortable running your toolchain through Procmon to see
what calls are used to create DMA.out and such? Or, I could try to add some
debug statements to tup and send you a new exe to try.

Thanks,
-Mike

-- 
-- 
tup-users mailing list
email: [email protected]
unsubscribe: [email protected]
options: http://groups.google.com/group/tup-users?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"tup-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to