From 393834ac6f32633a31e52441b051dc7d3969a530 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Thu, 4 Nov 2010 15:23:22 -0400 Subject: [PATCH] gsettings.m4: Fix rules to work when there are no schemas 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 --- m4macros/gsettings.m4 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/m4macros/gsettings.m4 b/m4macros/gsettings.m4 index 4e4352fa9..f0ed838fe 100644 --- a/m4macros/gsettings.m4 +++ b/m4macros/gsettings.m4 @@ -47,9 +47,11 @@ install-data-am: install-gsettings-schemas install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file) @$(NORMAL_INSTALL) - test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)" - $(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)" - test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir) + if test -n "$^"; then \ + test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"; \ + $(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"; \ + test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); \ + fi uninstall-gsettings-schemas: @$(NORMAL_UNINSTALL)