From 24f39ac30efba595b065665dc75fd6eccfdd1fd7 Mon Sep 17 00:00:00 2001 From: Adam Hosek Date: Wed, 13 Nov 2024 14:07:28 +0100 Subject: [PATCH] Fix Makefile targets Improve Makefile to avoid re-creating targets which are already created. --- .gitignore | 2 ++ Makefile | 11 ++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index d55d2b3..5897b63 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ venv __pycache__ .ruff_cache +.install +.venv diff --git a/Makefile b/Makefile index 82ce8c8..cd14265 100644 --- a/Makefile +++ b/Makefile @@ -8,18 +8,23 @@ PROJECT_DIR=$(shell pwd) default: install -venv: +.venv: python3 -m venv $(VENV_DIR) + touch $@ -install: +.install: $(PIP) install -r requirements.txt $(PIP) install -r requirements-dev.txt + touch $@ -run: +install: .venv .install + +run: install $(UVICORN) app.main:app --reload --port 8081 clean: rm -rf $(VENV_DIR) + rm -rf .install .venv lint: @echo "Running lint checks..."