2013-09-30 23:49:45 +08:00
|
|
|
|
|
|
|
.PHONY: all install clean uninstall
|
|
|
|
|
2013-10-01 08:55:42 +08:00
|
|
|
DESTDIR=
|
2013-09-30 23:49:45 +08:00
|
|
|
PREFIX=/usr/local
|
|
|
|
|
|
|
|
CP=cp
|
|
|
|
INSTALL=install
|
2013-10-01 09:07:54 +08:00
|
|
|
LN=ln
|
2013-09-30 23:49:45 +08:00
|
|
|
MKDIR=mkdir -p
|
|
|
|
PYTHON=python3
|
|
|
|
RM=rm -f -v
|
2016-08-24 21:49:20 +08:00
|
|
|
MSGFMT=msgfmt
|
2013-09-30 23:49:45 +08:00
|
|
|
|
|
|
|
all:
|
2016-08-24 21:49:20 +08:00
|
|
|
for pofiles in en ja zh_CN zh_TW; do \
|
|
|
|
$(MSGFMT) "po/$$pofiles.po" -o "po/$$pofiles.mo" ; \
|
|
|
|
done
|
2013-09-30 23:49:45 +08:00
|
|
|
|
|
|
|
install:
|
2013-10-01 09:07:54 +08:00
|
|
|
$(MKDIR) "$(DESTDIR)$(PREFIX)/share/danmaku2ass"
|
2013-11-03 12:38:18 +08:00
|
|
|
$(INSTALL) -Dm0755 danmaku2ass.py "$(DESTDIR)$(PREFIX)/share/danmaku2ass/danmaku2ass.py"
|
2016-08-24 21:49:20 +08:00
|
|
|
for locale in en ja zh_CN zh_TW; do \
|
|
|
|
$(MKDIR) "$(DESTDIR)$(PREFIX)/share/locale/$$locale/LC_MESSAGES" ; \
|
|
|
|
$(CP) "po/$$locale.mo" "$(DESTDIR)$(PREFIX)/share/locale/$$locale/LC_MESSAGES/danmaku2ass.mo" ; \
|
|
|
|
done
|
2013-10-01 09:07:54 +08:00
|
|
|
$(MKDIR) "$(DESTDIR)$(PREFIX)/bin"
|
2017-07-30 21:51:43 +08:00
|
|
|
$(LN) -sf "$(PREFIX)/share/danmaku2ass/danmaku2ass.py" "$(DESTDIR)$(PREFIX)/bin/danmaku2ass"
|
2013-09-30 23:49:45 +08:00
|
|
|
|
|
|
|
clean:
|
2013-10-01 08:55:42 +08:00
|
|
|
$(RM) -R __pycache__
|
2016-08-24 21:49:20 +08:00
|
|
|
$(RM) po/*.mo
|
2013-09-30 23:49:45 +08:00
|
|
|
|
|
|
|
uninstall:
|
2013-10-01 09:17:44 +08:00
|
|
|
$(RM) -R "$(DESTDIR)$(PREFIX)/bin/danmaku2ass" "$(DESTDIR)$(PREFIX)/share/danmaku2ass"
|
2013-09-30 23:49:45 +08:00
|
|
|
|