Add .NOPATH for all files generated from .l or .y files in SRCS. Fixes PRs
bin/14187 and lib/14239.
Also simplify the handling of these transforms to .c and .h files a bit by
leveraging make's builtin macro operators.