If there are no schemas, don't try to install "" at install time.
(In particular, automake conditionals don't work properly with
@-expanded rules, so if you conditionally build a schema, you'll
still unconditionally get the install rule.)
https://bugzilla.gnome.org/show_bug.cgi?id=633381
A while ago we allowed glib-compile-schemas to return a 'success' status
in the case that just one schema file contained errors. Of course, this
is the exact opposite of what we want in the case that we are checking
schema validity at compile time.
Use the --strict flag for that case.
This closes#633115.
Rewrite the install rule for GSettings schemas to not depend on an
obscure chunk of non-portable sed that nobody understands the purpose
of.
Instead, use make's VPATH feature to resolve the paths of the files that
need to be installed. No need to depend on the .valid targets here
since automake already ensures that 'make all' is complete before 'make
install' is permitted to run.
Neutralise and deprecate the --uninstall option in the schema compiler
and remove it from gsettings.m4.
Make the new default behaviour a compromise between the old default
behaviour and the previous --uninstall option:
- never return a failure code if no schema files are found
- issue a warning instead
- remove the gschemas.compiled file if it exists
This checks for the .gschema.xml file in the srcdir and builddir and
runs the schema validation on which one it finds. This handles
non-srcdir builds in both cases: .gschema.xml is in the tarball and
.gschema.xml is generated.
If the .gschema.xml file was generated as the result of an implicit make
rule then make would 'rm' it after creating the validity stamp. This
would cause 'make install' to fail.
If --uninstall is given then don't give an error if the schema directory
is empty. Instead, erase the gschemas.compiled file, if it exists.
This is the right thing to do in the 'make uninstall' rule, where the
schema directory could very well be left empty as a result.
Modify gsettings.m4 to use this option.
Rename the --schema-files option to --schema-file, since it only
accepts one file at a time. Change the GSETTINGS_CHECK_RULE to
use it that way, too. And also make it work better with !srcdir
builds.
Bugs #616731 and #616864