From 6ca36d957834c0e23587b43d6170964df8c05615 Mon Sep 17 00:00:00 2001 From: Rhiannon Morris Date: Tue, 30 Jun 2020 16:25:01 +0200 Subject: [PATCH] Fix Makefile to put site in _build --- Makefile | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 77c2675..0c8d2d9 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,23 @@ -mlem.gif: mlem_bg.gif - gifsicle -U mlem_bg.gif -o mlem_bg_u.gif - convert -transparent '#ff9bc7' mlem_bg_u.gif mlem_t.gif - gifsicle --disposal=previous mlem_t.gif -o mlem.gif +FONTS = $(shell find fonts -type f) +CSS = style.css +PAGES = index.html +IMAGES = mlem.gif + +all: $(patsubst %,_build/%,$(FONTS) $(CSS) $(PAGES) $(IMAGES)) + +_build/%: % + @echo $* + @mkdir -p $(dir $@) + @cp $< $@ + +_build/%.gif: %_bg.gif + @echo $*.gif + @mkdir -p $(dir _build/%* _tmp/%*) + @gifsicle -U $*_bg.gif -o _tmp/$*_bg_u.gif + @convert -transparent '#ff9bc7' _tmp/$*_bg_u.gif _tmp/$*_t.gif + @gifsicle --disposal=previous _tmp/$*_t.gif -o _build/$*.gif clean: - $(RM) mlem_bg_u.gif mlem_t.gif mlem.gif + $(RM) -r _tmp _build .PHONY: clean