Skip to content

Commit 95d372d

Browse files
committed
Incorporate review feedback.
Much better usage of make, incorporate venv into default target and clean target, add a spec-clean target to avoid having to always rebuild the venv.
1 parent 40f4a61 commit 95d372d

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

Makefile

+10-12
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ OUT = \
66
jsonschema-validation.html jsonschema-validation.txt \
77
relative-json-pointer.html relative-json-pointer.txt
88

9-
all: $(OUT)
9+
all: $(VENV) $(OUT)
1010

1111
%.txt: %.xml
1212
$(XML2RFC) --text $< -o $@
@@ -25,17 +25,15 @@ json-schema.tar.gz: $(OUT)
2525
tar -czf json-schema.tar.gz --exclude '.*' json-schema
2626
rm -rf json-schema
2727

28-
venv: $(VENV)
28+
$(VENV): requirements.txt
29+
python -m venv $@
30+
$@/bin/python -m pip install --upgrade pip
31+
$@/bin/python -m pip install -r requirements.txt
2932

30-
$(VENV):
31-
python -m venv .venv
32-
. .venv/bin/activate && python -m pip install --upgrade pip setuptools wheel
33-
. .venv/bin/activate && python -m pip install -r requirements.txt
34-
35-
venv-clean:
36-
rm -rf .venv
37-
38-
clean:
33+
spec-clean:
3934
rm -f $(OUT) json-schema.tar.gz
4035

41-
.PHONY: clean all
36+
clean: spec-clean
37+
rm -rf $(VENV)
38+
39+
.PHONY: spec-clean clean all

0 commit comments

Comments
 (0)