aboutsummaryrefslogtreecommitdiffstats
path: root/GNUmakefile
blob: c9bf608ec8c45753de36c9dde99b02f85c1496f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
.PHONY: publish deploy html css help

help:							## Show this help
	@egrep -h '\s##\s' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'

publish: html css		  ## Build the site and copy it to the staging directory

deploy:							## Deploy the site to live
	@[[ -e public/index.html ]] || (echo "Run make publish before deploy" && exit 1)
	rsync --rsh="ssh -p 4511" --verbose --checksum --recursive --delete \
	    --exclude '*~' --exclude '.eldev' --delete-excluded \
	    public/ ryuslash.org:ryuslash-next/

html:
	@echo "Publishing..."
	eldev emacs --quick --batch --load publish.el --funcall org-publish-all

css: public/assets/css/main.css public/assets/css/tekuti.css public/assets/css/cgit.css

public/assets/css/main.css public/assets/css/tekuti.css public/assets/css/cgit.css: \
    src/less/include/common.less \
    src/less/include/components.less \
    src/less/include/colors.less

public/assets/css/%.css: src/less/%.less
	lessc $< $@

clean:							## Remove all of the build files
	@echo "Cleaning up..."
	@rm -rvf *.elc
	@rm -rvf public
	@rm -rvf .org-timestamps