inkstitch/Makefile

40 wiersze
1.0 KiB
Makefile
Czysty Zwykły widok Historia

EXTENSIONS:=embroider embroider_params embroider_simulate embroider_update
# This gets the branch name or the name of the tag
VERSION:=$(TRAVIS_BRANCH)
OS:=$(shell uname)
ARCH:=$(shell uname -m)
dist: distclean locales
bin/build-dist $(EXTENSIONS)
cp *.inx dist
2018-02-05 04:10:18 +00:00
mv locales 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
messages.po:
rm -f messages.po
2018-02-28 04:14:29 +00:00
xgettext --no-location --add-comments embroider*.py inkstitch/__init__.py
.PHONY: messages.po
.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