[FFmpeg-devel] [PATCH] web: Copy FFmpeg Logo by Makefile instead of cronjob
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.
> > +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.
> > +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.
> > -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,
its not removed, just kept as the first target so a plain make runs
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
Size: 198 bytes
Desc: Digital signature
More information about the ffmpeg-devel