[Spice-devel] [PATCH spice-gtk 2/2] gtk/Makefile.am: Better explicit deps fro autogenerated files

Marc-André Lureau mlureau at redhat.com
Fri Sep 23 03:56:09 PDT 2011


ACK

----- Original Message -----
> Auto-generated files need explicit deps on them to ensure things
> are build in the right order when doing things like make -j200:
> 1) We had an explicit deps on spice-marshal.h, but only for
> spice-channel.c,
>    but others need it to
> 2) autogen.c files need autogen.h, note this is done in a separate
> make
>    statement, since the deps of the actual build rule are used during
>    the
>    generation!
> 3) Group all the autogen explicit deps together
> 
> Signed-off-by: Hans de Goede <hdegoede at redhat.com>
> ---
>  gtk/Makefile.am |   20 +++++++++++---------
>  1 files changed, 11 insertions(+), 9 deletions(-)
> 
> diff --git a/gtk/Makefile.am b/gtk/Makefile.am
> index c21af16..40fd327 100644
> --- a/gtk/Makefile.am
> +++ b/gtk/Makefile.am
> @@ -381,7 +381,17 @@ spicy_stats_LDADD =				\
>  
>  
>  
> -spice-channel.c: spice-marshal.h
> +$(libspice_client_glib_2_0_la_SOURCES): spice-glib-enums.h
> spice-marshal.h
> +
> +if HAVE_GTK_2
> +$(libspice_client_gtk_2_0_la_SOURCES): spice-glib-enums.h
> spice-widget-enums.h
> +else
> +$(libspice_client_gtk_3_0_la_SOURCES): spice-glib-enums.h
> spice-widget-enums.h
> +endif
> +
> +spice-marshal.c: spice-marshal.h
> +spice-glib-enums.c: spice-glib-enums.h
> +spice-widget-enums.c: spice-widget-enums.h
>  
>  spice-marshal.c: spice-marshal.txt
>  	$(AM_V_GEN)echo "#include \"spice-marshal.h\"" > $@ && \
> @@ -390,8 +400,6 @@ spice-marshal.c: spice-marshal.txt
>  spice-marshal.h: spice-marshal.txt
>  	$(AM_V_GEN)glib-genmarshal --header $< > $@ || (rm -f $@ && exit 1)
>  
> -$(libspice_client_glib_2_0_la_SOURCES): spice-glib-enums.h
> -
>  spice-glib-enums.c: spice-channel.h channel-inputs.h spice-session.h
>  	$(AM_V_GEN)glib-mkenums --fhead "#include <glib-object.h>\n" \
>  			--fhead "#include \"spice-glib-enums.h\"\n\n" \
> @@ -418,12 +426,6 @@ spice-glib-enums.h: spice-channel.h
> channel-inputs.h spice-session.h
>  			--eprod "GType @enum_name at _get_type (void);\n" \
>  		$^ >  $@
>  
> -if HAVE_GTK_2
> -$(libspice_client_gtk_2_0_la_SOURCES): spice-glib-enums.h
> spice-widget-enums.h
> -else
> -$(libspice_client_gtk_3_0_la_SOURCES): spice-glib-enums.h
> spice-widget-enums.h
> -endif
> -
>  spice-widget-enums.c: spice-widget.h
>  	$(AM_V_GEN)glib-mkenums --fhead "#include <glib-object.h>\n" \
>  			--fhead "#include \"spice-widget-enums.h\"\n\n" \
> --
> 1.7.6.2
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
> 


More information about the Spice-devel mailing list