-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.pkg.mk
45 lines (37 loc) · 1.05 KB
/
Makefile.pkg.mk
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
MAKE = make --no-print-directory
DIR = $(shell basename `pwd`)
project ?= ""
.PHONY: help
help:
@echo ""
@echo "Usage: make [target(s)]"
@echo "where target is any of:"
@echo ""
@echo " build - build packge"
@echo " install - install package"
@echo " uninstall - uninstall package"
@echo " all - run target build, install"
@echo " rall - run targets uninstall, all"
@echo " clean - clean derived files(egg-info, ditr, etc.)"
@echo ""
.PHONY: clean build install all uninstall rall
clean:
rm -rf *.egg-info || true
rm -rf ./dist/ || true
build:
$(MAKE) clean
python setup.py bdist_wheel
last_pkg_name =$(lastword $(sort $(wildcard dist/*)))
install:
@echo "+-------------------------------------------------------------------------+"
@echo "| Installation package: $(last_pkg_name)"
@echo "+-------------------------------------------------------------------------+"
pip install $(last_pkg_name)
all:
$(MAKE) build
$(MAKE) install
uninstall:
pip uninstall --yes $(project) || true
rall:
$(MAKE) uninstall
$(MAKE) all