[FFmpeg-devel] [PATCH] web: Copy FFmpeg Logo by Makefile instead of cronjob

Michael Niedermayer michaelni at gmx.at
Thu Apr 5 19:46:00 CEST 2012


On Thu, Apr 05, 2012 at 06:19:23PM +0200, Reimar Döffinger wrote:
> On Thu, Apr 05, 2012 at 05:08:22PM +0200, Michael Niedermayer wrote:
> > +DATE = $(shell date +%m%d)
> 
> Also for the others, but especially here I think you want to use :=,
> otherwise you risk getting a different value between different uses.

indeed, fixed


> 
> > +LOGO_STANDARD = $(shell ls src/logik/$(DATE)-standard)
> > +LOGO_DAY      = $(shell ls src/logik/$(DATE).png)
> 
> $(wildcard src/logik/$(DATE)-standard)
> etc. is a nicer way to do this.

fixed


[...]
> > +ifneq ($(LOGO_SRC),)
> > +logo:
> > +	cmp $(LOGO_SRC) htdocs/ffmpeg-logo.png || cp $(LOGO_SRC) htdocs/ffmpeg-logo.png
> > +endif
> 
> I think it would be preferable to have this as a proper make rule, i.e.

I was thinking the same, but missed how to cleanly implement it ...


> htdocs/ffmpeg-logo.png: $(LOGO_SRC)
> 	cmp $^ $@ || cp $^ $@
> As long as you add htdocs/ffmpeg-logo.png to .PHONY it will still be
> executed regardless of the age of the files.

changed


> 
> > -all: $(TARGETS)
> >  
> > @@ -37,4 +52,4 @@ X' >> $@
> >  	echo '</rss>' >> $@
> >  
> >  
> > -.PHONY: all clean
> > +.PHONY: all clean logo
> 
> If you remove the "all" target I guess you should remove it from .PHONY,
> too.

its not removed, just kept as the first target so a plain make runs
it

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

DNS cache poisoning attacks, popular search engine, Google internet authority
dont be evil, please
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120405/4edea106/attachment.asc>


More information about the ffmpeg-devel mailing list