[FFmpeg-cvslog] r13450 - trunk/Makefile

Diego Biurrun diego
Tue May 27 18:25:19 CEST 2008


On Tue, May 27, 2008 at 04:28:26PM +0100, M?ns Rullg?rd wrote:
> Diego Biurrun <diego at biurrun.de> writes:
> 
> > On Tue, May 27, 2008 at 03:32:43PM +0100, M?ns Rullg?rd wrote:
> >> Diego Biurrun <diego at biurrun.de> writes:
> >> 
> >> > On Tue, May 27, 2008 at 01:34:44PM +0100, M?ns Rullg?rd wrote:
> >> >> diego <subversion at mplayerhq.hu> writes:
> >> >> 
> >> >> > Log:
> >> >> > Simplify phony target declaration.
> >> >> >
> >> >> > --- trunk/Makefile	(original)
> >> >> > +++ trunk/Makefile	Tue May 27 02:32:26 2008
> >> >> > @@ -341,8 +341,6 @@ tests/seek_test$(EXESUF): tests/seek_tes
> >> >> >
> >> >> > -.PHONY: lib videohook documentation TAGS
> >> >> > -.PHONY: codectest libavtest seektest servertest fulltest test
> >> >> > -.PHONY: $(CODEC_TESTS) $(LAVF_TESTS) regtest-ref swscale-error
> >> >> > +.PHONY: lib videohook documentation TAGS *test regtest-* swscale-error
> >> >> 
> >> >> make doesn't work like that.
> >> >
> >> > Elaborate.  It works as intended here ...
> >> 
> >> It works by accident, because there are no files with those names.
> >> You can't use wildcards in prerequisite lists.
> >
> > This does not seem to apply to phony target declarations.
> >
> > Try adding
> >
> > foobar:
> > 	touch some_file
> >
> > .PHONY: foo*
> >
> > to the Makefile.  It works as expected even if you do a 'touch foobar'
> > in between...
> 
> OK, I'll rephrase.  Wildcards in prerequisites are expanded as
> filenames, not make targets.

That does not expalain why it works.  In the above Makefile example, the
foobar target really is phony.  If I add another foobaz target, it is
also phony.

After rereading parts of the GNU Make manual, this behavior is indeed
somewhat puzzling, but nevertheless it appears to work as intended...

Diego




More information about the ffmpeg-cvslog mailing list