aboutsummaryrefslogtreecommitdiff
path: root/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'makefile')
-rw-r--r--makefile13
1 files changed, 11 insertions, 2 deletions
diff --git a/makefile b/makefile
index 46f6162..95b7666 100644
--- a/makefile
+++ b/makefile
@@ -1,3 +1,5 @@
+.PHONY: FORCE
+
JEKYLL_ENV ?= development
# JEKYLL_ENV ?= production
@@ -10,12 +12,19 @@ JEKYLL_BUILD_ARGS += --destination $(WEBROOT)
# installed
GEMS = Gemfile.lock
-build: $(GEMS)
+POSTS := $(wildcard _items/*)
+POST_META := $(patsubst _items/%.md,_data/post/%.yml,$(POSTS))
+
+build: $(GEMS) $(POST_META) FORCE
bundle exec jekyll build $(JEKYLL_BUILD_ARGS)
$(GEMS): Gemfile
bundle install --quiet
-clean:
+_data/post/%.yml: _items/%.md
+ @mkdir -p _data/post
+ _scripts/postinfo $< > $@
+
+clean: FORCE
$(RM) -r $(WEBROOT)