Blob Blame History Raw
From e80109ca1ff408af1938508570d9168a6904cd33 Mon Sep 17 00:00:00 2001
From: XScreenSaver owners <xscreensaver-owner@fedoraproject.org>
Date: Fri, 4 Nov 2022 16:28:51 +0900
Subject: [PATCH] driver/Makefile.in: fix GLIB_COMPILE_RESOURCES source
 reference
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Fix the following error:
```
$ make
make[1]: Entering directory '/builddir/xscreensaver-6.05/x86_64-pc-linux-gnu/driver'
/usr/bin/glib-compile-resources gresource.xml --target=demo-Gtk-resources.c --sourcedir=../../driver --sourcedir=../../driver/../utils/images --generate-source
Failed to open file “gresource.xml”: No such file or directory
make[1]: *** [Makefile:864: demo-Gtk-resources.c] Error 1
make[1]: Leaving directory '/builddir/xscreensaver-6.05/x86_64-pc-linux-gnu/driver'
```

`--sourcedir=DIR` option maybe a bit confusing. "man glib-compile-resources" says
the files referenced *in* FILE are loaded from this directory, i.e. the contents in
FILE is written so that the additional file should be loaded from this directory,
so it seems to be saying that the FILE itself is not searched from the directory.
---
 driver/Makefile.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/driver/Makefile.in b/driver/Makefile.in
index c25494a..f46db37 100644
--- a/driver/Makefile.in
+++ b/driver/Makefile.in
@@ -861,7 +861,7 @@ demo-Gtk-conf.o: demo-Gtk-conf.c
 
 GCRARGS = --sourcedir=$(srcdir) --sourcedir=$(ICON_SRC) --generate-source
 demo-Gtk-resources.c: gresource.xml demo.ui prefs.ui
-	$(GLIB_COMPILE_RESOURCES) gresource.xml --target=$@ $(GCRARGS)
+	$(GLIB_COMPILE_RESOURCES) $(srcdir)/gresource.xml --target=$@ $(GCRARGS)
 
 GTK_WARNINGS = -Wno-long-long -Wno-c99-extensions -Wno-pedantic
 demo-Gtk-resources.o: demo-Gtk-resources.c
-- 
2.38.1