forked from MagicStack/httptools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
28 lines (22 loc) · 630 Bytes
/
Makefile
File metadata and controls
28 lines (22 loc) · 630 Bytes
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
.PHONY: compile release test distclean clean
PYTHON ?= python3
ROOT = $(dir $(realpath $(firstword $(MAKEFILE_LIST))))
UV := $(shell command -v uv 2> /dev/null)
ifdef UV
PYTHON := uv run
PIP := uv pip
else
PIP := pip
endif
compile:
$(PIP) install -e .
test: compile
$(PYTHON) -m unittest -v
clean:
find $(ROOT)/httptools/parser -name '*.c' | xargs rm -f
find $(ROOT)/httptools/parser -name '*.so' | xargs rm -f
find $(ROOT)/httptools/parser -name '*.html' | xargs rm -f
rm -rf build
distclean: clean
git --git-dir="$(ROOT)/vendor/http-parser/.git" clean -dfx
git --git-dir="$(ROOT)/vendor/llhttp/.git" clean -dfx