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

Thilo Borgmann thilo.borgmann at googlemail.com
Thu Apr 5 18:59:00 CEST 2012


Am 05.04.12 17:08, schrieb Michael Niedermayer:
> +all: $(TARGETS) logo
> +
> +DATE = $(shell date +%m%d)
> +LOGO_STANDARD = $(shell ls src/logik/$(DATE)-standard)
> +LOGO_DAY      = $(shell ls src/logik/$(DATE).png)
> +
> +ifneq ($(LOGO_STANDARD),)
> +    LOGO_SRC = htdocs/FFmpeg_standard.png
> +endif
> +ifneq ($(LOGO_DAY),)
> +    LOGO_SRC = $(LOGO_DAY)
> +endif
> +ifneq ($(LOGO_SRC),)
> +logo:
> +	cmp $(LOGO_SRC) htdocs/ffmpeg-logo.png || cp $(LOGO_SRC) htdocs/ffmpeg-logo.png
> +endif

Besides the comments from Reimar which mostly apply to both Makefiles (and not
to copy the logo if it is still the same):

I think your version of the Makefile does the logo copying more compact which is
good but it is not as flexible/expandable as mine when it comes to do more
things than just logo copying.

Once there are more filytypes than -standard and .png in src/logik to control
the appearance of the website, your version has either to write more variables
and check even more cases _or_ set LOGO_DAY to src/logik/$(DATE).* which would
make your version almost like mine.
For my version the complete file-retrieving hunk stays always the same and there
is one "clean" new target for each filetype and file to be altered.

-Thilo


More information about the ffmpeg-devel mailing list