gtk3/debian/patches/demos-examples-tests-Don-t-distribute-built-files.patch
2020-08-12 11:14:16 +01:00

370 lines
12 KiB
Diff

From: Simon McVittie <smcv@debian.org>
Date: Thu, 18 Jul 2019 09:56:06 +0100
Subject: demos, examples, tests: Don't distribute built files
Signed-off-by: Simon McVittie <smcv@debian.org>
Forwarded: https://gitlab.gnome.org/GNOME/gtk/merge_requests/1001
Bug: https://gitlab.gnome.org/GNOME/gtk/issues/357
---
demos/gtk-demo/Makefile.am | 14 +++++++++-----
demos/icon-browser/Makefile.am | 9 +++++----
demos/widget-factory/Makefile.am | 9 ++++-----
examples/application10/Makefile.am | 4 +++-
examples/application2/Makefile.am | 7 +++++--
examples/application3/Makefile.am | 7 +++++--
examples/application4/Makefile.am | 7 +++++--
examples/application5/Makefile.am | 4 +++-
examples/application6/Makefile.am | 4 +++-
examples/application7/Makefile.am | 4 +++-
examples/application8/Makefile.am | 4 +++-
examples/application9/Makefile.am | 4 +++-
testsuite/css/style/Makefile.am | 5 ++++-
testsuite/gtk/Makefile.am | 4 +++-
14 files changed, 58 insertions(+), 28 deletions(-)
diff --git a/demos/gtk-demo/Makefile.am b/demos/gtk-demo/Makefile.am
index 4a2f827..c303551 100644
--- a/demos/gtk-demo/Makefile.am
+++ b/demos/gtk-demo/Makefile.am
@@ -133,13 +133,14 @@ demos.h: $(demos) geninclude.pl
demos.h.win32: $(demos_base) geninclude.pl
$(AM_V_GEN) (here=`pwd` ; cd $(srcdir) && $(PERL) $$here/geninclude.pl $(demos_base)) > demos.h.win32
-nodist_gtk3_demo_SOURCES = demos.h
+nodist_gtk3_demo_SOURCES = \
+ demos.h \
+ demo_resources.c
gtk3_demo_SOURCES = \
$(demos) \
gtkfishbowl.c \
gtkfishbowl.h \
- demo_resources.c \
main.c
gtk3_demo_DEPENDENCIES = $(DEPS)
@@ -147,9 +148,12 @@ gtk3_demo_LDADD = $(LDADDS)
gtk3_demo_LDFLAGS = -export-dynamic
gtk3_demo_application_SOURCES = \
- application.c \
+ application.c
+nodist_gtk3_demo_application_SOURCES = \
demo_resources.c
+CLEANFILES = $(BUILT_SOURCES)
+
gtk3_demo_application_LDADD = $(LDADDS)
resource_files = $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/demo.gresource.xml)
@@ -190,10 +194,10 @@ uninstall-update-icon-cache:
# ------------------- MSVC Build Items ----------------
MSVCPROJS = gtk3-demo gtk3-demo-application
-gtk3_demo_FILES = $(gtk3_demo_SOURCES)
+gtk3_demo_FILES = $(gtk3_demo_SOURCES) $(nodist_gtk3_demo_SOURCES)
gtk3_demo_EXCLUDES = font_features.c|pagesetup.c
-gtk3_demo_application_FILES = $(gtk3_demo_application_SOURCES)
+gtk3_demo_application_FILES = $(gtk3_demo_application_SOURCES) $(nodist_gtk3_demo_application_SOURCES)
gtk3_demo_application_EXCLUDES = dummy
include $(top_srcdir)/win32/Makefile.msvcproj
diff --git a/demos/icon-browser/Makefile.am b/demos/icon-browser/Makefile.am
index bf8425c..b168bbb 100644
--- a/demos/icon-browser/Makefile.am
+++ b/demos/icon-browser/Makefile.am
@@ -20,11 +20,12 @@ gtk3_icon_browser_SOURCES = \
main.c \
iconbrowserapp.c iconbrowserapp.h \
iconbrowserwin.c iconbrowserwin.h \
- iconstore.c iconstore.h \
+ iconstore.c iconstore.h
+nodist_gtk3_icon_browser_SOURCES = \
resources.c
-BUILT_SOURCES = \
- resources.c
+BUILT_SOURCES = $(nodist_gtk3_icon_browser_SOURCES)
+CLEANFILES = $(BUILT_SOURCES)
resources.c: iconbrowser.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/iconbrowser.gresource.xml)
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $(srcdir)/iconbrowser.gresource.xml \
@@ -40,7 +41,7 @@ EXTRA_DIST = \
# ------------------- MSVC Build Items ----------------
MSVCPROJS = gtk3-icon-browser
-gtk3_icon_browser_FILES = $(gtk3_icon_browser_SOURCES)
+gtk3_icon_browser_FILES = $(gtk3_icon_browser_SOURCES) $(nodist_gtk3_icon_browser_SOURCES)
gtk3_icon_browser_EXCLUDES = dummy
include $(top_srcdir)/win32/Makefile.msvcproj
diff --git a/demos/widget-factory/Makefile.am b/demos/widget-factory/Makefile.am
index c33a6d0..a0d6239 100644
--- a/demos/widget-factory/Makefile.am
+++ b/demos/widget-factory/Makefile.am
@@ -5,12 +5,11 @@ bin_PROGRAMS = gtk3-widget-factory
desktopdir = $(datadir)/applications
dist_desktop_DATA = gtk3-widget-factory.desktop
-gtk3_widget_factory_SOURCES = \
- widget-factory.c \
- widget_factory_resources.c
+gtk3_widget_factory_SOURCES = widget-factory.c
+nodist_gtk3_widget_factory_SOURCES = widget_factory_resources.c
-BUILT_SOURCES = \
- widget_factory_resources.c
+BUILT_SOURCES = $(nodist_gtk3_widget_factory_SOURCES)
+CLEANFILES = $(nodist_gtk3_widget_factory_SOURCES)
gtk3_widget_factory_DEPENDENCIES = \
$(top_builddir)/gtk/libgtk-3.la
diff --git a/examples/application10/Makefile.am b/examples/application10/Makefile.am
index c5bda45..355c2c0 100644
--- a/examples/application10/Makefile.am
+++ b/examples/application10/Makefile.am
@@ -16,7 +16,8 @@ exampleapp_SOURCES = \
main.c \
exampleapp.c exampleapp.h \
exampleappwin.c exampleappwin.h \
- exampleappprefs.c exampleappprefs.h \
+ exampleappprefs.c exampleappprefs.h
+nodist_exampleapp_SOURCES = \
resources.c
BUILT_SOURCES = \
@@ -45,6 +46,7 @@ EXTRA_DIST = \
meson.build
CLEANFILES = \
+ $(nodist_exampleapp_SOURCES) \
gschemas.compiled
-include $(top_srcdir)/git.mk
diff --git a/examples/application2/Makefile.am b/examples/application2/Makefile.am
index 8fc0478..964e249 100644
--- a/examples/application2/Makefile.am
+++ b/examples/application2/Makefile.am
@@ -15,10 +15,11 @@ exampleapp_LDADD = $(GTK_LIBS)
exampleapp_SOURCES = \
main.c \
exampleapp.c exampleapp.h \
- exampleappwin.c exampleappwin.h \
+ exampleappwin.c exampleappwin.h
+nodist_exampleapp_SOURCES = \
resources.c
-BUILT_SOURCES = resources.c
+BUILT_SOURCES = $(nodist_exampleapp_SOURCES)
resources.c: exampleapp.gresource.xml window.ui
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $(srcdir)/exampleapp.gresource.xml \
@@ -29,4 +30,6 @@ EXTRA_DIST = \
exampleapp.gresource.xml \
meson.build
+CLEANFILES = $(BUILT_SOURCES)
+
-include $(top_srcdir)/git.mk
diff --git a/examples/application3/Makefile.am b/examples/application3/Makefile.am
index 8fc0478..964e249 100644
--- a/examples/application3/Makefile.am
+++ b/examples/application3/Makefile.am
@@ -15,10 +15,11 @@ exampleapp_LDADD = $(GTK_LIBS)
exampleapp_SOURCES = \
main.c \
exampleapp.c exampleapp.h \
- exampleappwin.c exampleappwin.h \
+ exampleappwin.c exampleappwin.h
+nodist_exampleapp_SOURCES = \
resources.c
-BUILT_SOURCES = resources.c
+BUILT_SOURCES = $(nodist_exampleapp_SOURCES)
resources.c: exampleapp.gresource.xml window.ui
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $(srcdir)/exampleapp.gresource.xml \
@@ -29,4 +30,6 @@ EXTRA_DIST = \
exampleapp.gresource.xml \
meson.build
+CLEANFILES = $(BUILT_SOURCES)
+
-include $(top_srcdir)/git.mk
diff --git a/examples/application4/Makefile.am b/examples/application4/Makefile.am
index 7bc91ba..c95e6d6 100644
--- a/examples/application4/Makefile.am
+++ b/examples/application4/Makefile.am
@@ -15,10 +15,11 @@ exampleapp_LDADD = $(GTK_LIBS)
exampleapp_SOURCES = \
main.c \
exampleapp.c exampleapp.h \
- exampleappwin.c exampleappwin.h \
+ exampleappwin.c exampleappwin.h
+nodist_exampleapp_SOURCES = \
resources.c
-BUILT_SOURCES = resources.c
+BUILT_SOURCES = $(nodist_exampleapp_SOURCES)
resources.c: exampleapp.gresource.xml window.ui app-menu.ui
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $(srcdir)/exampleapp.gresource.xml \
@@ -30,4 +31,6 @@ EXTRA_DIST = \
exampleapp.gresource.xml \
meson.build
+CLEANFILES = $(BUILT_SOURCES)
+
-include $(top_srcdir)/git.mk
diff --git a/examples/application5/Makefile.am b/examples/application5/Makefile.am
index b6f34e7..d195699 100644
--- a/examples/application5/Makefile.am
+++ b/examples/application5/Makefile.am
@@ -15,7 +15,8 @@ exampleapp_LDADD = $(GTK_LIBS)
exampleapp_SOURCES = \
main.c \
exampleapp.c exampleapp.h \
- exampleappwin.c exampleappwin.h \
+ exampleappwin.c exampleappwin.h
+nodist_exampleapp_SOURCES = \
resources.c
BUILT_SOURCES = \
@@ -42,6 +43,7 @@ EXTRA_DIST = \
meson.build
CLEANFILES = \
+ $(nodist_exampleapp_SOURCES) \
gschemas.compiled
-include $(top_srcdir)/git.mk
diff --git a/examples/application6/Makefile.am b/examples/application6/Makefile.am
index 9cf885e..18b9a49 100644
--- a/examples/application6/Makefile.am
+++ b/examples/application6/Makefile.am
@@ -16,7 +16,8 @@ exampleapp_SOURCES = \
main.c \
exampleapp.c exampleapp.h \
exampleappwin.c exampleappwin.h \
- exampleappprefs.c exampleappprefs.h \
+ exampleappprefs.c exampleappprefs.h
+nodist_exampleapp_SOURCES = \
resources.c
BUILT_SOURCES = \
@@ -44,6 +45,7 @@ EXTRA_DIST = \
meson.build
CLEANFILES = \
+ $(nodist_exampleapp_SOURCES) \
gschemas.compiled
-include $(top_srcdir)/git.mk
diff --git a/examples/application7/Makefile.am b/examples/application7/Makefile.am
index 9cf885e..012ddc2 100644
--- a/examples/application7/Makefile.am
+++ b/examples/application7/Makefile.am
@@ -16,7 +16,8 @@ exampleapp_SOURCES = \
main.c \
exampleapp.c exampleapp.h \
exampleappwin.c exampleappwin.h \
- exampleappprefs.c exampleappprefs.h \
+ exampleappprefs.c exampleappprefs.h
+nodist_exampleapp_SOURCES = \
resources.c
BUILT_SOURCES = \
@@ -44,6 +45,7 @@ EXTRA_DIST = \
meson.build
CLEANFILES = \
+ $(nodist_exampleapp_SOURCES) \
gschemas.compiled
-include $(top_srcdir)/git.mk
diff --git a/examples/application8/Makefile.am b/examples/application8/Makefile.am
index c5bda45..355c2c0 100644
--- a/examples/application8/Makefile.am
+++ b/examples/application8/Makefile.am
@@ -16,7 +16,8 @@ exampleapp_SOURCES = \
main.c \
exampleapp.c exampleapp.h \
exampleappwin.c exampleappwin.h \
- exampleappprefs.c exampleappprefs.h \
+ exampleappprefs.c exampleappprefs.h
+nodist_exampleapp_SOURCES = \
resources.c
BUILT_SOURCES = \
@@ -45,6 +46,7 @@ EXTRA_DIST = \
meson.build
CLEANFILES = \
+ $(nodist_exampleapp_SOURCES) \
gschemas.compiled
-include $(top_srcdir)/git.mk
diff --git a/examples/application9/Makefile.am b/examples/application9/Makefile.am
index c5bda45..355c2c0 100644
--- a/examples/application9/Makefile.am
+++ b/examples/application9/Makefile.am
@@ -16,7 +16,8 @@ exampleapp_SOURCES = \
main.c \
exampleapp.c exampleapp.h \
exampleappwin.c exampleappwin.h \
- exampleappprefs.c exampleappprefs.h \
+ exampleappprefs.c exampleappprefs.h
+nodist_exampleapp_SOURCES = \
resources.c
BUILT_SOURCES = \
@@ -45,6 +46,7 @@ EXTRA_DIST = \
meson.build
CLEANFILES = \
+ $(nodist_exampleapp_SOURCES) \
gschemas.compiled
-include $(top_srcdir)/git.mk
diff --git a/testsuite/css/style/Makefile.am b/testsuite/css/style/Makefile.am
index 2ef0e55..57c54b2 100644
--- a/testsuite/css/style/Makefile.am
+++ b/testsuite/css/style/Makefile.am
@@ -25,6 +25,8 @@ test_css_style_LDADD = \
test_css_style_SOURCES = \
test-css-style.c \
+ $(NULL)
+nodist_test_css_style_SOURCES = \
resources.c \
$(NULL)
@@ -39,7 +41,8 @@ test_data = \
nth-child.ui nth-child.css nth-child.nodes \
$(NULL)
-BUILT_SOURCES = resources.c
+BUILT_SOURCES = $(nodist_test_css_style_SOURCES)
+CLEANFILES += $(BUILT_SOURCES)
resource_files = $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies $(builddir)/test-css-style.gresource.xml)
diff --git a/testsuite/gtk/Makefile.am b/testsuite/gtk/Makefile.am
index 843a515..b2ef0cf 100644
--- a/testsuite/gtk/Makefile.am
+++ b/testsuite/gtk/Makefile.am
@@ -150,9 +150,11 @@ keyhash_CFLAGS = \
keyhash_SOURCES = \
keyhash.c \
gtkkeyhash.c \
- gtkresources.c \
gtkprivate.c \
$(NULL)
+nodist_keyhash_SOURCES = \
+ gtkresources.c \
+ $(NULL)
gtkkeyhash.c: $(top_srcdir)/gtk/gtkkeyhash.c
$(AM_V_GEN) $(LN_S) $^ $@