-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
35 lines (27 loc) · 1.01 KB
/
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
# Makefile style guide: http://clarkgrubb.com/makefile-style-guide
#####################################
## Define meta Makefile variables. ##
#####################################
MAKEFLAGS += --warn-undefined-variables
SHELL := bash
.DEFAULT_GOAL := help
.DELETE_ON_ERROR:
.SHELLFLAGS := -e -u -o pipefail -c
.SUFFIXES:
#############################
## Set Makefile variables. ##
#############################
ALL_PYGMENT_STYLES := $(shell poetry run pygmentize -L styles | grep "* " | cut -d" " -f2 | tr -d ":" | sort)
PYGMENT_HTML_FORMATTER := "html"
clean: ## Clean our repository files and artifacts.
rm -rf ./styles
rm -f README.rst
build: ## Build our development "environment".
poetry install
css: clean ## Build CSS stylesheets for all `pygment`-supported styles.
mkdir ./styles
for style in $(ALL_PYGMENT_STYLES); do \
printf "🎨 Processing \`$$style\`..."; \
poetry run pygmentize -S $$style -f $(PYGMENT_HTML_FORMATTER) -a .highlight > ./styles/$$style.css; \
printf "finished!\n"; \
done