-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
46 lines (36 loc) · 924 Bytes
/
Makefile
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
33
34
35
36
37
38
39
40
41
42
43
44
45
JEKYLL=bundle exec jekyll
SHELL=bash
$(eval CONFIG= \
$(shell find config -maxdepth 1 -type f -name '*.yml' | \
sort -g | awk -vORS=, ' {print $1} ')_config.yml)
$(eval OPTS= \
--config "$(CONFIG)")
##
# Targets
help:
@echo 'Makefile for Jekyll site'
@echo ''
@echo 'Usage:'
@echo 'make init Initialize directory'
@echo 'make html Generate the web site'
@echo 'make clean Clean up generated site'
@echo 'make pages Generate and commit the github-pages site (the '
@echo ' result still needs to be pushed to github).'
.PHONY: init
init: docs
bundle config set path .vendor/bundle
bundle install
.PHONY: html
html: docs
$(JEKYLL) build $(OPTS)
.PHONY: serve
serve: docs
$(JEKYLL) serve -w $(OPTS)
.PHONY: pages
pages: html
$(SHELL) scripts/commit_pages.sh
docs:
$(SHELL) scripts/make_worktree.sh
.PHONY: clean
clean:
$(JEKYLL) clean