On Jan 4, 2024 at 23:50:44, Philip Guenther <guent...@gmail.com> wrote:
> On Thu, Jan 4, 2024 at 8:51 PM Stephen Touset <step...@touset.org> wrote: > >> >> %: %.envsubst >> envsubst < $< > $@ >> >> Obviously this rule isn't correct. > > > Can you explain why you don't believe that to be correct? Given that a > pattern rule only applies when the prerequisites either exist or make knows > how to create them, why wouldn't that work? > You were 100% right. I thought this wouldn’t work since it would create a rule for every possible target, but make does the right thing here as you pointed out and *only* matches this pattern when the prerequisite exists. Thanks! -- Stephen Touset <step...@touset.org>