33 lines
857 B
Makefile
33 lines
857 B
Makefile
|
|
MIXINS = $(shell find src/scss -name "_*.scss")
|
|
SCSS = $(shell find src/scss -name "*.scss" -not -name "_*")
|
|
CSS = $(patsubst src/scss/%.scss,src/public/css/%.css,$(SCSS))
|
|
|
|
.PHONY: all clean css stamp
|
|
|
|
all: clean css stamp
|
|
|
|
clean:
|
|
@# clean scss
|
|
@printf "\033[31m RM \033[0m%s\n" src/public/css
|
|
@rm -fr src/public/css/*
|
|
@git stash -- src/public/css/prism.css > /dev/null
|
|
|
|
@# clean stamps
|
|
@printf "\033[31m RM \033[0m%s\n" src/web/stamp.php
|
|
@rm -f src/web/stamp.php
|
|
|
|
# =============================================== COMPILE SCSS ==
|
|
|
|
css: $(CSS)
|
|
|
|
$(CSS): src/public/css/%.css : src/scss/%.scss $(MIXINS)
|
|
@printf "\033[33m SCSS \033[0m%s\n" $<
|
|
@mkdir -p $(@D)
|
|
@sassc --style compressed $< $@
|
|
|
|
# ============================================ GENERATE STAMPS ==
|
|
|
|
stamp:
|
|
@printf "\033[32m STMP \033[0m%s\n" src/web/stamp.php
|
|
@./build/stamp.sh
|