[FFmpeg-devel] [PATCH] web: Copy FFmpeg Logo by Makefile instead of cronjob
Michael Niedermayer
michaelni at gmx.at
Sat Apr 14 11:46:03 CEST 2012
On Wed, Apr 11, 2012 at 12:50:34PM +0200, Thilo Borgmann wrote:
> Am 09.04.12 20:01, schrieb Michael Niedermayer:
> > On Sun, Apr 08, 2012 at 01:13:33AM +0200, Thilo Borgmann wrote:
> >> Am 08.04.12 00:48, schrieb Reimar Döffinger:
> >>> On Sun, Apr 08, 2012 at 12:06:44AM +0200, Thilo Borgmann wrote:
> >>>> +LOGO_SRC := $(wildcard src/logik/$(DATE)-standard)
> >>>> +
> >>>> +ifneq ($(LOGO_SRC),)
> >>>
> >>> I don't see the point of this indirection, going through LOGO_SRC
> >>>
> >>>> +htdocs/ffmpeg-logo.png: $(LOGO_SRC)
> >>>> + test -z $< || cp $< $@
> >>>> + test ! -z $< || test -r $@ || cp htdocs/FFmpeg_standard.png $@
> >>>
> >>> Hm, I don't think the "test ! -z $< ||" makes really sense,
> >>> just leaving it out IMO gives a more logical behaviour.
> >>> And maybe comment it, too:
> >>> # if we have a new source file, copy it over
> >>> test -z $< || cp $< $@
> >>> # if not, make sure we have at least some file, otherwise copy default
> >>> test -r $@ || cp htdocs/FFmpeg_standard.png $@
> >>
> >> I think it's getting clear to be a fallback without the leading "test ! -z"
> >>
> >> All other comments included :)
> >>
> >> -Thilo
> >
> >> Makefile | 14 ++++++++++++--
> >> 1 file changed, 12 insertions(+), 2 deletions(-)
> >> c4b3d2e9734a4f87c9963ebd44efda6a695a9d68 0001-Let-the-Makefile-copy-the-website-logo-according-to-.patch
> >> From 191e0104e2602d5c2f9b31bbb840e2911d812ea7 Mon Sep 17 00:00:00 2001
> >> From: Thilo Borgmann <thilo.borgmann at googlemail.com>
> >> Date: Sun, 8 Apr 2012 01:09:32 +0200
> >> Subject: [PATCH] Let the Makefile copy the website logo according to src/logik.
> >>
> >> ---
> >> Makefile | 14 ++++++++++++--
> >> 1 files changed, 12 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/Makefile b/Makefile
> >> index fdd95df..587a45b 100644
> >> --- a/Makefile
> >> +++ b/Makefile
> >> @@ -7,8 +7,15 @@ TARGETS = $(addsuffix .html,$(addprefix htdocs/,$(SRCS))) htdocs/main.rss
> >>
> >> PAGE_DEPS = src/template_head1 src/template_head2 src/template_footer sed_commands
> >>
> >> +DATE := $(shell date +%m%d)
> >>
> >> -all: $(TARGETS)
> >> +ifneq ($(wildcard src/logik/$(DATE)-standard),)
> >> + LOGO_SRC := htdocs/FFmpeg_standard.png
> >> +else
> >> + LOGO_SRC := $(wildcard src/logik/$(DATE).png)
> >> +endif
> >> +
> >> +all: htdocs/ffmpeg-logo.png $(TARGETS)
> >>
> >> clean:
> >> rm -f $(TARGETS)
> >> @@ -36,5 +43,8 @@ X' >> $@
> >> echo '</channel>' >> $@
> >> echo '</rss>' >> $@
> >>
> >> +htdocs/ffmpeg-logo.png: $(LOGO_SRC)
> >> + test -z $< || cp $< $@
> >> + test -r $@ || cp htdocs/FFmpeg_standard.png $@
> >
> > this will update teh file even if it matches, this breaks caching of
> > the logo
>
> Updated Patch attached.
from a quick look, its ok
maybe reimar can double check ?
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Old school: Use the lowest level language in which you can solve the problem
conveniently.
New school: Use the highest level language in which the latest supercomputer
can solve the problem without the user falling asleep waiting.
-------------- 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/20120414/11630c43/attachment.asc>
More information about the ffmpeg-devel
mailing list