After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 633381 - gsettings Makefile rules should handle empty list of settings
gsettings Makefile rules should handle empty list of settings
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gsettings
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Allison Karlitskaya (desrt)
gtkdev
: 639249 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2010-10-28 17:43 UTC by Owen Taylor
Modified: 2011-01-17 13:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gsettings.m4: Fix rules to work when there are no schemas (1.47 KB, patch)
2010-11-04 19:25 UTC, Dan Winship
committed Details | Review

Description Owen Taylor 2010-10-28 17:43:03 UTC
Snippet from gnome-bluetooth/sendto/Makefile.am

===
if HAVE_NST
plugindir = $(libdir)/nautilus-sendto/plugins

plugin_LTLIBRARIES = libnstbluetooth.la

libnstbluetooth_la_SOURCES = nautilus-sendto-plugin.c
libnstbluetooth_la_LDFLAGS = -module -avoid-version
libnstbluetooth_la_LIBADD = $(BLUETOOTH_LIBS) ../lib/libgnome-bluetooth.la

convertdir=$(datadir)/GConf/gsettings
convert_DATA=gnome-bluetooth-nst

gsettingsschema_in_files = org.gnome.Bluetooth.nst.gschema.xml.in
gsettings_SCHEMAS = $(gsettingsschema_in_files:.xml.in=.xml)
@INTLTOOL_XML_NOMERGE_RULE@
@GSETTINGS_RULES@

endif
===

If HAVE_NST isn't defined, dies with:

/usr/bin/install -c -m 644  "/home/otaylor/gnome-shell/install/share/glib-2.0/schemas"
/usr/bin/install: missing destination file operand after `/home/otaylor/gnome-shell/install/share/glib-2.0/schemas'
Comment 1 Owen Taylor 2010-10-28 17:47:06 UTC
(Yes, it's dubious to have the @INTLTOOL@ and @GSETTINGS@ substitutions inside the conditionals, since Automake will just comment out the first line and leave the rest, I think, but refactoring things to moving the @GSETTINGS@ conditional out doesn't help)
Comment 2 Dan Winship 2010-11-04 19:25:06 UTC
Created attachment 173843 [details] [review]
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.)
Comment 3 Allison Karlitskaya (desrt) 2010-11-04 21:14:33 UTC
Review of attachment 173843 [details] [review]:

looks right, thanks.

assuming you've tested the two obvious cases, please commit.
Comment 4 Dan Winship 2010-11-04 21:21:15 UTC
Attachment 173843 [details] pushed as 393834a - gsettings.m4: Fix rules to work when there are no schemas
Comment 5 Bastien Nocera 2011-01-17 13:11:45 UTC
*** Bug 639249 has been marked as a duplicate of this bug. ***