inkstitch/Makefile

52 wiersze
1.4 KiB
Makefile
Czysty Zwykły widok Historia

2018-04-29 02:30:28 +00:00
EXTENSIONS:=inkstitch
# This gets the branch name or the name of the tag
2018-08-17 19:52:55 +00:00
VERSION:=$(subst /,-,$(TRAVIS_BRANCH))
OS:=$(TRAVIS_OS_NAME)
ARCH:=$(shell uname -m)
dist: distclean locales
bin/build-dist $(EXTENSIONS)
cp inx/*.inx dist
cp -a images/examples dist/inkstitch
2018-04-21 02:49:05 +00:00
cp -a palettes dist/inkstitch
2018-06-26 01:02:38 +00:00
cp -a symbols dist/inkstitch
mkdir -p dist/inkstitch/bin/locales
cp -a locales/* dist/inkstitch/bin/locales
cp -a print dist/inkstitch/bin/
if [ "$$BUILD" = "windows" ]; then \
cd dist; zip -r ../inkstitch-$(VERSION)-win32.zip *; \
else \
cd dist; tar zcf ../inkstitch-$(VERSION)-$(OS)-$(ARCH).tar.gz *; \
fi
distclean:
rm -rf build dist *.spec *.tar.gz
.PHONY: inx
2018-08-21 00:42:02 +00:00
inx: locales
mkdir -p inx
bin/generate-inx-files
.PHONY: messages.po
messages.po:
rm -f messages.po
bin/pyembroidery-gettext > pyembroidery-format-descriptions.py
2018-08-20 19:49:19 +00:00
pybabel extract -o messages.po -F babel.conf --add-location=full --add-comments=l10n,L10n,L10N --sort-by-file --strip-comments -k N_ .
rm pyembroidery-format-descriptions.py
.PHONY: locales
locales:
# message files will look like this:
2018-02-05 04:01:59 +00:00
# translations/messages_en_US.po
if ls translations/*.po > /dev/null 2>&1; then \
for po in translations/*.po; do \
2018-02-05 04:01:59 +00:00
lang=$${po%.*}; \
lang=$${lang#*_}; \
mkdir -p locales/$$lang/LC_MESSAGES/; \
msgfmt $$po -o locales/$$lang/LC_MESSAGES/inkstitch.mo; \
done; \
else \
2018-02-05 04:01:59 +00:00
mkdir -p locales; \
fi