$(COGL_DRIVER)/cogl-defines.h is generated in the configure script so
it ends up in the build directory. Therefore the build rule for
cogl/cogl-defines.h should depend on the file in $(builddir) not
$(srcdir).
-I$(top_builddir)/clutter/cogl \
$(NULL)
-cogl-defines.h: $(srcdir)/driver/gl/cogl-defines.h $(srcdir)/driver/gles/cogl-defines.h
- $(QUIET_GEN)cp -f $(srcdir)/driver/$(COGL_DRIVER)/cogl-defines.h $(@F)
+cogl-defines.h: $(top_builddir)/clutter/cogl/cogl/driver/gl/cogl-defines.h $(top_builddir)/clutter/cogl/cogl/driver/gles/cogl-defines.h
+ $(QUIET_GEN)cp -f $(top_builddir)/clutter/cogl/cogl/driver/$(COGL_DRIVER)/cogl-defines.h $(@F)
BUILT_SOURCES += cogl-defines.h
DISTCLEANFILES += cogl-defines.h