Mail Archives: djgpp/2000/06/24/10:38:00
> From: Jason Green <news AT jgreen4 DOT fsnet DOT co DOT uk>
> Newsgroups: comp.os.msdos.djgpp
> Date: Sat, 24 Jun 2000 13:48:48 +0100
> >
> > A Makefile can legitimately have several different implicit rules for
> > the same %.o pattern, and they are all valid. Make will chose
> > whatever it sees fit out of them.
>
> Sorry, I still don't get it. I understand your original reply to mean
> that there are cases where a built-in implicit rule takes precedence
> over an implicit rule defined in the makefile.
With implicit rules, there's no precedence. You can have several
different implicit rules that can be applied to create the same
target. Make will choose one of them, but not necessarily the last
one it sees.
> Can you give an example of this (if you really mean that)?
What's wrong with the example which started this thread?
> The original makefile did not contain a rule (implicit or otherwise)
> to compile a .cpp file
The original makefile *did* include a rule to produce foo.o given
foo.cpp. And that is what important, as far as Make is concerned.
- Raw text -