From 94c8635d0f4584ef81e565e7837bdeb0008e034e Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Sat, 14 Aug 2010 08:43:16 +0100 Subject: [PATCH] build: Autogenerate more ignore files The tests/accessibility, tests/micro-bench and the examples directory in the coobook create a lot of non-installed binaries. Since we know who they are, and we ignore them, we can auto-generate the ignore files as well. The rest of Clutter is covered by the main ignore file. --- build/autotools/Makefile.am | 1 + build/autotools/Makefile.am.gitignore | 21 +++++++++++++++++++++ doc/cookbook/examples/.gitignore | 8 -------- doc/cookbook/examples/Makefile.am | 4 ++++ tests/accessibility/.gitignore | 5 ----- tests/accessibility/Makefile.am | 4 ++++ tests/micro-bench/.gitignore | 5 ----- tests/micro-bench/Makefile.am | 3 +++ 8 files changed, 33 insertions(+), 18 deletions(-) create mode 100644 build/autotools/Makefile.am.gitignore delete mode 100644 doc/cookbook/examples/.gitignore delete mode 100644 tests/accessibility/.gitignore delete mode 100644 tests/micro-bench/.gitignore diff --git a/build/autotools/Makefile.am b/build/autotools/Makefile.am index 5d73468ab..a52a6c8e7 100644 --- a/build/autotools/Makefile.am +++ b/build/autotools/Makefile.am @@ -6,6 +6,7 @@ EXTRA_DIST = \ Makefile.am.enums \ Makefile.am.changelog \ Makefile.am.gcov \ + Makefile.am.gitignore \ dolt.m4 \ introspection.m4 \ gtk-doc.m4 \ diff --git a/build/autotools/Makefile.am.gitignore b/build/autotools/Makefile.am.gitignore new file mode 100644 index 000000000..3fc374328 --- /dev/null +++ b/build/autotools/Makefile.am.gitignore @@ -0,0 +1,21 @@ +# this file should only be used in directories that generate test +# or example binaries through noinst_PROGRAMS; it is *not* a full +# generator of Git ignore files, and it's not meant to be used as +# the top-level Git ignore file generator. + +$(srcdir)/.gitignore: Makefile.am + $(QUIET_GEN)( \ + echo "*.o" ; \ + echo ".gitignore" ; \ + ) > .gitignore ; \ + for p in $(noinst_PROGRAMS); do \ + echo "/$$p" >> .gitignore ; \ + done + +gitignore: $(srcdir)/.gitignore + +.PHONY: gitignore + +DISTCLEANFILES += $(srcdir)/.gitignore + +all: gitignore diff --git a/doc/cookbook/examples/.gitignore b/doc/cookbook/examples/.gitignore deleted file mode 100644 index 6d18dba94..000000000 --- a/doc/cookbook/examples/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -/animations-rotating -/text-shadow -/textures-reflection -/textures-split-go -/textures-sub-texture -/layouts-stacking -/layouts-stacking-diff-sized-actors -/events-mouse-scroll diff --git a/doc/cookbook/examples/Makefile.am b/doc/cookbook/examples/Makefile.am index 026df7d26..e00b238ba 100644 --- a/doc/cookbook/examples/Makefile.am +++ b/doc/cookbook/examples/Makefile.am @@ -40,3 +40,7 @@ textures_sub_texture_SOURCES = textures-sub-texture.c layouts_stacking_SOURCES = layouts-stacking.c layouts_stacking_diff_sized_actors_SOURCES = layouts-stacking-diff-sized-actors.c events_mouse_scroll_SOURCES = events-mouse-scroll.c + +DISTCLEANFILES = + +-include $(top_srcdir)/build/autotools/Makefile.am.gitignore diff --git a/tests/accessibility/.gitignore b/tests/accessibility/.gitignore deleted file mode 100644 index 2b1a0b151..000000000 --- a/tests/accessibility/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -/cally-atkcomponent-example -/cally-atkeditabletext-example -/cally-atkevents-example -/cally-atktext-example -/cally-clone-example diff --git a/tests/accessibility/Makefile.am b/tests/accessibility/Makefile.am index 719b29eb9..2e6739d2f 100644 --- a/tests/accessibility/Makefile.am +++ b/tests/accessibility/Makefile.am @@ -61,3 +61,7 @@ cally_clone_example_CFLAGS = $(CLUTTER_CFLAGS) $(MAINTAINER_CFLAGS) \ $(INCLUDES) cally_clone_example_SOURCES = cally-clone-example.c \ $(common_sources) + +DISTCLEANFILES = + +-include $(top_srcdir)/build/autotools/Makefile.am.gitignore diff --git a/tests/micro-bench/.gitignore b/tests/micro-bench/.gitignore deleted file mode 100644 index dd9f3db67..000000000 --- a/tests/micro-bench/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -*.o -/test-picking -/test-random-text -/test-text-perf -/test-text diff --git a/tests/micro-bench/Makefile.am b/tests/micro-bench/Makefile.am index 8d0d148f1..fe4cad902 100644 --- a/tests/micro-bench/Makefile.am +++ b/tests/micro-bench/Makefile.am @@ -1,5 +1,7 @@ include $(top_srcdir)/build/autotools/Makefile.am.silent +DISTCLEANFILES = + noinst_PROGRAMS = \ test-text \ test-picking \ @@ -26,3 +28,4 @@ test_picking_SOURCES = test-picking.c test_text_perf_SOURCES = test-text-perf.c test_random_text_SOURCES = test-random-text.c +-include $(top_srcdir)/build/autotools/Makefile.am.gitignore