summaryrefslogtreecommitdiff
path: root/m4macros
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2010-11-04 15:23:22 -0400
committerDan Winship <danw@gnome.org>2010-11-04 17:21:09 -0400
commit393834ac6f32633a31e52441b051dc7d3969a530 (patch)
tree4a562cd26e274111fb44594e034f7d3ad733be0c /m4macros
parent094082841877b8b70a0d793ff091bb74793210b6 (diff)
downloadglib-393834ac6f32633a31e52441b051dc7d3969a530.tar.gz
glib-393834ac6f32633a31e52441b051dc7d3969a530.tar.bz2
glib-393834ac6f32633a31e52441b051dc7d3969a530.zip
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
Diffstat (limited to 'm4macros')
-rw-r--r--m4macros/gsettings.m48
1 files 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)