diff --git a/build/autotools/Makefile.am.enums b/build/autotools/Makefile.am.enums index c2c89e000..cbe4a1dad 100644 --- a/build/autotools/Makefile.am.enums +++ b/build/autotools/Makefile.am.enums @@ -15,17 +15,26 @@ # # Author: Emmanuele Bassi -enum_tmpl_h=$(glib_enum_h:.h=.h.in) -enum_tmpl_c=$(glib_enum_c:.c=.c.in) +# Basic sanity checks +$(if $(GLIB_MKENUMS),,$(error Need to define GLIB_MKENUMS)) + +$(if $(or $(glib_enum_h), \ + $(glib_enum_c)),, \ + $(error Need to define glib_enum_h and glib_enum_c)) + +$(if $(glib_enum_headers),,$(error Need to define glib_enum_headers)) + +enum_tmpl_h=$(addprefix $(srcdir)/, $(glib_enum_h:.h=.h.in)) +enum_tmpl_c=$(addprefix $(srcdir)/, $(glib_enum_c:.c=.c.in)) CLEANFILES += stamp-enum-types DISTCLEANFILES += $(glib_enum_h) $(glib_enum_c) BUILT_SOURCES += $(glib_enum_h) $(glib_enum_c) -EXTRA_DIST += $(srcdir)/$(enum_tmpl_h) $(srcdir)/$(enum_tmpl_c) +EXTRA_DIST += $(enum_tmpl_h) $(enum_tmpl_c) -stamp-enum-types: $(glib_enum_headers) $(srcdir)/$(enum_tmpl_h) - $(QUIET_GEN)$(GLIB_MKENUMS) \ - --template $(srcdir)/$(enum_tmpl_h) \ +stamp-enum-types: $(glib_enum_headers) $(enum_tmpl_h) + $(AM_V_GEN)$(GLIB_MKENUMS) \ + --template $(enum_tmpl_h) \ $(glib_enum_headers) > xgen-eh \ && (cmp -s xgen-eh $(glib_enum_h) || cp -f xgen-eh $(glib_enum_h)) \ && rm -f xgen-eh \ @@ -34,10 +43,9 @@ stamp-enum-types: $(glib_enum_headers) $(srcdir)/$(enum_tmpl_h) $(glib_enum_h): stamp-enum-types @true -$(glib_enum_c): $(glib_enum_headers) $(glib_enum_h) $(srcdir)/$(enum_tmpl_c) +$(glib_enum_c): $(glib_enum_headers) $(glib_enum_h) $(enum_tmpl_c) $(QUIET_GEN)$(GLIB_MKENUMS) \ - --template $(srcdir)/$(enum_tmpl_c) \ + --template $(enum_tmpl_c) \ $(glib_enum_headers) > xgen-ec \ && cp -f xgen-ec $(glib_enum_c) \ && rm -f xgen-ec - diff --git a/build/autotools/Makefile.am.marshal b/build/autotools/Makefile.am.marshal index cab117d8b..89d3222eb 100644 --- a/build/autotools/Makefile.am.marshal +++ b/build/autotools/Makefile.am.marshal @@ -14,19 +14,27 @@ # # Author: Emmanuele Bassi +# Basic sanity checks +$(if $(GLIB_GENMARSHAL),,$(error Need to define GLIB_GENMARSHAL)) + +$(if $(or $(glib_marshal_list), \ + $(glib_marshal_prefix)),, \ + $(error Need to define glib_marshal_list and glib_marshal_prefix)) + marshal_h = $(glib_marshal_list:.list=.h) marshal_c = $(glib_marshal_list:.list=.c) +marshal_list = $(addprefix $(srcdir)/, $(glib_marshal_list)) CLEANFILES += stamp-marshal DISTCLEANFILES += $(marshal_h) $(marshal_c) BUILT_SOURCES += $(marshal_h) $(marshal_c) -EXTRA_DIST += $(srcdir)/$(glib_marshal_list) +EXTRA_DIST += $(marshal_list) -stamp-marshal: $(glib_marshal_list) - $(QUIET_GEN)$(GLIB_GENMARSHAL) \ +stamp-marshal: $(marshal_list) + $(AM_V_GEN)$(GLIB_GENMARSHAL) \ --prefix=$(glib_marshal_prefix) \ --header \ - $(srcdir)/$(glib_marshal_list) > xgen-mh \ + $(marshal_list) > xgen-mh \ && (cmp -s xgen-mh $(marshal_h) || cp -f xgen-mh $(marshal_h)) \ && rm -f xgen-mh \ && echo timestamp > $(@F) @@ -35,11 +43,10 @@ $(marshal_h): stamp-marshal @true $(marshal_c): $(marshal_h) - $(QUIET_GEN)(echo "#include \"$(marshal_h)\"" ; \ + $(AM_V_GEN)(echo "#include \"$(marshal_h)\"" ; \ $(GLIB_GENMARSHAL) \ --prefix=$(glib_marshal_prefix) \ --body \ - $(srcdir)/$(glib_marshal_list)) > xgen-mc \ + $(marshal_list)) > xgen-mc \ && cp xgen-mc $(marshal_c) \ && rm -f xgen-mc -