Commit 37a68dd6 authored by Salamandar's avatar Salamandar Committed by Bastien Nocera

build: Add script to generate fd.o XML file

Generate the gmo translation files and use itstool to merge those
translations into the XML file.
parent a30f0ed9
......@@ -35,7 +35,8 @@ EXTRA_DIST = \
HACKING \
$(man_MANS) \
$(ITS_FILES) \
shared-mime-info.pc.in
shared-mime-info.pc.in \
data/freedesktop_generate.sh
CLEANFILES = freedesktop.org.xml po/stamp-it
......@@ -44,9 +45,8 @@ pkgconfig_DATA = shared-mime-info.pc
$(pkgconfig_DATA): config.status
freedesktop.org.xml: data/freedesktop.org.xml.in $(top_srcdir)/po/*.po data/its/shared-mime-info.its
$(MAKE) -C po update-gmo
$(AM_V_GEN)$(ITSTOOL) --its $(top_srcdir)/data/its/shared-mime-info.its -j $< -o $@ $(top_srcdir)/po/*.gmo
freedesktop.org.xml: data/freedesktop.org.xml.in $(top_srcdir)/po/*.po data/its/shared-mime-info.its data/freedesktop_generate.sh
$(top_srcdir)/data/freedesktop_generate.sh "$(top_srcdir)" "$(top_builddir)"
if CROSS_COMPILING
update_mime_database=$(UPDATE_MIME_DATABASE)
......
#!/bin/bash -e
if [ "$1" == "--meson" ] ; then
shift
MESON=enabled
fi
src_root="$1"
build_root="$2"
if test "x$MESON" = "x" ; then
make -C "${build_root}/po" update-gmo
OUT="${build_root}/freedesktop.org.xml"
GMODIR="${src_root}/po/"
else
ninja -C "${build_root}" shared-mime-info-gmo
OUT="${build_root}/data/freedesktop.org.xml"
GMODIR="${build_root}/po/"
fi
itstool \
--its "${src_root}/data/its/shared-mime-info.its" \
--join "${src_root}/data/freedesktop.org.xml.in" \
-o "${OUT}" \
"${GMODIR}"*".gmo"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment