[json-glib] build: Automate ignoring test binaries
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [json-glib] build: Automate ignoring test binaries
- Date: Sat, 14 Aug 2010 12:01:19 +0000 (UTC)
commit 5732cadfab58435ded4e88b0733c1a46aa0dcd2d
Author: Emmanuele Bassi <ebassi linux intel com>
Date: Sat Aug 14 12:55:18 2010 +0100
build: Automate ignoring test binaries
Use noinst_PROGRAMS to generate the list of test binaries to ignore
directly in the test directories.
.gitignore | 11 -----------
build/autotools/Makefile.am | 3 ++-
build/autotools/Makefile.am.gitignore | 19 +++++++++++++++++++
json-glib/tests/Makefile.am | 4 ++++
tests/Makefile.am | 4 ++++
5 files changed, 29 insertions(+), 12 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index b7fed56..feddaff 100644
--- a/.gitignore
+++ b/.gitignore
@@ -35,23 +35,12 @@ json-glib.pc
/json-glib/gcov-report.txt
/json-glib/stamp-enum-types
/json-glib/stamp-marshal
-/json-glib/tests/array-test
-/json-glib/tests/builder-test
-/json-glib/tests/generator-test
-/json-glib/tests/object-test
-/json-glib/tests/node-test
-/json-glib/tests/parser-test
-/json-glib/tests/reader-test
libtool
ltmain.sh
missing
stamp-h1
test-report.xml
test-report.html
-/tests/test-serialize-simple
-/tests/test-serialize-complex
-/tests/test-serialize-full
-/tests/test-serialize-boxed
.*.swp
*.stamp
/doc/reference/html
diff --git a/build/autotools/Makefile.am b/build/autotools/Makefile.am
index e784658..3780f36 100644
--- a/build/autotools/Makefile.am
+++ b/build/autotools/Makefile.am
@@ -5,7 +5,8 @@ EXTRA_DIST = \
Makefile.am.enums \
Makefile.am.marshal \
Makefile.am.gtest \
- Makefile.am.gcov
+ Makefile.am.gcov \
+ Makefile.am.gitignore
# needed to avoid including Makefile.am.gtest
test-report:
diff --git a/build/autotools/Makefile.am.gitignore b/build/autotools/Makefile.am.gitignore
new file mode 100644
index 0000000..fad1198
--- /dev/null
+++ b/build/autotools/Makefile.am.gitignore
@@ -0,0 +1,19 @@
+# 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
+
+all: gitignore
diff --git a/json-glib/tests/Makefile.am b/json-glib/tests/Makefile.am
index 74b7ba0..ad87bcf 100644
--- a/json-glib/tests/Makefile.am
+++ b/json-glib/tests/Makefile.am
@@ -13,6 +13,8 @@ AM_CFLAGS = -g $(JSON_CFLAGS) $(MAINTAINER_CFLAGS)
EXTRA_DIST += stream-load.json
+DISTCLEANFILES =
+
noinst_PROGRAMS = $(TEST_PROGS)
progs_ldadd = $(JSON_LIBS) \
$(top_builddir)/json-glib/libjson-glib-1.0.la
@@ -44,3 +46,5 @@ builder_test_LDADD = $(progs_ldadd)
TEST_PROGS += reader-test
reader_test_SOURCES = reader-test.c
reader_test_LDADD = $(progs_ldadd)
+
+-include $(top_srcdir)/build/autotools/Makefile.am.gitignore
diff --git a/tests/Makefile.am b/tests/Makefile.am
index d59e97a..2775533 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -3,6 +3,8 @@ include $(top_srcdir)/build/autotools/Makefile.am.silent
NULL =
+DISTCLEANFILES =
+
noinst_PROGRAMS = $(TEST_PROGS)
INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/json-glib
@@ -28,3 +30,5 @@ test_serialize_boxed_LDADD = $(progs_ldadd)
TEST_PROGS += test-serialize-full
test_serialize_full_SOURCES = test-serialize-full.c
test_serialize_full_LDADD = $(progs_ldadd)
+
+-include $(top_srcdir)/build/autotools/Makefile.am.gitignore
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]