telegram-purple/AppStream/Makefile
Ben Wiederhake 42c9ea8a3a AppStream: fix target order
Ahh, right, thankyou make, for reminding me that 'all' isn't actually
any automagically chosen target that is chosen when no target has been
specified.  No, instead, the first target is chosen.
And not just any target!  Only the first non-templated target is chosen,
so in this case: po/telegram-purple.metainfo.xml.pot .

However, in our case that's utterly pointless, so 'all' needs to
be on top again.  I should have known there was an important reason.
2017-03-13 23:35:59 +01:00

45 lines
1.6 KiB
Makefile

# This file is part of telegram-purple
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
#
# Copyright Ben Wiederhake 2016
# This file is NOT meant for inclusion into the main Makefile.
LOCALES=$(shell cat po/LINGUAS)
LOCALE_MOS=$(addprefix po/,$(addsuffix .mo,$(LOCALES)))
# Hardcoded, since this should only be run on very few machines anyway,
# which are expected to have msgfmt on their $PATH
MSGFMT_PATH=msgfmt
all: translate
po/%.mo: po/%.po
${MSGFMT_PATH} -cf -o $@ $<
po/telegram-purple.metainfo.xml.pot: telegram-purple.metainfo.untranslated.xml as-metainfo.its
itstool -i as-metainfo.its -o $@ $<
# CAREFUL WHEN EDITING!
# "-j raw.xml *.mo" must be the last options!
telegram-purple.metainfo.xml: as-metainfo.its telegram-purple.metainfo.untranslated.xml $(LOCALE_MOS) po/LINGUAS
itstool -i as-metainfo.its -o $@ \
-j telegram-purple.metainfo.untranslated.xml $(LOCALE_MOS)
.PHONY: potfile
potfile: po/telegram-purple.metainfo.xml.pot
.PHONY: translate
translate: telegram-purple.metainfo.xml