blob: 77c6e51e3e14b879b38cb0666e3889ecfd0e9b5a (
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
33
34
35
36
37
|
.PHONY: FORCE
JEKYLL_ENV ?= development
# JEKYLL_ENV ?= production
WEBROOT ?= _site
JEKYLL_BUILD_ARGS += --quiet
JEKYLL_BUILD_ARGS += --destination $(WEBROOT)
# Gemfile.lock is used as a proxy for checking if the required gems are
# installed
GEMS = Gemfile.lock
POSTS := $(wildcard _items/*)
POST_META := $(patsubst _items/%.md,_data/post/%.yml,$(POSTS))
REPO_META := _data/meta.yml
META := $(POST_META) $(REPO_META)
build: $(GEMS) $(META) FORCE
bundle exec jekyll build $(JEKYLL_BUILD_ARGS)
$(GEMS): Gemfile
bundle install --quiet
_data/post/%.yml: _items/%.md
@mkdir -p _data/post
_scripts/postinfo $< > $@
$(REPO_META):
@mkdir -p _data/post
_scripts/repoinfo > $@
clean: FORCE
$(RM) -r $(WEBROOT)
|