multiple stems in makefile rule
问题 I am trying to write a makefile that does something like the following: %-foo-(k).out : %-foo-(k-1).out # do something, e.g. cat $< $@ i.e. there are files with arbitrary stems, then -foo- , then an integer, followed by .out . Each file depends on the one with the same name, with integer one smaller. For instance, if the file blah/bleh-foo-1.out exists, then make blah/bleh-foo-2.out would work. I could do this with multiple stems if there were such a thing... what's another way to do this