Consistently treat gdkenumtypes.[hc] as source files
authorMartin Pitt <martin.pitt@ubuntu.com>
Thu, 8 Sep 2011 07:14:02 +0000 (09:14 +0200)
committerJeremy Bicha <jbicha@ubuntu.com>
Tue, 29 Aug 2017 00:39:28 +0000 (01:39 +0100)
Always generate gdk/gdkenumtypes.c in the source tree, and fix path in the
introspection sources. With this, gdkenumtypes.c is correctly included with
separate build trees, too. This fixes missing GTypes in the .gir when using a
separate build tree.

Also remove the gdk/stamp-gdkenumtypes.h target. It was forcing the
regeneration of gdk/gdkenumtypes.h even if it was already present and current
in the source tree.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=647729
Bug-Ubuntu: https://launchpad.net/bugs/769256

Gbp-Pq: Name 018_gdkenumtypes.c_location.patch

gdk/Makefile.am

index 573b1974ae298b639dacabb9cef159afd6596fe2..4b41650a66dd27d04145445c165eab1da55ec5cc 100644 (file)
@@ -243,8 +243,8 @@ if HAVE_INTROSPECTION
 introspection_files =          \
        $(filter-out gdkkeysyms-compat.h, $(gdk_h_sources))     \
        $(gdk_c_sources)        \
-        gdkenumtypes.c         \
-        gdkenumtypes.h
+        $(srcdir)/gdkenumtypes.c       \
+        $(srcdir)/gdkenumtypes.h
 
 Gdk-3.0.gir: libgdk-3.la Makefile
 Gdk_3_0_gir_SCANNERFLAGS =     \
@@ -408,7 +408,7 @@ endif
 
 lib_LTLIBRARIES = libgdk-3.la
 
-MAINTAINERCLEANFILES = $(gdk_built_sources) stamp-gdkenumtypes.h
+MAINTAINERCLEANFILES = $(gdk_built_sources)
 EXTRA_DIST += \
        $(gdk_built_sources)    \
        fallback-c89.c
@@ -422,18 +422,15 @@ BUILT_SOURCES = \
        $(gdk_built_sources)                    \
        gdkconfig.h
 
-gdkenumtypes.h: stamp-gdkenumtypes.h
-       @true
-stamp-gdkenumtypes.h: $(gdk_h_sources) gdkenumtypes.h.template
+gdkenumtypes.h: $(gdk_public_h_sources) $(srcdir)/gdkenumtypes.h.template
        $(AM_V_GEN) ( cd $(srcdir) && $(GLIB_MKENUMS) --template gdkenumtypes.h.template \
                $(gdk_h_sources) ) >> xgen-geth \
-       && (cmp -s xgen-geth gdkenumtypes.h || cp xgen-geth gdkenumtypes.h ) \
-       && rm -f xgen-geth \
-       && echo timestamp > $(@F)
+       && (cmp -s xgen-geth gdkenumtypes.h || cp xgen-geth $(srcdir)/gdkenumtypes.h ) \
+       && rm -f xgen-geth 
 gdkenumtypes.c: $(gdk_h_sources) gdkenumtypes.c.template
        $(AM_V_GEN) ( cd $(srcdir) && $(GLIB_MKENUMS) --template gdkenumtypes.c.template \
                $(gdk_h_sources) ) > xgen-getc \
-       && cp xgen-getc gdkenumtypes.c  \
+       && cp xgen-getc $(srcdir)/gdkenumtypes.c  \
        && rm -f xgen-getc
 
 #