2018-09-19 13:05:39 -07:00
|
|
|
VERSION_STR := $(shell python -c 'import comictaggerlib.ctversion; print( comictaggerlib.ctversion.version)')
|
2018-01-17 13:35:10 -08:00
|
|
|
|
|
|
|
ifeq ($(OS),Windows_NT)
|
|
|
|
APP_NAME=comictagger.exe
|
|
|
|
FINAL_NAME=ComicTagger-$(VERSION_STR).exe
|
|
|
|
else ifeq ($(shell uname -s),Darwin)
|
|
|
|
APP_NAME=ComicTagger.app
|
|
|
|
FINAL_NAME=ComicTagger-$(VERSION_STR).app
|
|
|
|
else
|
|
|
|
APP_NAME=comictagger
|
|
|
|
FINAL_NAME=ComicTagger-$(VERSION_STR)
|
|
|
|
endif
|
|
|
|
|
|
|
|
.PHONY: all clean pydist upload unrar dist
|
|
|
|
|
|
|
|
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-01-14 07:41:27 -08:00
|
|
|
$(MAKE) -C unrar clean
|
2018-09-19 13:05:39 -07:00
|
|
|
rm -f unrar/libunrar.so unrar/libunrar.a unrar/unrar
|
|
|
|
rm -f comictaggerlib/libunrar.so
|
|
|
|
rm -rf comictaggerlib/ui/__pycache__
|
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
|
2013-02-07 17:14:04 -08:00
|
|
|
python setup.py sdist --formats=zip #,gztar
|
2018-09-19 13:05:39 -07:00
|
|
|
mv dist/comictagger-$(VERSION_STR).zip piprelease
|
|
|
|
rm -rf comictagger.egg-info dist
|
2013-02-07 21:38:14 -08:00
|
|
|
|
2013-02-07 17:14:04 -08:00
|
|
|
upload:
|
2014-04-18 08:42:05 -07:00
|
|
|
python setup.py register
|
2014-03-23 15:28:03 -07:00
|
|
|
python setup.py sdist --formats=zip upload
|
2013-02-06 11:13:07 -08:00
|
|
|
|
2018-01-14 07:41:27 -08:00
|
|
|
unrar:
|
2018-01-17 13:35:10 -08:00
|
|
|
ifeq ($(OS),Windows_NT)
|
|
|
|
# statically compile mingw dependencies
|
|
|
|
# https://stackoverflow.com/questions/18138635/mingw-exe-requires-a-few-gcc-dlls-regardless-of-the-code
|
|
|
|
$(MAKE) -C unrar LDFLAGS='-Wl,-Bstatic,--whole-archive -lwinpthread -Wl,--no-whole-archive -pthread -static-libgcc -static-libstdc++' lib
|
|
|
|
else
|
|
|
|
$(MAKE) -C unrar lib
|
|
|
|
endif
|
2018-01-14 07:41:27 -08:00
|
|
|
|
|
|
|
dist: unrar
|
2018-01-17 13:35:10 -08:00
|
|
|
pyinstaller -y comictagger.spec
|
2018-09-19 13:05:39 -07:00
|
|
|
mv dist/$(APP_NAME) dist/$(FINAL_NAME)
|