Makefile @ 8d488f67c1ba default tip

Update
author Steve Losh <steve@stevelosh.com>
date Sat, 27 Aug 2022 14:02:19 -0400
parents d70b175d5479
children (none)
.PHONY: all thumbnails

photos := $(shell ffind 'static/media/images/photography/photos/.*/.*.jpg' --entire)
thumbs := $(subst photos,thumbnails,$(photos))

THUMBNAIL_CMD = convert $< -resize "200^>" -gravity center -crop 200x200+0+0 -strip $@

all: generate thumbnails

generate: generate.lisp
	sbcl --load generate.lisp --eval '(stevelosh.com:build)'

thumbnails: $(thumbs)

static/media/images/photography/thumbnails/plants/%.jpg: static/media/images/photography/photos/plants/%.jpg
	$(THUMBNAIL_CMD)

static/media/images/photography/thumbnails/scotland/%.jpg: static/media/images/photography/photos/scotland/%.jpg
	$(THUMBNAIL_CMD)

static/media/images/photography/thumbnails/iceland/%.jpg: static/media/images/photography/photos/iceland/%.jpg
	$(THUMBNAIL_CMD)