Hi Elliott, On Tue, Jan 7, 2014 at 1:07 AM, Elliott Conant <[email protected]> wrote:
> I have a project where I used to include the entire source of gtest and > gmock, and I'm trying to refactor it so gtest and gmock are treated as > external projects but still built. Is this possible? I'd prefer not to > add new tupfiles outside of ~/projects/Project. > I also set the option updater.full_deps = 'true' which tracks dependencies > outside of the project dir, but it doesn't seem to help this case. > > So I have: > > /usr/src/gtest/src/gtest-all.cc > /usr/src/gmock/src/gmock-all.cc > > ~/projects/Project > Tupfile > *.cc > *.h > > ~/projects/Project/Tupfile: > : /usr/src/gtest/src/gtest-all.cc |> !cc |> > : /usr/src/gmock/src/gmock-all.cc |> !cc |> > ... > > And I'm getting an error from Tup: > tup error: Failed to find directory ID for dir > '/usr/src/gtest/src/gtest-all.cc' relative to 35 > tup error: Error parsing Tupfile line 2 > Line was: ': /usr/src/gtest/src/gtest-all.cc |> !cc |>' > Tup is trying to convert the path to a database node, and this part of the code doesn't account for full deps. It's just expecting all inputs to be inside the .tup hierarchy. The easiest thing you can probably do is just add symlinks to gtest-all.cc and gmock-all.cc inside your project: cd ~/projects/Project ln -s /usr/src/gmock/src/gmock-all.cc Then in the Tupfile: : foreach *.cc |> !cc |> Since you have full_deps enabled, a change to /usr/src/gmock/src/gmock-all.cc should get picked up and cause it to be rebuilt: $ tup upd [ tup ] [0.000s] Scanning filesystem... External file has changed: /home/marf/test-fulldep/src/gmock-all.c [ tup ] [0.030s] Reading in new environment variables... [ tup ] [0.030s] No Tupfiles to parse. [ tup ] [0.030s] No files to delete. [ tup ] [0.030s] Executing Commands... 1) [0.022s] gcc -c gmock-all.c -o gmock-all.o [ ] 100% [ tup ] [0.070s] Updated. Does that help? If not we can try some other options. -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/groups/opt_out.
