add some make variables
This commit is contained in:
parent
33b25e18da
commit
7bbc6d1481
1 changed files with 15 additions and 9 deletions
24
Makefile
24
Makefile
|
@ -3,21 +3,27 @@ CSS = style.css
|
||||||
PAGES = index.html
|
PAGES = index.html
|
||||||
IMAGES = mlem.gif icon.png
|
IMAGES = mlem.gif icon.png
|
||||||
|
|
||||||
all: $(patsubst %,_build/%,$(FONTS) $(CSS) $(PAGES) $(IMAGES))
|
BUILDDIR ?= _build
|
||||||
|
TMPDIR ?= _tmp
|
||||||
|
|
||||||
_build/%: %
|
|
||||||
|
all: build
|
||||||
|
|
||||||
|
build: $(patsubst %,$(BUILDDIR)/%,$(FONTS) $(CSS) $(PAGES) $(IMAGES))
|
||||||
|
|
||||||
|
$(BUILDDIR)/%: %
|
||||||
@echo $*
|
@echo $*
|
||||||
@mkdir -p $(dir $@)
|
@mkdir -p $(dir $@)
|
||||||
@cp $< $@
|
@cp $< $@
|
||||||
|
|
||||||
_build/%.gif: %_bg.gif
|
$(BUILDDIR)/%.gif: %_bg.gif
|
||||||
@echo $*.gif
|
@echo $*.gif
|
||||||
@mkdir -p $(dir _build/%* _tmp/%*)
|
@mkdir -p $(dir $(BUILDDIR)/%* $(TMPDIR)/%*)
|
||||||
@gifsicle -U $*_bg.gif -o _tmp/$*_bg_u.gif
|
@gifsicle -U $*_bg.gif -o $(TMPDIR)/$*_bg_u.gif
|
||||||
@convert -transparent '#ff9bc7' _tmp/$*_bg_u.gif _tmp/$*_t.gif
|
@convert -transparent '#ff9bc7' $(TMPDIR)/$*_bg_u.gif $(TMPDIR)/$*_t.gif
|
||||||
@gifsicle --disposal=previous _tmp/$*_t.gif -o _build/$*.gif
|
@gifsicle --disposal=previous $(TMPDIR)/$*_t.gif -o $(BUILDDIR)/$*.gif
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) -r _tmp _build
|
$(RM) -r $(TMPDIR) $(BUILDDIR)
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean all build
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue