[glib] gsettings.m4: Fix rules to work when there are no schemas



commit 393834ac6f32633a31e52441b051dc7d3969a530
Author: Dan Winship <danw gnome org>
Date:   Thu Nov 4 15:23:22 2010 -0400

    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 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/m4macros/gsettings.m4 b/m4macros/gsettings.m4
index 4e4352f..f0ed838 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)



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