resources: compiler: Add dependency generator

Bug #668532.
This commit is contained in:
Christian Persch
2012-01-23 20:42:20 +01:00
parent 45783c5927
commit 55d10d6bfd
3 changed files with 61 additions and 15 deletions

View File

@@ -74,6 +74,23 @@ Generate a header file for use with C code generated by <option>--generate-sourc
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--generate-dependencies</option></term>
<listitem><para>
Prints the list of files that the resource bundle references to standard output.
This can be used to track dependencies in the build system. For example, the following
make rule would mark <replaceable>test.gresource</replaceable> as depending on all the
files that <replaceable>test.gresource.xm</replaceable> includes, so that is is automatically
rebuilt if any of them change:
<literal>
test.gresource: test.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies test.gresource.xml)
</literal>
Note that this may or may not be portable to non-GNU <command>make</command>.
</para>
<para>For example i
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--c-name</option></term>
<listitem><para>