Makefile: use venv for pygments, more robust dirs
This commit is contained in:
parent
fd1327b1d7
commit
75e8be7ea4
1 changed files with 6 additions and 10 deletions
16
makefile
16
makefile
|
@ -5,24 +5,20 @@ BLOG_HTML ::= $(BLOG:%.md=$(BUILD_DIR)/%.html)
|
||||||
|
|
||||||
PYTHON ::= venv/bin/python
|
PYTHON ::= venv/bin/python
|
||||||
|
|
||||||
.PHONY: clean public
|
.PHONY: all clean public
|
||||||
|
|
||||||
all: $(BUILD_DIR)/index.html $(BUILD_DIR)/syntax.css public $(BLOG_HTML)
|
all: $(BUILD_DIR)/index.html $(BUILD_DIR)/syntax.css public $(BLOG_HTML)
|
||||||
|
|
||||||
$(BUILD_DIR)/index.html: index.html $(BLOG) do_blog.py $(BUILD_DIR)
|
$(BUILD_DIR)/index.html: index.html $(BLOG) do_blog.py
|
||||||
|
@mkdir -p "$(dir $@)"
|
||||||
$(PYTHON) do_blog.py --index "$<" "$@"
|
$(PYTHON) do_blog.py --index "$<" "$@"
|
||||||
|
|
||||||
$(BUILD_DIR)/blog/%.html: blog/%.md blog.html do_blog.py $(BUILD_DIR)/blog
|
$(BUILD_DIR)/blog/%.html: blog/%.md blog.html do_blog.py
|
||||||
|
@mkdir -p "$(dir $@)"
|
||||||
$(PYTHON) do_blog.py "$<" "$@"
|
$(PYTHON) do_blog.py "$<" "$@"
|
||||||
|
|
||||||
$(BUILD_DIR):
|
|
||||||
mkdir -p "$@"
|
|
||||||
|
|
||||||
$(BUILD_DIR)/blog:
|
|
||||||
mkdir -p "$@"
|
|
||||||
|
|
||||||
$(BUILD_DIR)/syntax.css: makefile
|
$(BUILD_DIR)/syntax.css: makefile
|
||||||
pygmentize -S rainbow_dash -f html > "$@"
|
$(PYTHON) -m pygments -S rainbow_dash -f html > "$@"
|
||||||
|
|
||||||
public:
|
public:
|
||||||
cp -rt "$(BUILD_DIR)" public/.
|
cp -rt "$(BUILD_DIR)" public/.
|
||||||
|
|
Loading…
Reference in a new issue