Rename gschema-compile to glib-compile-schemas

And clean up the autofoo a bit: use an uppercase variable,
check for pkg-config, check for presence of glib-compile-schemas.
This commit is contained in:
Matthias Clasen
2010-04-23 17:27:26 -04:00
parent e6e7015bbd
commit ec664445a9
10 changed files with 29 additions and 23 deletions

View File

@@ -7,24 +7,29 @@ AC_DEFUN([GLIB_GSETTINGS],
[
AC_ARG_ENABLE(schemas-install,
AC_HELP_STRING([--disable-schemas-install],
[Disable the schemas installation]),
[Disable installation of GSettings schemas]),
[case ${enableval} in
yes|no) ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-install]) ;;
esac])
AM_CONDITIONAL([GSETTINGS_SCHEMAS_INSTALL], [test "$enable_schemas_install" != no])
PKG_PROG_PKG_CONFIG([0.16])
AC_SUBST(gsettingsschemadir, [${datadir}/glib-2.0/schemas])
AC_SUBST(gschema_compile, `pkg-config --variable gschema_compile gio-2.0`)
AC_SUBST(GLIB_COMPILE_SCHEMAS, `$PKG_CONFIG --variable glib_compile_schemas gio-2.0`)
if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then
AC_MSG_ERROR([glib-compile-schemas not found.])
fi
GSETTINGS_CHECK_RULE='
.PHONY : check-gsettings-schema
gschema_xml_files := $(wildcard *.gschema.xml)
check-gsettings-schema: gsettings_schema_validate_stamp
CLEANFILES += gsettings_schema_validate_stamp
MOSTLYCLEANFILES += gsettings_schema_validate_stamp
gsettings_schema_validate_stamp: $(gschema_xml_files)
$(gschema_compile) --dry-run --schema-files $?
$(GLIB_COMPILE_SCHEMAS) --dry-run --schema-files $?
touch [$]@
all: check-gsettings-schema