Tup dependencies from the root directory?

176 Views Asked by At

I've tried to create a rule similar to the minimal example:

: ../library/something local |> !compile |> ./something_else

This works, but I would like to write something like:

: $(PROJ_ROOT)/library/something local |> !compile |> ./something_else

Where the PROJ_ROOT variable is the same, even if I add folder depth.
Does tup support this?

1

There are 1 best solutions below

0
AudioBubble On BEST ANSWER

You need to pass the root directory to every subdirectory using include_rules

In your top-level Tupfile you specify TOP = $(TUP_CWD)
In any child you write include_rules. You can now access $(TOP)
to get the relative path, which consists of ../../, etc.