[gitg] Use non-recursive make to build tests
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg] Use non-recursive make to build tests
- Date: Sat, 4 Jan 2014 15:11:34 +0000 (UTC)
commit 706f198ba3ddd27dd2040f5d89d0497aeae687cc
Author: Jesse van den Kieboom <jessevdk gmail com>
Date: Sat Jan 4 15:41:21 2014 +0100
Use non-recursive make to build tests
Makefile.am | 5 +++-
configure.ac | 2 -
tests/Makefile.am | 67 +++++++++++++++++++++++----------------------
tests/libgitg/Makefile.am | 54 +++++++++++++++++++-----------------
4 files changed, 66 insertions(+), 62 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index a5ef7a8..a87c04f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,7 +2,7 @@
ACLOCAL_AMFLAGS = -I m4 -I libgd ${ACLOCAL_FLAGS}
-SUBDIRS = libgd po tests
+SUBDIRS = libgd po
DISTCLEANFILES = \
intltool-extract \
@@ -83,14 +83,17 @@ GITIGNOREFILES =
CLEANFILES =
lib_LTLIBRARIES =
bin_PROGRAMS =
+noinst_PROGRAMS =
SCALABLE_ICONS =
gsettings_SCHEMAS =
+TESTS =
include libgitg/Makefile.am
include libgitg-ext/Makefile.am
include plugins/Makefile.am
include gitg/Makefile.am
include data/Makefile.am
+include tests/Makefile.am
include icons.mk
diff --git a/configure.ac b/configure.ac
index 421ff24..a0a1672 100644
--- a/configure.ac
+++ b/configure.ac
@@ -290,8 +290,6 @@ libgitg-ext/libgitg-ext-1.0.pc
data/gitg.desktop.in
data/org.gnome.gitg.gschema.xml.in
po/Makefile.in
-tests/Makefile
-tests/libgitg/Makefile
])
AC_OUTPUT
diff --git a/tests/Makefile.am b/tests/Makefile.am
index a8f954b..3f9cef4 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,5 +1,3 @@
-SUBDIRS = libgitg
-
tests_common_cppflags = \
-I$(top_srcdir) \
-I$(top_srcdir)/gitg \
@@ -13,36 +11,39 @@ tests_common_cflags = \
tests_common_valaflags = $(GITG_PLUGIN_VALAFLAGS)
-noinst_PROGRAMS = $(DEMO_PROGS)
-
-DEMO_PROGS = diff-view repository-list-box progress-bin
-
-diff_view_SOURCES = diff-view.vala
-diff_view_VALAFLAGS = $(tests_common_valaflags)
-diff_view_LDADD = $(GITG_PLUGIN_LIBS)
-diff_view_CFLAGS = $(tests_common_cflags)
-diff_view_CPPFLAGS = $(tests_common_cppflags)
-
-repository_list_box_SOURCES = repository-list-box.vala
-repository_list_box_VALAFLAGS = $(tests_common_valaflags)
-repository_list_box_LDADD = $(GITG_PLUGIN_LIBS)
-repository_list_box_CFLAGS = $(tests_common_cflags)
-repository_list_box_CPPFLAGS = $(tests_common_cppflags)
-
-progress_bin_SOURCES = progress-bin.vala
-progress_bin_VALAFLAGS = $(tests_common_valaflags)
-progress_bin_LDADD = $(GITG_PLUGIN_LIBS)
-progress_bin_CFLAGS = $(tests_common_cflags)
-progress_bin_CPPFLAGS = $(tests_common_cppflags)
-
-GITIGNOREFILES = \
- $(diff_view_SOURCES:%.vala=%.c) \
- diff_view_vala.stamp \
- $(repository_list_box_SOURCES:%.vala=%.c) \
- repository_list_box_vala.stamp \
- $(progress_bin_SOURCES:%.vala=%.c) \
- progress_bin_vala.stamp
-
--include $(top_srcdir)/git.mk
+noinst_PROGRAMS += $(TESTS_DEMO_PROGS)
+
+TESTS_DEMO_PROGS = \
+ tests/diff-view \
+ tests/repository-list-box \
+ tests/progress-bin
+
+tests_diff_view_SOURCES = tests/diff-view.vala
+tests_diff_view_VALAFLAGS = $(tests_common_valaflags)
+tests_diff_view_LDADD = $(GITG_PLUGIN_LIBS)
+tests_diff_view_CFLAGS = $(tests_common_cflags)
+tests_diff_view_CPPFLAGS = $(tests_common_cppflags)
+
+tests_repository_list_box_SOURCES = tests/repository-list-box.vala
+tests_repository_list_box_VALAFLAGS = $(tests_common_valaflags)
+tests_repository_list_box_LDADD = $(GITG_PLUGIN_LIBS)
+tests_repository_list_box_CFLAGS = $(tests_common_cflags)
+tests_repository_list_box_CPPFLAGS = $(tests_common_cppflags)
+
+tests_progress_bin_SOURCES = tests/progress-bin.vala
+tests_progress_bin_VALAFLAGS = $(tests_common_valaflags)
+tests_progress_bin_LDADD = $(GITG_PLUGIN_LIBS)
+tests_progress_bin_CFLAGS = $(tests_common_cflags)
+tests_progress_bin_CPPFLAGS = $(tests_common_cppflags)
+
+GITIGNOREFILES += \
+ $(tests_diff_view_SOURCES:%.vala=%.c) \
+ tests_diff_view_vala.stamp \
+ $(tests_repository_list_box_SOURCES:%.vala=%.c) \
+ tests_repository_list_box_vala.stamp \
+ $(tests_progress_bin_SOURCES:%.vala=%.c) \
+ tests_progress_bin_vala.stamp
+
+include tests/libgitg/Makefile.am
# vi:ts=8:noet
diff --git a/tests/libgitg/Makefile.am b/tests/libgitg/Makefile.am
index 48756b0..91def6e 100644
--- a/tests/libgitg/Makefile.am
+++ b/tests/libgitg/Makefile.am
@@ -1,15 +1,17 @@
-TEST_PROGS = test-libgitg
+TESTS_LIBGITG_PROGS = tests/libgitg/test-libgitg
-TESTS = $(TEST_PROGS)
-noinst_PROGRAMS = $(TEST_PROGS)
+TESTS += $(TESTS_LIBGITG_PROGS)
+noinst_PROGRAMS += $(TESTS_LIBGITG_PROGS)
-test_libgitg_CPPFLAGS = \
+tests_libgitg_test_libgitg_CPPFLAGS = \
-I$(top_srcdir) \
-I$(top_srcdir)/gitg \
- -I$(top_srcdir)/libgitg
+ -I$(top_srcdir)/libgitg \
+ -I$(top_srcdir)/tests/libgitg
-test_libgitg_VALAFLAGS = \
- --pkg posix --pkg gitg-assert \
+tests_libgitg_test_libgitg_VALAFLAGS = \
+ --pkg posix \
+ --pkg gitg-assert \
--pkg Ggit-1.0 \
--pkg libgitg-1.0 \
--pkg gio-2.0 \
@@ -19,37 +21,37 @@ test_libgitg_VALAFLAGS = \
--pkg webkit2gtk-3.0 \
--pkg config \
$(GITG_VALAFLAGS) \
- --vapidir $(srcdir) \
+ --vapidir $(top_srcdir)/tests/libgitg \
--vapidir $(top_srcdir)/vapi \
--vapidir $(top_builddir)/libgitg \
--disable-warnings
-test_libgitg_CFLAGS = \
+tests_libgitg_test_libgitg_CFLAGS = \
$(GITG_DEBUG_FLAGS) \
$(GITG_CFLAGS) \
$(LIBGITG_CFLAGS) \
-g \
-w
-test_libgitg_LDADD = \
+tests_libgitg_test_libgitg_LDADD = \
$(top_builddir)/libgitg/libgitg-1.0.la \
$(LIBGITG_LIBS)
-test_libgitg_SOURCES = \
- test.vala \
- main.vala \
- repository.vala \
- test-stage.vala \
- test-date.vala \
- test-commit.vala \
- test-encoding.vala
-
-GITIGNOREFILES = \
- $(test_libgitg_SOURCES:%.vala=%.c) \
- test_libgitg_vala.stamp
-
-EXTRA_DIST = gitg-assert.h gitg-assert.vapi
-
--include $(top_srcdir)/git.mk
+tests_libgitg_test_libgitg_SOURCES = \
+ tests/libgitg/test.vala \
+ tests/libgitg/main.vala \
+ tests/libgitg/repository.vala \
+ tests/libgitg/test-stage.vala \
+ tests/libgitg/test-date.vala \
+ tests/libgitg/test-commit.vala \
+ tests/libgitg/test-encoding.vala
+
+GITIGNOREFILES += \
+ $(tests_libgitg_test_libgitg_SOURCES:%.vala=%.c) \
+ tests_libgitg_test_libgitg_vala.stamp
+
+EXTRA_DIST += \
+ tests/libgitg/gitg-assert.h \
+ tests/libgitg/gitg-assert.vapi
# vi:ts=8:noet
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]