tup icon indicating copy to clipboard operation
tup copied to clipboard

Dynamic command as input

Open pickfire opened this issue 9 years ago • 2 comments

Hi, I wonder if there is a way to do a input based on shell command and output it in another directory:

FILES = `find file/*.md -type f`
: $(FILES) |> md2html %f > %o |> server/%B.html

pickfire avatar Jan 20 '16 09:01 pickfire

You could have a script that outputs build rules, and then run it from your Tupfile using the run command. But in this specific case, a simple : foreach rule would do the trick as well.

sboukortt avatar Jan 30 '16 13:01 sboukortt

@sboukortt Doesn't that improve the complicity? I don't hope that I need to use something similar to cmake, autotools or ./configure in order to use tup. This will make tup similar to ninja, using most of the time building those build rules.

pickfire avatar Jan 31 '16 02:01 pickfire