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

Michael Niedermayer michaelni at gmx.at
Thu Apr 5 19:59:13 CEST 2012


On Thu, Apr 05, 2012 at 07:46:00PM +0200, Michael Niedermayer wrote:
> 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

updated version attached

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Avoid a single point of failure, be that a person or equipment.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-web-makefile-build-daily-logo.patch
Type: text/x-patch
Size: 1152 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120405/fd20b7b8/attachment.bin>
-------------- 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/fd20b7b8/attachment.asc>


More information about the ffmpeg-devel mailing list