.PHONY: help test format lint clean

# 現在のパッケージパスを取得
CURRENT_PACKAGE := cli/asec
ROOT_DIR := ../..

# デフォルトターゲット
help:
	@echo "Usage: make [target]"
	@echo ""
	@echo "Targets:"
	@echo "  test         Run all tests with coverage"
	@echo "  format       Format code with ruff"
	@echo "  lint         Run linting checks with ruff"
	@echo "  clean        Clean cache and temporary files"

# テスト実行
test:
	@$(MAKE) -C $(ROOT_DIR) _test_single PKG=$(CURRENT_PACKAGE)

# コードフォーマット
format:
	@$(MAKE) -C $(ROOT_DIR) _format_single PKG=$(CURRENT_PACKAGE)

# リント実行
lint:
	@$(MAKE) -C $(ROOT_DIR) _lint_single PKG=$(CURRENT_PACKAGE)

# クリーンアップ
clean:
	@$(MAKE) -C $(ROOT_DIR) _clean_single PKG=$(CURRENT_PACKAGE)
