2018-04-29 02:30:28 +00:00
|
|
|
EXTENSIONS:=inkstitch
|
2018-01-14 01:18:50 +00:00
|
|
|
|
|
|
|
# This gets the branch name or the name of the tag
|
2018-01-24 03:04:19 +00:00
|
|
|
VERSION:=$(TRAVIS_BRANCH)
|
2018-01-14 01:18:50 +00:00
|
|
|
OS:=$(shell uname)
|
|
|
|
ARCH:=$(shell uname -m)
|
|
|
|
|
2018-02-05 03:38:24 +00:00
|
|
|
dist: distclean locales
|
2018-01-14 01:18:50 +00:00
|
|
|
bin/build-dist $(EXTENSIONS)
|
2018-04-10 00:13:13 +00:00
|
|
|
cp inx/*.inx dist
|
2018-03-31 00:40:29 +00:00
|
|
|
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
|
2018-03-31 00:37:11 +00:00
|
|
|
mkdir -p dist/inkstitch/bin/locales
|
|
|
|
cp -a locales/* dist/inkstitch/bin/locales
|
|
|
|
cp -a print dist/inkstitch/bin/
|
2018-02-20 02:43:39 +00:00
|
|
|
if [ "$$BUILD" = "windows" ]; then \
|
|
|
|
cd dist; zip -r ../inkstitch-$(VERSION)-win32.zip *; \
|
|
|
|
else \
|
|
|
|
cd dist; tar zcf ../inkstitch-$(VERSION)-$(OS)-$(ARCH).tar.gz *; \
|
|
|
|
fi
|
2018-01-14 01:18:50 +00:00
|
|
|
|
|
|
|
distclean:
|
|
|
|
rm -rf build dist *.spec *.tar.gz
|
2018-02-05 03:38:24 +00:00
|
|
|
|
2018-02-27 00:49:43 +00:00
|
|
|
messages.po:
|
2018-02-05 03:38:24 +00:00
|
|
|
rm -f messages.po
|
2018-03-31 00:37:11 +00:00
|
|
|
pybabel extract -o messages.po -F babel.conf --no-location --add-comments l10n --add-comments L10n --add-comments L10N -s .
|
2018-02-05 03:38:24 +00:00
|
|
|
|
2018-02-27 00:49:43 +00:00
|
|
|
.PHONY: messages.po
|
2018-02-05 03:38:24 +00:00
|
|
|
.PHONY: locales
|
|
|
|
locales:
|
|
|
|
# message files will look like this:
|
2018-02-05 04:01:59 +00:00
|
|
|
# translations/messages_en_US.po
|
2018-02-05 03:38:24 +00:00
|
|
|
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#*_}; \
|
2018-02-05 03:38:24 +00:00
|
|
|
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; \
|
2018-02-05 03:38:24 +00:00
|
|
|
fi
|