gittup/tup

tup_preserve produces broken links

uohmak4fvpqe opened this issue · 2 comments

I was trying to use the following (in conjunction with variants):

:foreach *.hh |>!tup_preserve |>../%B ../<up_headers>

but the link produced is broken because the target has an extra /..

However the following does work (in a Tupfile located in the parent):

preload src/
:foreach src/*.hh |>!tup_preserve |>%B <up_headers>

Thanks for the report, you are correct that tup_preserve only worked with outputs in the same directory. Can you try with commit 60e9c62? I believe this should be working better, though I haven't tested it extensively.

Also, preload should only be needed if you are using run-scripts. The example you gave should work fine without it.

thanks for fixing it !

I can't remember why I thought preload was required, but you probably know better