如何为 glib-compile-resources 设置 autotools?

How to setup autotools for glib-compile-resources?

如何将我的 Makefile.am 文件设置为 运行 glib-compile-resources 以编译资源。

这是我的 Makefile.am 目前的样子:


INTLTOOL_FILES = intltool-extract.in \
                 intltool-merge.in \
                 intltool-update.in

ACLOCAL_AMFLAGS = -I m4

SUBDIRS = src data po gnome pixmaps dicfiles

EXTRA_DIST = COPYING rpm/gjiten.spec scripts/make_debs scripts/make_release\
         intltool-extract.in intltool-merge.in intltool-update.in


DISTCLEANFILES = ${INTLTOOL_FILES} \
                 po/.intltool-merge-cache

MAINTAINERCLEANFILES += configure config.sub config.guess aclocal.m4 compile \
      depcomp install-sh \
      ${DISTCLEANFILES} intltool-extract intltool-merge intltool-update.in \
        ltmain.sh missing mkinstalldirs config.h.in po/*stamp* *stamp* 

或者我是否必须在 autogen.h 或 configure.ac 中设置命令?

How would I setup my Makefile.am file to run glib-compile-resources to compile resources.

有很多方法,但我向您推荐的是add an all-local target。例如:

all-local:
        glib-compile-resources

您还希望确保提供清理生成的文件的功能,这可以通过将它们添加到 CLEANFILES 或通过添加具有适当配方的 clean-local 目标来完成。