From f795ee896f9d3421744479f6607dce63ae8f13dd Mon Sep 17 00:00:00 2001 From: Toover Date: Mon, 10 Apr 2017 19:55:02 +0200 Subject: [PATCH] Improve the Makefile To make sure calling for "make serve" works straight away, the dependencies are automatically prepared. A "make clean" has been added, to test this feature. --- Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 814b48db..eb18e037 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ INSTALL_STAMP = $(VENV)/.install.stamp TEMPDIR := $(shell mktemp -d) all: install -install: $(INSTALL_STAMP) +install: virtualenv $(INSTALL_STAMP) $(INSTALL_STAMP): $(VENV)/bin/pip install -U pip $(VENV)/bin/pip install -r requirements.txt @@ -23,7 +23,7 @@ $(DEV_STAMP): $(PYTHON) dev-requirements.txt $(VENV)/bin/pip install -Ur dev-requirements.txt touch $(DEV_STAMP) -serve: $(INSTALL_STAMP) +serve: install cd budget; $(PYTHON) run.py test: $(DEV_STAMP) @@ -37,3 +37,6 @@ build-requirements: $(TEMPDIR)/bin/pip install -U pip $(TEMPDIR)/bin/pip install -Ue "." $(TEMPDIR)/bin/pip freeze | grep -v -- '-e' > requirements.txt + +clean: + rm -rf .venv