glib-compile-resources: generate .d-file style dependency output for build tools
commite8c8395f0e72f59e37189e94b08052bebb51ac77
authorTim-Philipp Müller <tim@centricular.com>
Tue, 26 Jan 2016 19:21:57 +0000 (26 19:21 +0000)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 20 Aug 2016 14:52:46 +0000 (20 10:52 -0400)
tree805f3208c8e73edb770d4d91237e5a1dad368690
parent951e26fb177bf1f9e4fec48dc0327654c02528ba
glib-compile-resources: generate .d-file style dependency output for build tools

Add --dependency-file=foo.d option to generate a gcc -M -MF style
dependency file for other build tools. The current output of
--generate-dependencies is only useful for use directly in Makefile
rules, but can't be used in other build systems like that.

The generated dependency file looks like this:
$ glib-compile-resources --sourcedir= test.gresource.xml --dependency-file=-
test.gresource.xml: test1.txt test2.txt test2.txt

test1.txt:

test2.txt:

test2.txt:

Unlike --generate-dependencies, the --dependency-file option can be
used together with other --generate options to create dependencies
as side-effect of generating sources.

Based on a patch by Tim-Philipp Müller.

https://bugzilla.gnome.org/show_bug.cgi?id=745754
docs/reference/gio/glib-compile-resources.xml
gio/glib-compile-resources.c