From d7e5e9247bd5af2267a52087b74bbf4d2e17974f Mon Sep 17 00:00:00 2001 From: Damien Lespiau Date: Tue, 7 Sep 2010 14:17:18 +0100 Subject: [PATCH] build: Make the generated glib-mkenums c file depend on the headers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit What happens now if you rename an enum inside a header: • glib-mkenums generates the header file • a comparison is made with the previous version of the heade is made and no difference is found as you don't remove or create enums • the compilation of the generated mkenums c file fails because it has not been regenerated with the new, renamed, enum. That's why the generated clutter-enum-types.c needs to depend on the headers too. Of course such scenario should not happen in stable releases as enums are part of the API, but renaming enums happens in the development cycle and create compilation errors (very annoying when doing git bissects for instance). --- build/autotools/Makefile.am.enums | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/autotools/Makefile.am.enums b/build/autotools/Makefile.am.enums index 0f347320f..c2c89e000 100644 --- a/build/autotools/Makefile.am.enums +++ b/build/autotools/Makefile.am.enums @@ -34,7 +34,7 @@ stamp-enum-types: $(glib_enum_headers) $(srcdir)/$(enum_tmpl_h) $(glib_enum_h): stamp-enum-types @true -$(glib_enum_c): $(glib_enum_h) $(srcdir)/$(enum_tmpl_c) +$(glib_enum_c): $(glib_enum_headers) $(glib_enum_h) $(srcdir)/$(enum_tmpl_c) $(QUIET_GEN)$(GLIB_MKENUMS) \ --template $(srcdir)/$(enum_tmpl_c) \ $(glib_enum_headers) > xgen-ec \