Hey everyone, I am trying to build a recursive source tree where each directory builds a bundle that refers to it's children's outputs as well. I am managing this pretty well using Tupdefault and <groups>:
include_rules # compile current-level inputs : foreach *.moon |> ^ MOON %f^ moonc -o %o %f 2>/dev/null |> %B.lua <modules> # bundle child-level bundles and current-level inputs : <modules> |> ^ BNDL %d^ moon &(root)/bundle.moon %o %<modules> |> .bundle.lua ../<modules> Now I would like to reference each directory's path relative to the project root to use for e.g. a navigation UI. Both using the Lua API and tup's builtin variables I can't seem to find a way of doing this. &-variables and the Tuprules file come very close, I have a &root = . root = tup.nodevariable '.' in the respective Tuprules files, and these let me refer up to the project root from the nested directories, but I want the exact opposite path: instead of getting '../../' in a/b/c/Tupfile with &root = a I would like to be able to get "b/c/" somehow. Is the only solution to use a runscript and keep the last N segments of `pwd` (N being the depth in the evaluated root)? -- -- 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.
