gdk: Fix some weirdness around generated sources

This commit is contained in:
Simon McVittie
2019-07-17 13:59:58 +01:00
parent 7491e451ce
commit ee823d0a54
6 changed files with 104 additions and 9 deletions

View File

@ -19,10 +19,10 @@ Forwarded: yes
1 file changed, 7 insertions(+), 10 deletions(-)
diff --git a/gdk/Makefile.am b/gdk/Makefile.am
index 689ee52..da2ba33 100644
index 6373e26..1b11d72 100644
--- a/gdk/Makefile.am
+++ b/gdk/Makefile.am
@@ -179,8 +179,8 @@ gdk_c_sources = \
@@ -184,8 +184,8 @@ gdk_c_sources = \
gdkwindowimpl.c
gdk_built_sources = \
@ -33,7 +33,7 @@ index 689ee52..da2ba33 100644
gdkmarshalers.h \
gdkmarshalers.c \
gdkresources.h \
@@ -412,7 +412,7 @@ endif
@@ -417,7 +417,7 @@ endif
lib_LTLIBRARIES = libgdk-3.la
@ -42,7 +42,7 @@ index 689ee52..da2ba33 100644
EXTRA_DIST += \
$(gdk_built_sources) \
fallback-c89.c
@@ -426,18 +426,15 @@ BUILT_SOURCES = \
@@ -431,18 +431,15 @@ BUILT_SOURCES = \
$(gdk_built_sources) \
gdkconfig.h

View File

@ -11,10 +11,10 @@ Forwarded: no
1 file changed, 4 insertions(+)
diff --git a/testsuite/gtk/defaultvalue.c b/testsuite/gtk/defaultvalue.c
index 0cb3073..74a51ff 100644
index a82788b..65290ba 100644
--- a/testsuite/gtk/defaultvalue.c
+++ b/testsuite/gtk/defaultvalue.c
@@ -488,6 +488,10 @@ main (int argc, char **argv)
@@ -489,6 +489,10 @@ main (int argc, char **argv)
if (otypes[i] == GTK_TYPE_FILE_CHOOSER_NATIVE)
continue;

View File

@ -0,0 +1,60 @@
From: Simon McVittie <smcv@debian.org>
Date: Wed, 17 Jul 2019 13:54:41 +0100
Subject: gdk: Don't distribute generated files in tarballs
gdkversionmacros.h is generated by configure, so it should be in
DISTCLEANFILES. The rest of $(gdk_built_sources) are built at compile
time by GLib tools, so in principle they should be in CLEANFILES, but
DISTCLEANFILES is close enough.
Signed-off-by: Simon McVittie <smcv@debian.org>
---
gdk/Makefile.am | 21 +++------------------
1 file changed, 3 insertions(+), 18 deletions(-)
diff --git a/gdk/Makefile.am b/gdk/Makefile.am
index 525c5a0..64e5b17 100644
--- a/gdk/Makefile.am
+++ b/gdk/Makefile.am
@@ -203,16 +203,8 @@ nodist_gdkinclude_HEADERS = gdkconfig.h gdkenumtypes.h gdkversionmacros.h
deprecatedincludedir = $(includedir)/gtk-3.0/gdk/deprecated
deprecatedinclude_HEADERS = $(deprecated_h_sources)
-common_sources = \
- $(gdk_private_headers) \
- $(gdk_c_sources) \
- gdkenumtypes.c \
- gdkmarshalers.c \
- gdkmarshalers.h \
- gdkresources.h \
- gdkresources.c
-
-libgdk_3_la_SOURCES = $(common_sources)
+libgdk_3_la_SOURCES = $(gdk_private_headers) $(gdk_c_sources)
+nodist_libgdk_3_la_SOURCES = $(gdk_built_sources)
libgdk_3_la_CFLAGS = $(AM_CFLAGS) $(GDK_HIDDEN_VISIBILITY_CFLAGS)
libgdk_3_la_LIBADD = $(GDK_DEP_LIBS) $(SHM_LIBS)
libgdk_3_la_LDFLAGS = $(LDADD)
@@ -417,7 +409,7 @@ endif
lib_LTLIBRARIES = libgdk-3.la
-MAINTAINERCLEANFILES = $(gdk_built_sources)
+DISTCLEANFILES = $(gdk_built_sources)
EXTRA_DIST += \
$(gdk_built_sources) \
fallback-c89.c
@@ -562,13 +554,6 @@ install-data-local: install-ms-lib install-def-file
uninstall-local: uninstall-ms-lib uninstall-def-file
rm -f $(DESTDIR)$(configexecincludedir)/gdkconfig.h
-# if srcdir!=builddir, clean out maintainer-clean files from builddir
-# this allows dist to pass.
-distclean-local:
- if test $(srcdir) != .; then \
- rm -f $(MAINTAINERCLEANFILES); \
- fi
-
.PHONY: files
files:

View File

@ -0,0 +1,33 @@
From: Simon McVittie <smcv@debian.org>
Date: Wed, 17 Jul 2019 13:48:50 +0100
Subject: gdk: Generate gdkenumtypes.[ch] in the $(builddir)
Signed-off-by: Simon McVittie <smcv@debian.org>
---
gdk/Makefile.am | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/gdk/Makefile.am b/gdk/Makefile.am
index 1b11d72..525c5a0 100644
--- a/gdk/Makefile.am
+++ b/gdk/Makefile.am
@@ -184,8 +184,8 @@ gdk_c_sources = \
gdkwindowimpl.c
gdk_built_sources = \
- $(srcdir)/gdkenumtypes.h \
- $(srcdir)/gdkenumtypes.c \
+ gdkenumtypes.h \
+ gdkenumtypes.c \
gdkmarshalers.h \
gdkmarshalers.c \
gdkresources.h \
@@ -434,7 +434,7 @@ BUILT_SOURCES = \
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 $(srcdir)/gdkenumtypes.h ) \
+ && (cmp -s xgen-geth gdkenumtypes.h || cp xgen-geth 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 \

View File

@ -8,10 +8,10 @@ Forwarded: no
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/testsuite/reftests/gtk-reftest.c b/testsuite/reftests/gtk-reftest.c
index 4930af8..69f906c 100644
index 6400b26..22d06c1 100644
--- a/testsuite/reftests/gtk-reftest.c
+++ b/testsuite/reftests/gtk-reftest.c
@@ -253,6 +253,20 @@ save_image (cairo_surface_t *surface,
@@ -257,6 +257,20 @@ save_image (cairo_surface_t *surface,
g_free (filename);
}
@ -32,7 +32,7 @@ index 4930af8..69f906c 100644
static void
test_ui_file (GFile *file)
{
@@ -285,7 +299,13 @@ test_ui_file (GFile *file)
@@ -289,7 +303,13 @@ test_ui_file (GFile *file)
if (diff_image)
{
save_image (diff_image, ui_file, ".diff.png");

View File

@ -6,3 +6,5 @@
reftest-known-fail.patch
Don-t-test-default-constructed-GdkPixbuf-properties.patch
Revert-Update-some-a11y-test-results.patch
gdk-Generate-gdkenumtypes.-ch-in-the-builddir.patch
gdk-Don-t-distribute-generated-files-in-tarballs.patch