diff --git a/Makefile b/Makefile index 941d7b6f..cb9f7d44 100644 --- a/Makefile +++ b/Makefile @@ -1,17 +1,21 @@ # MarkiTect - Advanced Markdown Engine # Makefile for common development tasks -.PHONY: help setup install test build clean update status dev lint format check-deps +.PHONY: help setup install test build clean update status dev lint format check-deps venv-status # Default target help: @echo "MarkiTect Development Commands" @echo "==============================" @echo "" + @echo "Environment Status:" + @$(MAKE) --no-print-directory venv-status + @echo "" @echo "Setup & Installation:" @echo " setup - Initial project setup (venv + install)" @echo " install - Install package in development mode" @echo " dev - Install with development dependencies" + @echo " venv-status - Check if venv is active" @echo "" @echo "Development:" @echo " test - Run all tests" @@ -31,6 +35,23 @@ VENV := .venv VENV_PYTHON := $(VENV)/bin/python VENV_PIP := $(VENV)/bin/pip +# Check virtual environment status (read-only) +venv-status: + @if [ -f $(VENV)/bin/activate ] && [ -f $(VENV)/bin/python ]; then \ + if [ -n "$$VIRTUAL_ENV" ] && [ "$$VIRTUAL_ENV" = "$$(realpath $(VENV))" ]; then \ + echo " ✅ Virtual environment: Active in current shell"; \ + elif [ -n "$$VIRTUAL_ENV" ]; then \ + echo " ⚠️ Virtual environment: Different venv active ($$VIRTUAL_ENV)"; \ + echo " Run 'deactivate' then 'source $(VENV)/bin/activate'"; \ + else \ + echo " 📁 Virtual environment: Ready but not activated"; \ + echo " Run 'source $(VENV)/bin/activate' to activate"; \ + fi; \ + else \ + echo " ❌ Virtual environment: Not found"; \ + echo " Run 'make setup' to create and configure"; \ + fi + # Setup virtual environment and install package setup: $(VENV)/bin/activate install @echo "✅ Project setup complete!" @@ -133,4 +154,4 @@ check-deps: $(VENV)/bin/activate $(VENV_PIP) list @echo "" @echo "Project dependencies:" - $(VENV_PIP) check \ No newline at end of file + $(VENV_PIP) check