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

I deleted tup database and outputs of the project, recreated everything and in the database some sources still have "-1" while others have valid timestamp. Strange... However this causes me no trouble (or I didn't notice any).

Anyway - I've created a simple test case that uses GCC and mimics your test. Just create main.c file:

--->8---

int main(void)
{
  return 0;
}

--->8---

And a Tupfile:

--->8---

: foreach *.c |> gcc -c %f -o %o |> %B.o
: *.o |> g++ -Wl,-Map=%o.map %f -o %o |> program | program.map

--->8---

When I run tup for the first time in such "project: I get:

"1"    "1"    "0"    "2"    "-1"    "-1"  "."
"2"    "2"    "1"    "0"    "1412171036"    "-1"    "main.c"
"3"    "3"    "1"    "0"    "1412171273"    "-1"    "Tupfile"
"4"    "4"    "1"    "5"    "-1"    "-1"    "tup.config"
"5"    "5"    "1"    "2"    "-1"    "-1"    "$"
"6"    "6"    "5"    "3"    "-1"    "-1"    "PATH"
"7"    "7"    "1"    "4"    "1412171540"    "1"    "main.o"
"8"    "8"    "1"    "1"    "21"    "-1"    "gcc -c main.c -o main.o"
"9"    "9"    "1"    "4"    "1412171540"    "1"    "program"
"10"    "10"    "1"    "4"    "1412171540"    "1"    "program.map"
"11" "11" "1" "1" "42" "-1" "g++ -Wl,-Map=program.map main.o -o program"
"12"    "12"    "1"    "5"    "-1"    "-1"    "main.c.gch"

This data is identical to what stat gives:

$ stat -t program program.map
program 6819 16 81ed 1000 1000 804 13369998 1 0 0 1412171540 1412171540 1412171540 0 4096 program.map 17346 40 81a4 1000 1000 804 13369997 1 0 0 1412171540 1412171540 1412171540 0 4096

There are no rebuilds after that. If I touch main.c to cause a rebuild, the dates are updated to what stat gives.

Could you try that example with gcc and see how it works for you?

Regards,
FCh

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