[build] Copy cogl-enum-types.h under the guard

We avoid rebuilding cogl-enum-types.h and cogl-enum-types.c by
using a "guard" -- a stamp file that will block Makefile. Since
we need cogl-enum-types.h into /clutter/cogl as well for the
cogl.h include to work, if we copy the cogl-enum-types.h
unconditionally it will cause a rebuild of the whole COGL; which
will cause a full rebuild.

To solve this, we can copy the header file when generating it
under the stamp file.
This commit is contained in:
Emmanuele Bassi 2009-05-29 14:27:55 +01:00
parent 1c8a6bc09b
commit 93a9613b59

View File

@ -35,13 +35,13 @@ cogl_public_h = \
noinst_LTLIBRARIES = libclutter-cogl-common.la noinst_LTLIBRARIES = libclutter-cogl-common.la
cogl-enum-types.h: stamp-cogl-enum-types.h cogl-enum-types.h: stamp-cogl-enum-types.h
$(QUIET_CP)cp -f $(@F) $(top_builddir)/clutter/cogl/cogl-enum-types.h @true
stamp-cogl-enum-types.h: $(cogl_public_h) Makefile stamp-cogl-enum-types.h: $(cogl_public_h) Makefile
$(QUIET_GEN)( $(GLIB_MKENUMS) \ $(QUIET_GEN)( $(GLIB_MKENUMS) \
--template $(srcdir)/cogl-enum-types.h.in \ --template $(srcdir)/cogl-enum-types.h.in \
$(cogl_public_h) ) > xgen-ceth \ $(cogl_public_h) ) > xgen-ceth \
&& (cmp -s xgen-ceth cogl-enum-types.h || cp -f xgen-ceth cogl-enum-types.h) \ && (cmp -s xgen-ceth cogl-enum-types.h || cp -f xgen-ceth cogl-enum-types.h) \
&& cp -f cogl-enum-types.h $(top_builddir)/clutter/cogl/cogl-enum-types.h \
&& rm -f xgen-ceth \ && rm -f xgen-ceth \
&& echo timestamp > $(@F) && echo timestamp > $(@F)