rule target-source ( targets * : sources * : properties * ) { } actions target-source { echo "NM target source consuming " $(>) echo "int main() {}" > $(<) } rule cpp-mark ( targets * : sources * : properties * ) { } actions cpp-mark { echo "CPP-MARK consuming " $(>) touch $(<) }