Maybe you could have two lists of %.o files that you want to process with two different rules, so you prepend each rule with the corresponding list.
And also, as you said, for documentation/readability. I once made a big Makefile that was using ImageMagick to generate 12 derivatives from 3 intermediate formats for two types of source images. So that’s 18 rules that you only distinguish from the pattern. If I prepend it with the variable containing the list, it surely becomes more readable.
I've still got so much to learn about make. That's a complex use case...my biggest issue with makefiles is readability, so anything to help yourself out it worthwhile to me.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I read about static pattern rules, and I think I’m seeing a difference, but I’ll have to make tests.
web.mit.edu/gnu/doc/html/make_4.ht...
Maybe you could have two lists of
%.ofiles that you want to process with two different rules, so you prepend each rule with the corresponding list.And also, as you said, for documentation/readability. I once made a big Makefile that was using ImageMagick to generate 12 derivatives from 3 intermediate formats for two types of source images. So that’s 18 rules that you only distinguish from the pattern. If I prepend it with the variable containing the list, it surely becomes more readable.
Ah, cool - thanks for the link!
I've still got so much to learn about make. That's a complex use case...my biggest issue with makefiles is readability, so anything to help yourself out it worthwhile to me.