Search code examples
tup

How to assign a variable the output of a shell command in Tupfile?


I'd like to assign a variable in a Tupfile the output of the command find . -name "*.cpp" -exec dirname {} \; | sort -u. How can I do it?


Solution

  • This works for me:

    BOTAN_CFLAGS = `pkg-config botan-1.10 --cflags`
    

    NOTE: the back-tick character "`"

    However this only seems to work in the command section of the rules not the dependencies.