-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathMakefile
43 lines (34 loc) · 1.04 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
#
# Makefile
# Copyright (C) 2005-2023 shinGETsu Project.
#
PREFIX = /usr/local
PACKAGE_DIR = ..
PACKAGE = saku-$(shell cat file/version.txt)
.PHONY: all install exe version check clean distclean package
all:
python3 setup.py build
install:
pip3 install --break-system-packages --prefix=$(PREFIX) .
version:
./tool/git2ver.sh > file/version.txt
@cat file/version.txt
check:
sh tests/runtests.sh
clean:
rm -f saku
rm -f www/__merged.css www/__merged.js
rm -Rf build dist root
rm -Rf cache log run
find . -name "*.py[co]" \! -path ".git/*" -print0 | xargs -0 -r rm -f
-find . -type d -name "__pycache__" -print0 | xargs -0 -r rmdir
distclean: clean
rm -f Pipfile.lock
find . \( -name "*~" -o -name "#*" -o -name ".#*" \) \! -path ".git/*" \
-print0 | \
xargs -0 -r rm -fv
package: distclean version
-rm -Rf $(PACKAGE_DIR)/$(PACKAGE).tar.gz $(PACKAGE_DIR)/$(PACKAGE)
rsync -a --exclude=".git*" . $(PACKAGE_DIR)/$(PACKAGE)
tar -zcf $(PACKAGE_DIR)/$(PACKAGE).tar.gz -C $(PACKAGE_DIR) $(PACKAGE)
-rm -Rf $(PACKAGE_DIR)/$(PACKAGE)