That's interesting.<p>Author probably wants to use `private` for those target-local variables, though.<p>For example,<p><pre><code> R: .SHELLFLAGS := -e
R: SHELL := Rscript
R:
greeting = "bonjour"
message(paste0(greeting, ", R!"))
</code></pre>
Everything that target `R` depends on will also have SHELL and .SHELLFLAGS over-ridden. If `R` depends on some data generated by another program, it probably wants to be built and executed with the default SHELL (or another shell, perhaps).<p><pre><code> R: private .SHELLFLAGS := -e
R: private SHELL := Rscript
R:
greeting = "bonjour"
message(paste0(greeting, ", R!"))
</code></pre>
Now, `R`'s dependencies will be generated with the makefile's defaults.<p>Usually I prefer to build up richer stages like this using the system shell anyway, though. Build a target which in turn is executed by the shell normally to traverse the next edge in the graph. But I can see how this mechanism has its uses.<p>See also <a href="https://www.gnu.org/software/make/manual/html_node/Target_002dspecific.html" rel="nofollow">https://www.gnu.org/software/make/manual/html_node/Target_00...</a>