-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathMakefile
56 lines (49 loc) · 1.31 KB
/
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
VERSION := 3.3.8
UNAME := $(shell uname -s)
##@
##@ Help
##@
.PHONY: help
help: ##@ (Default) Print listing of key targets with their descriptions
@printf "\nUsage: make <command>\n"
ifeq ($(UNAME), Linux)
@grep -F -h "##@" $(MAKEFILE_LIST) | grep -F -v grep -F | sed -e 's/\\$$//' | awk 'BEGIN {FS = ":*[[:space:]]*##@[[:space:]]*"}; \
{ \
if($$2 == "") \
pass; \
else if($$0 ~ /^#/) \
printf "\n\n%s\n", $$2; \
else if($$1 == "") \
printf " %-20s%s\n", "", $$2; \
else \
printf "\n \033[34m%-20s\033[0m %s", $$1, $$2; \
}'
@printf "\n\n"
else ifeq ($(UNAME), Darwin)
@grep -F -h "##@" $(MAKEFILE_LIST) | grep -F -v grep -F | sed -e 's/\\$$//' | awk 'BEGIN {FS = ":*[[:space:]]*##@[[:space:]]*"}; \
{ \
if($$2 == "") \
next; \
else if($$0 ~ /^#/) \
printf "\n\n%s\n", $$2; \
else if($$1 == "") \
printf " %-20s%s\n", "", $$2; \
else \
printf "\n \033[34m%-20s\033[0m %s", $$1, $$2; \
}'
@printf "\n\n"
else
@printf "\nmake help not supported on $(uname)\n"
endif
.DEFAULT_GOAL := help
##@
##@ Commands
##@
build: ##@ Build the python package
python setup.py sdist
install: ##@ Install with pip
pip install dist/redfish_utilities-${VERSION}.tar.gz
install-uv: ##@ Install with uv
uv pip install dist/redfish_utilities-${VERSION}.tar.gz
lint: ##@ Run linting
black .