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

@ -116,7 +116,7 @@ content_files = \
overview.xml \
migrating.xml \
gio-querymodules.xml \
gschema-compile.xml \
glib-compile-schemas.xml\
gsettings.xml \
gsettings-schema-convert.xml
@ -135,7 +135,7 @@ EXTRA_DIST += \
man_MANS = \
gio-querymodules.1 \
gschema-compile.1 \
glib-compile-schemas.1 \
gsettings.1 \
gsettings-schema-convert.1

View File

@ -143,7 +143,7 @@
<title>GIO Tools</title>
<xi:include href="gio-querymodules.xml"/>
<xi:include href="gsettings.xml"/>
<xi:include href="gschema-compile.xml"/>
<xi:include href="glib-compile-schemas.xml"/>
<xi:include href="gsettings-schema-convert.xml"/>
</chapter>
</part>

View File

@ -1,26 +1,26 @@
<refentry id="gschema-compile" lang="en">
<refentry id="glib-compile-schemas" lang="en">
<refmeta>
<refentrytitle>gschema-compile</refentrytitle>
<refentrytitle>glib-compile-schemas</refentrytitle>
<manvolnum>1</manvolnum>
<refmiscinfo class="manual">User Commands</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gschema-compile</refname>
<refname>glib-compile-schemas</refname>
<refpurpose>GSettings schema compiler</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>gschema-compile</command>
<command>glib-compile-schemas</command>
<arg choice="opt" rep="repeat">option</arg>
<arg choice="req">directory</arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1><title>Description</title>
<para><command>gschema-compile</command> compiles all the GSettings XML
<para><command>glib-compile-schemas</command> compiles all the GSettings XML
schema files in <replaceable>directory</replaceable> into a binary file
with the name <filename>gschemas.compiled</filename> that can be used
by <link linkend="GSettings"><type>GSettings</type></link>. The XML schema

View File

@ -27,7 +27,7 @@ the result of the conversion.
</para>
<para>
Note that GSettings schemas need to be converted into binary form
with <link linkend="gschema-compile">gschema-compile</link> before they
with <link linkend="glib-compile-schemas">glib-compile-schemas</link> before they
can be used by applications.
</para>

View File

@ -387,7 +387,7 @@ produces a <filename>org.gnome.font-rendering.gschema.xml</filename> file with t
</para>
<para>
Schemas are compiled into binary form by the
<link linkend="gschema-compile">gschema-compile</link> utility.
<link linkend="glib-compile-schemas">glib-compile-schemas</link> utility.
GIO provides a <literal>gschema_compile</literal>
variable for the schema compiler, which can be used in
<filename>configure.in</filename> as follows:
@ -404,7 +404,7 @@ gsettingsschema_DATA = my.app.gschema.xml
@GSETTINGS_CHECK_RULE@
if GSETTINGS_SCHEMAS_INSTALL
install-data-hook:
$(gschema_compile) $(DESTDIR)$(gsettingsschemadir)
$(GLIB_COMPILE_SCHEMAS) $(DESTDIR)$(gsettingsschemadir)
endif
</programlisting>
</para>
@ -504,7 +504,7 @@ endif
were in GConf, so that existing settings in the users GConf
database are preserved. You can achieve this by using the
<option>--allow-any-name</option> with the
<link linkend="gschema-compile">gschema-compile</link> schema
<link linkend="glib-compile-schemas">glib-compile-schemas</link> schema
compiler. Note that this option is only meant
to ease the process of porting your application, allowing parts
of your application to continue to access GConf and parts to use

View File

@ -4,7 +4,7 @@ libdir=@libdir@
includedir=@includedir@
giomoduledir=@GIO_MODULE_DIR@
gschema_compile=@bindir@/gschema-compile
glib_compile_schemas=@bindir@/gschema-compile
Name: GIO
Description: glib I/O library

View File

@ -497,7 +497,7 @@ gio-2.0.lib: libgio-2.0.la gio.def
lib -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgio-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:gio.def -out:$@
dist_bin_SCRIPTS = gsettings-schema-convert
bin_PROGRAMS = gio-querymodules gschema-compile gsettings
bin_PROGRAMS = gio-querymodules glib-compile-schemas gsettings
gio_querymodules_SOURCES = gio-querymodules.c
gio_querymodules_LDADD = \
@ -507,8 +507,8 @@ gio_querymodules_LDADD = \
libgio-2.0.la \
$(NULL)
gschema_compile_LDADD = $(top_builddir)/glib/libglib-2.0.la
gschema_compile_SOURCES = \
glib_compile_schemas_LDADD = $(top_builddir)/glib/libglib-2.0.la
glib_compile_schemas_SOURCES = \
gvdb/gvdb-format.h \
gvdb/gvdb-builder.h \
gvdb/gvdb-builder.c \

View File

@ -70,8 +70,9 @@
* <tag class="starttag">key</tag> element.
*
* GSettings uses schemas in a compact binary form that is created
* by the gschema-compile utility. The input is a schema description in
* an XML format that can be described by the following DTD:
* by the <link linkend="glib-compile-schemas">glib-compile-schemas</link>
* utility. The input is a schema description in an XML format that can be
* described by the following DTD:
* |[<![CDATA[
* <!ELEMENT schemalist (schema*) >
* <!ATTLIST schemalist gettext-domain #IMPLIED >

View File

@ -21,7 +21,7 @@ test_schema (gpointer data)
gchar *filename = g_strconcat (test->name, ".gschema.xml", NULL);
gchar *path = g_build_filename (SRCDIR, "schema-tests", filename, NULL);
gchar *argv[] = {
"../gschema-compile",
"../glib-compile-schemas",
"--dry-run",
"--schema-files", path,
(gchar *)test->opt,

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