build: Autogenerate more ignore files
authorEmmanuele Bassi <ebassi@linux.intel.com>
Sat, 14 Aug 2010 07:43:16 +0000 (08:43 +0100)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Sat, 14 Aug 2010 07:43:16 +0000 (08:43 +0100)
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
build/autotools/Makefile.am.gitignore [new file with mode: 0644]
doc/cookbook/examples/.gitignore [deleted file]
doc/cookbook/examples/Makefile.am
tests/accessibility/.gitignore [deleted file]
tests/accessibility/Makefile.am
tests/micro-bench/.gitignore [deleted file]
tests/micro-bench/Makefile.am

index 5d73468..a52a6c8 100644 (file)
@@ -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 (file)
index 0000000..3fc3743
--- /dev/null
@@ -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 (file)
index 6d18dba..0000000
+++ /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
index 026df7d..e00b238 100644 (file)
@@ -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 (file)
index 2b1a0b1..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-/cally-atkcomponent-example
-/cally-atkeditabletext-example
-/cally-atkevents-example
-/cally-atktext-example
-/cally-clone-example
index 719b29e..2e6739d 100644 (file)
@@ -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 (file)
index dd9f3db..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-*.o
-/test-picking
-/test-random-text
-/test-text-perf
-/test-text
index 8d0d148..fe4cad9 100644 (file)
@@ -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