Files
gimp/data/tips/Makefile.am
Jehan 8122e8cf36 extensions: fix builds after MR !653 (migrating to gettext).
(1) On recent meson versions, it fixes this error:

> extensions/goat-exercises/meson.build:108:0: ERROR: i18n.merge_file keyword argument 'output' was of type array[str] but should have been str

As docs explains, 'output' only accepts one item in i18n.merge_file().

This bug also happens on older meson (but there the reported error is a
lot less useful as it doesn't mention local meson build code).

(2) `setup.isl.xml` is a temporary intermediary file used to create the
    Windows installer. It must not be installed.

(3) `gimp30-windows-installer.mo` itself is only used to create
    `setup.isl.xml`. It must not be installed as well.

(4) gimp-tips.(its|loc) files (same for gimp-tags ones) should not be
    installed. They are only temporary data.

(5) Fix environment variable: s/GETTEXT_DATA_DIRS/GETTEXTDATADIRS/

Fixes:

> /usr/bin/msgfmt: cannot locate ITS rules for ../../../data/tips/gimp-tips.xml.in

(6) Fix various bugs in the *.setup.isl files creation in autotools
    build (typo, wrong files used, order of options in `xsltproc`
    apparently meaningful, and so on. I guess the autotools build was
    not as well tested as the meson one :P).

(7) Fixing the unit test verifying language lists consistency.

(8) `setup.isl.xml.in` must be added to the distribution.
2022-06-25 12:41:21 +02:00

44 lines
1001 B
Makefile

## Makefile.am for gimp/data/tips
tipsdatadir = $(gimpdatadir)/tips
tipsdata_in_files = gimp-tips.xml.in
tipsdata_data_files = $(tipsdata_in_files:.xml.in=.xml)
tipsdata_DATA = $(tipsdata_data_files)
EXTRA_DIST = \
$(tipsdata_DATA) \
$(tipsdata_in_files) \
gimp-tips.dtd \
fortunes.xsl
DISTCLEANFILES = $(tipsdata_data_files)
itsdir = $(datadir)/gettext/its
its_DATA = its/gimp-tips.loc its/gimp-tips.its
EXTRA_DIST += $(its_DATA)
gimp-tips.xml: gimp-tips.xml.in $(wildcard $(top_srcdir)/po-tips/*.po)
$(AM_V_GEN) GETTEXTDATADIRS=$(abs_srcdir) $(MSGFMT) --xml --template $< -d $(top_srcdir)/po-tips -o $@
validate: gimp-tips.xml
if HAVE_XMLLINT
@$(XMLLINT) --noout --path $(srcdir) --valid $< || \
( echo "* gimp-tips.xml INVALID *"; exit 1; )
endif
fortunes: gimp-tips.xml fortunes.xsl
if HAVE_XSLTPROC
$(XSLTPROC) --stringparam lang en fortunes.xsl $< > $(@) || rm -f $(@)
else
@echo "xsltproc is needed to build fortunes"; exit 1;
endif
dist-hook: validate