[glib] Rename gschema-compile to glib-compile-schemas



commit ec664445a9cf1769e440a25ffb4e17e9e644f6d0
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Apr 23 17:27:26 2010 -0400

    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.

 docs/reference/gio/Makefile.am                     |    4 ++--
 docs/reference/gio/gio-docs.xml                    |    2 +-
 ...schema-compile.xml => glib-compile-schemas.xml} |   10 +++++-----
 docs/reference/gio/gsettings-schema-convert.xml    |    2 +-
 docs/reference/gio/migrating.xml                   |    6 +++---
 gio-2.0.pc.in                                      |    2 +-
 gio/Makefile.am                                    |    6 +++---
 gio/gsettings.c                                    |    5 +++--
 gio/tests/gschema-compile.c                        |    2 +-
 m4macros/gsettings.m4                              |   13 +++++++++----
 10 files changed, 29 insertions(+), 23 deletions(-)
---
diff --git a/docs/reference/gio/Makefile.am b/docs/reference/gio/Makefile.am
index fbcc32d..3d667e1 100644
--- a/docs/reference/gio/Makefile.am
+++ b/docs/reference/gio/Makefile.am
@@ -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
 
diff --git a/docs/reference/gio/gio-docs.xml b/docs/reference/gio/gio-docs.xml
index a45f736..8ea9f38 100644
--- a/docs/reference/gio/gio-docs.xml
+++ b/docs/reference/gio/gio-docs.xml
@@ -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>
diff --git a/docs/reference/gio/gschema-compile.xml b/docs/reference/gio/glib-compile-schemas.xml
similarity index 90%
rename from docs/reference/gio/gschema-compile.xml
rename to docs/reference/gio/glib-compile-schemas.xml
index d278c08..9a7e679 100644
--- a/docs/reference/gio/gschema-compile.xml
+++ b/docs/reference/gio/glib-compile-schemas.xml
@@ -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
diff --git a/docs/reference/gio/gsettings-schema-convert.xml b/docs/reference/gio/gsettings-schema-convert.xml
index b323a99..750ebbe 100644
--- a/docs/reference/gio/gsettings-schema-convert.xml
+++ b/docs/reference/gio/gsettings-schema-convert.xml
@@ -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>
 
diff --git a/docs/reference/gio/migrating.xml b/docs/reference/gio/migrating.xml
index c604937..df711af 100644
--- a/docs/reference/gio/migrating.xml
+++ b/docs/reference/gio/migrating.xml
@@ -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
diff --git a/gio-2.0.pc.in b/gio-2.0.pc.in
index 7297992..a7ba443 100644
--- a/gio-2.0.pc.in
+++ b/gio-2.0.pc.in
@@ -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
diff --git a/gio/Makefile.am b/gio/Makefile.am
index 7eebda9..b0af5df 100644
--- a/gio/Makefile.am
+++ b/gio/Makefile.am
@@ -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		\
diff --git a/gio/gsettings.c b/gio/gsettings.c
index 19bb680..3817be0 100644
--- a/gio/gsettings.c
+++ b/gio/gsettings.c
@@ -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 >
diff --git a/gio/tests/gschema-compile.c b/gio/tests/gschema-compile.c
index 56c2555..8939955 100644
--- a/gio/tests/gschema-compile.c
+++ b/gio/tests/gschema-compile.c
@@ -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,
diff --git a/m4macros/gsettings.m4 b/m4macros/gsettings.m4
index 2935246..b97867d 100644
--- a/m4macros/gsettings.m4
+++ b/m4macros/gsettings.m4
@@ -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



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]