2021-09-21 21:26:18 -07:00
|
|
|
PIP ?= pip3
|
|
|
|
PYTHON ?= python3
|
|
|
|
VERSION_STR := $(shell $(PYTHON) setup.py --version)
|
2018-01-17 13:35:10 -08:00
|
|
|
|
|
|
|
ifeq ($(OS),Windows_NT)
|
2019-09-24 15:36:08 -07:00
|
|
|
OS_VERSION=win-$(PROCESSOR_ARCHITECTURE)
|
2018-01-17 13:35:10 -08:00
|
|
|
APP_NAME=comictagger.exe
|
2019-09-24 15:36:08 -07:00
|
|
|
FINAL_NAME=ComicTagger-$(VERSION_STR)-$(OS_VERSION).exe
|
2018-01-17 13:35:10 -08:00
|
|
|
else ifeq ($(shell uname -s),Darwin)
|
2019-09-24 15:30:23 -07:00
|
|
|
OS_VERSION=osx-$(shell defaults read loginwindow SystemVersionStampAsString)-$(shell uname -m)
|
2018-01-17 13:35:10 -08:00
|
|
|
APP_NAME=ComicTagger.app
|
2019-09-24 15:30:23 -07:00
|
|
|
FINAL_NAME=ComicTagger-$(VERSION_STR)-$(OS_VERSION).app
|
2018-01-17 13:35:10 -08:00
|
|
|
else
|
|
|
|
APP_NAME=comictagger
|
|
|
|
FINAL_NAME=ComicTagger-$(VERSION_STR)
|
|
|
|
endif
|
|
|
|
|
2019-10-05 14:59:52 -07:00
|
|
|
.PHONY: all clean pydist upload dist
|
2018-01-17 13:35:10 -08:00
|
|
|
|
|
|
|
all: clean dist
|
2012-11-29 21:30:37 -08:00
|
|
|
|
|
|
|
clean:
|
2013-02-06 23:04:23 -08:00
|
|
|
rm -rf *~ *.pyc *.pyo
|
2013-02-14 17:05:35 -08:00
|
|
|
rm -rf scripts/*.pyc
|
2013-02-07 21:38:14 -08:00
|
|
|
cd comictaggerlib; rm -f *~ *.pyc *.pyo
|
|
|
|
rm -rf dist MANIFEST
|
2013-02-07 13:34:00 -08:00
|
|
|
rm -rf *.deb
|
2013-02-06 23:04:23 -08:00
|
|
|
rm -rf logdict*.log
|
2018-01-14 07:41:27 -08:00
|
|
|
$(MAKE) -C mac clean
|
2013-02-07 21:38:14 -08:00
|
|
|
rm -rf build
|
2018-09-19 13:05:39 -07:00
|
|
|
rm -rf comictaggerlib/ui/__pycache__
|
2021-10-21 21:58:20 -07:00
|
|
|
rm comictaggerlib/ctversion.py
|
2013-01-24 22:13:33 -08:00
|
|
|
|
2013-02-06 21:21:07 -08:00
|
|
|
pydist:
|
2018-09-19 13:05:39 -07:00
|
|
|
make clean
|
|
|
|
mkdir -p piprelease
|
|
|
|
rm -f comictagger-$(VERSION_STR).zip
|
2021-10-21 21:58:20 -07:00
|
|
|
$(PYTHON) setup.py sdist --formats=gztar
|
|
|
|
mv dist/comictagger-$(VERSION_STR).tar.gz piprelease
|
2018-09-19 13:05:39 -07:00
|
|
|
rm -rf comictagger.egg-info dist
|
2013-02-07 21:38:14 -08:00
|
|
|
|
2013-02-07 17:14:04 -08:00
|
|
|
upload:
|
2021-09-21 21:26:18 -07:00
|
|
|
$(PYTHON) setup.py register
|
2021-10-21 21:58:20 -07:00
|
|
|
$(PYTHON) setup.py sdist --formats=gztar upload
|
2013-02-06 11:13:07 -08:00
|
|
|
|
2019-10-05 14:59:52 -07:00
|
|
|
dist:
|
2019-09-28 08:01:05 -07:00
|
|
|
$(PIP) install .
|
2018-01-17 13:35:10 -08:00
|
|
|
pyinstaller -y comictagger.spec
|
2019-09-24 15:30:23 -07:00
|
|
|
cd dist && zip -r $(FINAL_NAME).zip $(APP_NAME)
|