On Sat,  7 Nov 2020 20:56:37 -0500 (EST)
Bruce Lilly <invalid.nore...@gnu.org> wrote:

> I've seen it used, e.g. where there are many executables, each built from a
> single source file.  So, for example:
> cat date echo ls pwd rm sleep sync test : $@.o
> suffices to specify (with default rules) everything needed to build those
> executables.  Otherwise, you'd have to have many separate dependency lines,

I agree that allowing $@ in prerequisites would allow easy to read and easy to
write Makefiles, but the lack of that functionality does not mean that the
same build method for multiple targets needs to get split up to different
dependency lines. With a static pattern rule you can do the same on with a
single line:

cat date echo ls pwd rm sleep sync test : % : %.o

regards Henrik

Reply via email to