• Use addprefix instead of manually concatenating $(srcdir)
• Use AM_V_GEN instead of QUIET_GEN, to avoid inter-dependencies
• Do basic checks on GLIB_MKENUMS and GLIB_GENMARSHAL being defined
• Do checks on the required variables being defined
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).
With this, if one changes the underlying template files, we run
glib-mkenums again to generate updated glib_enum_[ch] files.
Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
for the marshal files $(srcdir) was getting prefixed twice since my last
commit (2cc88f1140) since it was already being prefixed including
Makefile.am. The problem with prefixing it in the includer file though is
that the Make variable substitutions like :.list=.h mean we end up
generating into the $(srcdir). This removes the prefix added in
clutter/Makefile.am
We were also missing a $(srcdir) prefix when setting EXTRA_DIST
Out of tree builds were broken in commit 46b736f42e since we didn't
explicitly use $(srcdir) to find the input files for glib-mkenums and
glib-genmarshal.
The rules to create signal marshallers and enumeration GTypes are
usually copied and pasted all over different projects, though they
are pretty generic and, given a little bit of parametrization, can
be put in separate Makefile.am files and included whenever needed.