GNOME Bugzilla – Bug 660498
Generated test code fails when the codegen changes
Last modified: 2011-10-05 16:43:32 UTC
Generated test code doesn't get regenerated when the code generator changes, causing build failures if you don't manually clean the tree before. From an IRC conversation with David: <davidz> Makefile.am should probably depend on the codegen target - can you check if it already does it? <davidz> http://git.gnome.org/browse/glib/tree/gio/tests/Makefile.am#n269 <davidz> apparently it doesn't <davidz> it should also depend on Makefile.am itself <davidz> because the contents of the generated code may change if params passed to the codegen does <davidz> which is actually what happened in this case <cosimoc> okay <davidz> given that I changed Foo to Foo_iGen
Created attachment 198354 [details] [review] Patch This patch does the trick for me - we regenerate either when one of the source files in gdbus-codegen(1) changes or when Makefile.am changes.
Review of attachment 198354 [details] [review]: ::: gio/tests/Makefile.am @@ +269,2 @@ if OS_UNIX +gdbus-test-codegen-generated.h gdbus-test-codegen-generated.c : test-codegen.xml Makefile.am $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen Should depend on Makefile, not Makefile.am. ::: gio/tests/gdbus-object-manager-example/Makefile.am @@ +22,3 @@ $(NULL) +$(GDBUS_GENERATED) : gdbus-example-objectmanager.xml Makefile.am $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen Ditto here.
Thanks - committed to glib-2-30: http://git.gnome.org/browse/glib/commit/?h=glib-2-30&id=dd3e97688e6f2de2ec19ced6a1db559efef54c62 master: http://git.gnome.org/browse/glib/commit/?id=f34908ef1555c8c579b0154e17932b84af04b81f