comictagger/Makefile

50 lines
1.2 KiB
Makefile
Raw Normal View History

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
.PHONY: all clean pydist upload dist
2018-01-17 13:35:10 -08:00
all: clean dist
clean:
rm -rf *~ *.pyc *.pyo
rm -rf scripts/*.pyc
cd comictaggerlib; rm -f *~ *.pyc *.pyo
rm -rf dist MANIFEST
rm -rf *.deb
rm -rf logdict*.log
$(MAKE) -C mac clean
rm -rf build
rm -rf comictaggerlib/ui/__pycache__
rm comictaggerlib/ctversion.py
pydist:
make clean
mkdir -p piprelease
rm -f comictagger-$(VERSION_STR).zip
$(PYTHON) setup.py sdist --formats=gztar
mv dist/comictagger-$(VERSION_STR).tar.gz piprelease
rm -rf comictagger.egg-info dist
upload:
$(PYTHON) setup.py register
$(PYTHON) setup.py sdist --formats=gztar upload
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)