-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
37 lines (30 loc) · 848 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
# SPDX-License-Identifier: CC0-1.0
# SPDX-FileCopyrightText: 2024 The Foundation for Public Code <info@publiccode.net>
SHELL:=/bin/bash
MARKDOWN_DIR ?= "../Standard/criteria"
default: run
venv/bin/activate: requirements.txt
rm -rf venv
python3 -m venv venv
source venv/bin/activate && \
pip3 install --upgrade pip
source venv/bin/activate && \
pip3 install -r requirements.txt
.PHONY: $(MARKDOWN_DIR)
$(MARKDOWN_DIR):
@if ! [ -e "$(MARKDOWN_DIR)" ]; then \
echo ""; \
echo "MARKDOWN_DIR environment variable not correct"; \
echo ""; \
echo "e.g.:"; \
echo "MARKDOWN_DIR='../Standard/criteria' make"; \
echo ""; \
false; \
fi
.PHONY: run
run: venv/bin/activate markdown-readability.py $(MARKDOWN_DIR)
source venv/bin/activate && \
python3 ./markdown-readability.py $(MARKDOWN_DIR)
.PHONY: clean
clean:
rm -rf venv