3 ms·
> $< 2&1> $@ I'm not really well versed in Makefiles, but that seems to pass the argument "2" to the testing program, launching it in the background with "&",
by jolmg 6y ago
> $< 2&1> $@
I'm not really well versed in Makefiles, but that seems to pass the argument "2" to the testing program, launching it in the background with "&", and then doing a redirection for the stdout of an empty command to the target file with "1>".
I think you meant
$< > $@ 2>&1
which could also be
$< &> $@
I can't see how your example relates to static or dynamic typing, though.
- flukus 6y agoFixed, the former is correct, the latter I think is a bashism that may not work. Unfortunately I plucked that from a project in a very broken state. > I can't see how your example relates to static or dynamic typing, though. Because with static typing you know the object/file graph at compile time and only affected tests need to be run. In that example the .test files will only be built when their dependencies change and .testresult will only be created if .test is built, everything is incremental and "make test" won't execute any tests if there are no changes that could affect them.
- joshuamorton 6y agoYou know this in dynamic languages too, based on imports. So if you have the build graph represented for your dynamic language, you get the same result. This is just a poor (poor, poor) buggy implementation of Bazel.