From aca703c8c369d87d12fbc4308aba23979e07c5c8 Mon Sep 17 00:00:00 2001 From: Christian Hujer Date: Fri, 15 Oct 2021 10:47:42 +0530 Subject: [PATCH] Improve Makefile non-file targets should be .PHONY. The default target should be to run the tests, not to install the requirements. The default target should be all. Requirements should be installed automatically if not installed yet or out of date. --- Makefile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 997cfaa..b348fac 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,12 @@ -init: +.PHONY: all +all: test + +.PHONY: init +init: .pip_install_timestamp +.pip_install_timestamp: requirements.txt pip install -r requirements.txt + touch .pip_install_timestamp -test: +.PHONY: test +test: .pip_install_timestamp nosetests tests