2014-04-07 12:38:09 +00:00
|
|
|
# Handle files that xgettext can't handle automatically
|
|
|
|
|
|
|
|
# intltool-extract is kind of weird. It treats the input file list as relative
|
|
|
|
# to what it thinks $srcdir is, which is either the current directory or the
|
|
|
|
# value of the undocumented -s parameter. For the output filename, it has two
|
|
|
|
# modes: --update, the default, will output files in the same directory as the
|
|
|
|
# input file. --local will output files in a tmp/ directory relative to the
|
|
|
|
# current working directory.
|
|
|
|
#
|
|
|
|
# All output files need to be in $srcdir for gettext to be able to find them.
|
|
|
|
|
2015-03-23 11:36:12 +00:00
|
|
|
DISTFILES.common.extra2 = Rules-extract
|
2014-04-07 12:38:09 +00:00
|
|
|
|
|
|
|
%.desktop.in.h: %.desktop.in
|
2015-03-23 11:36:12 +00:00
|
|
|
@intltool-extract -q --type=gettext/keys -l --srcdir / $(realpath $<) && \
|
2014-04-07 12:38:09 +00:00
|
|
|
sed 's/no-c-format/python-format/' < tmp/$$(basename $@) > $@ && \
|
|
|
|
rm -f tmp/$$(basename $@)
|
|
|
|
|
|
|
|
%liveinst.h: %liveinst
|
2015-03-23 11:36:12 +00:00
|
|
|
@intltool-extract -q --type=gettext/quoted -l --srcdir / $(realpath $<) && \
|
2014-04-07 12:38:09 +00:00
|
|
|
sed 's/no-c-format/python-format/' < tmp/$$(basename $@) > $@ && \
|
|
|
|
rm -f tmp/$$(basename $@)
|
|
|
|
|
|
|
|
# Remove the $top_srcdir prefix from files so that xgettext can search for the file
|
|
|
|
# relative to $top_srcdir and get the path name right in the .po
|
|
|
|
%anaconda.po: %anaconda
|
2015-03-23 11:36:12 +00:00
|
|
|
@input_file="$(realpath $<)" && \
|
2014-04-07 12:38:09 +00:00
|
|
|
$(XGETTEXT) $(XGETTEXT_OPTIONS) --omit-header --directory=$(top_srcdir) \
|
2015-03-23 11:36:12 +00:00
|
|
|
--language=Python -o $@ $${input_file##$(realpath $(top_srcdir))/}
|
2014-04-07 12:38:09 +00:00
|
|
|
|
|
|
|
%fedora-welcome.po: %fedora-welcome
|
2015-03-23 11:36:12 +00:00
|
|
|
@input_file="$(realpath $<)" && \
|
2014-04-07 12:38:09 +00:00
|
|
|
$(XGETTEXT) $(XGETTEXT_OPTIONS) --omit-header --directory=$(top_srcdir) \
|
2015-03-23 11:36:12 +00:00
|
|
|
--language=JavaScript -o $@ $${input_file##$(realpath $(top_srcdir))/}
|
2014-04-07 12:38:09 +00:00
|
|
|
|
2015-03-23 11:36:12 +00:00
|
|
|
maintainer-clean: maintainer-clean-extract
|
|
|
|
maintainer-clean-extract:
|
2014-04-07 12:38:09 +00:00
|
|
|
rm -f \
|
|
|
|
$(top_srcdir)/anaconda.po $(top_srcdir)/data/liveinst/gnome/fedora-welcome.po \
|
|
|
|
$(top_srcdir)/data/liveinst/console.apps/liveinst.h
|
2015-03-23 11:36:12 +00:00
|
|
|
find $(top_srcdir) \( -name '*.desktop.in.h' \) \
|
2014-04-07 12:38:09 +00:00
|
|
|
-exec rm -f {} \;
|
2015-03-23 11:36:12 +00:00
|
|
|
|
|
|
|
mostlyclean: mostlyclean-extract
|
|
|
|
mostlyclean-extract:
|
|
|
|
rm -rf .intltool-merge-cache
|