-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
41 lines (31 loc) · 943 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Makefile for abc (AI bash/zsh/tcsh Command)
# Variables
PYTHON := python3
CONFIG_FILE := $(HOME)/.abc.conf
SHELL := /bin/bash
# Files
CONFIG_TEMPLATE := abc.conf.template
# Default target
.DEFAULT_GOAL := help
# Phony targets
.PHONY: help install uninstall clean config tree
help: ## Display this help message
@echo "Usage: make [target]"
@echo ""
@echo "Targets:"
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf " %-20s %s\n", $$1, $$2}' $(MAKEFILE_LIST)
install-pipx:
@$(PYTHON) -m pip install --user --quiet pipx
@$(PYTHON) -m pipx ensurepath
install: install-pipx ## Install abc
@echo "Installing abc using pipx..."
@$(PYTHON) -m pipx install --force .
@abc_setup
setup: ## Re-create the config file
@abc_setup
uninstall: ## Uninstall abc
@echo "Uninstalling abc..."
@abc_setup --uninstall
@$(PYTHON) -m pipx uninstall abc-cli
tree: ## Show a file tree
@git ls-files | tree --fromfile -a --filesfirst