Add depfiles back to resource generation
authorMatthias Clasen <mclasen@redhat.com>
Mon, 4 Oct 2021 01:01:04 +0000 (21:01 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 4 Oct 2021 02:23:56 +0000 (22:23 -0400)
The recent change to faster resource generation
lost the depfiles to ensure that we regenerate
resources when any of the contents change.
Bring it back.

demos/gtk-demo/meson.build
demos/widget-factory/meson.build
gtk/meson.build

index cffe2503e2fc2461f9952563a5dad683d6a890b7..2248b60b19137983319700a19d600d87002f0357 100644 (file)
@@ -171,8 +171,11 @@ if build_machine.system() == 'linux' and objcopy.found() and objcopy_supports_ad
   gtkdemo_gresource = custom_target('gtkdemo.gresource',
       input : 'demo.gresource.xml',
       output : 'gtkdemo.gresource',
+      depfile : 'gtkdemo.gresource.d',
       command : [glib_compile_resources,
+                 '--generate',
                  '--target=@OUTPUT@',
+                 '--dependency-file=@DEPFILE@',
                  '--sourcedir=' + meson.current_source_dir(),
                  '--sourcedir=' + meson.current_build_dir(),
                  '@INPUT@'])
@@ -181,11 +184,13 @@ if build_machine.system() == 'linux' and objcopy.found() and objcopy_supports_ad
   gtkdemo_resources_c = custom_target('gtkdemo_resources.c',
       input : 'demo.gresource.xml',
       output : 'gtkdemo_resources.c',
+      depfile : 'gtkdemo_resources.c.d',
       command : [glib_compile_resources,
+                 '--generate-source',
                  '--target=@OUTPUT@',
+                 '--dependency-file=@DEPFILE@',
                  '--sourcedir=' + meson.current_source_dir(),
                  '--sourcedir=' + meson.current_build_dir(),
-                 '--generate-source',
                  '--external-data',
                  '--c-name', '_g_binary_gtkdemo',
                  '@INPUT@'])
index a7906fb83cdbf3abc2511c3cc870d4c9c803bdcb..01d9505ef7c89768fc49b5c124bbf6a984948db1 100644 (file)
@@ -15,8 +15,11 @@ if build_machine.system() == 'linux' and objcopy.found() and objcopy_supports_ad
   widgetfactory_gresource = custom_target('widgetfactory.gresource',
       input : 'widget-factory.gresource.xml',
       output : 'widgetfactory.gresource',
+      depfile: 'widgetfactory.gresource.d',
       command : [glib_compile_resources,
+                 '--generate',
                  '--target=@OUTPUT@',
+                 '--dependency-file=@DEPFILE@',
                  '--sourcedir=' + meson.current_source_dir(),
                  '--sourcedir=' + meson.current_build_dir(),
                  '@INPUT@'])
@@ -25,11 +28,13 @@ if build_machine.system() == 'linux' and objcopy.found() and objcopy_supports_ad
   widgetfactory_resources_c = custom_target('widgetfactory_resources.c',
       input : 'widget-factory.gresource.xml',
       output : 'widgetfactory_resources.c',
+      depfile: 'widgetfactory_resources.c.d',
       command : [glib_compile_resources,
+                 '--generate-source',
                  '--target=@OUTPUT@',
+                 '--dependency-file=@DEPFILE@',
                  '--sourcedir=' + meson.current_source_dir(),
                  '--sourcedir=' + meson.current_build_dir(),
-                 '--generate-source',
                  '--external-data',
                  '--c-name', '_g_binary_widgetfactory',
                  '@INPUT@'])
index 00b9f8a22b16dd9f1f4d96300a66a8a07509d208..e31b9e67ffca97e072441462e3f0d515974c341e 100644 (file)
@@ -880,8 +880,11 @@ if build_machine.system() == 'linux' and objcopy.found() and objcopy_supports_ad
       input : gtk_gresources_xml,
       depends : theme_deps,
       output : 'gtk.gresource',
+      depfile : 'gtk.gresource.d',
       command : [glib_compile_resources,
+                 '--generate',
                  '--target=@OUTPUT@',
+                 '--dependency-file=@DEPFILE@',
                  '--sourcedir=' + meson.current_source_dir(),
                  '--sourcedir=' + meson.current_build_dir(),
                  '@INPUT@'])
@@ -891,11 +894,13 @@ if build_machine.system() == 'linux' and objcopy.found() and objcopy_supports_ad
       input : gtk_gresources_xml,
       depends : theme_deps,
       output : 'gtkresources.c',
+      depfile : 'gtkresources.c.d',
       command : [glib_compile_resources,
+                 '--generate-source',
                  '--target=@OUTPUT@',
+                 '--dependency-file=@DEPFILE@',
                  '--sourcedir=' + meson.current_source_dir(),
                  '--sourcedir=' + meson.current_build_dir(),
-                 '--generate-source',
                  '--external-data',
                  '--c-name', '_gtk',
                  '--manual-register',
@@ -905,11 +910,13 @@ if build_machine.system() == 'linux' and objcopy.found() and objcopy_supports_ad
       input : gtk_gresources_xml,
       depends : theme_deps,
       output : 'gtkresources.h',
+      depfile : 'gtkresources.h.d',
       command : [glib_compile_resources,
+                 '--generate-header',
                  '--target=@OUTPUT@',
+                 '--dependency-file=@DEPFILE@',
                  '--sourcedir=' + meson.current_source_dir(),
                  '--sourcedir=' + meson.current_build_dir(),
-                 '--generate-header',
                  '--external-data',
                  '--c-name', '_gtk',
                  '--manual-register',