From 74f7670af1848a814568d570d2306ed93ece1a6c Mon Sep 17 00:00:00 2001 From: Dennis Schridde Date: Fri, 2 Sep 2011 09:50:03 -0500 Subject: Make building tests optional --- tools/testapp/Makefile.am | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/testapp/Makefile.am b/tools/testapp/Makefile.am index 39de532..ee12ec9 100644 --- a/tools/testapp/Makefile.am +++ b/tools/testapp/Makefile.am @@ -5,7 +5,11 @@ else VER= endif -libexec_PROGRAMS = dbusmenu-testapp +libexec_PROGRAMS = + +if WANT_TESTS +libexec_PROGRAMS += dbusmenu-testapp +endif dbusmenu_testapp_SOURCES = \ main.c -- cgit v1.2.3 From 587b3cdf66d99cc4c52dd49ba04cfbbd518b6c98 Mon Sep 17 00:00:00 2001 From: Dennis Schridde Date: Fri, 2 Sep 2011 21:57:04 -0500 Subject: Remove unneeded dbusmenu-GTK dep in testapp --- tools/testapp/Makefile.am | 8 -------- 1 file changed, 8 deletions(-) (limited to 'tools') diff --git a/tools/testapp/Makefile.am b/tools/testapp/Makefile.am index 39de532..f59f839 100644 --- a/tools/testapp/Makefile.am +++ b/tools/testapp/Makefile.am @@ -1,10 +1,4 @@ -if USE_GTK3 -VER=3 -else -VER= -endif - libexec_PROGRAMS = dbusmenu-testapp dbusmenu_testapp_SOURCES = \ @@ -18,6 +12,4 @@ dbusmenu_testapp_CFLAGS = \ dbusmenu_testapp_LDADD = \ $(builddir)/../../libdbusmenu-glib/libdbusmenu-glib.la \ - $(builddir)/../../libdbusmenu-gtk/libdbusmenu-gtk$(VER).la \ - $(DBUSMENUGTK_LIBS) \ $(DBUSMENUTESTS_LIBS) -- cgit v1.2.3 From 4177700e45a02a7f35b32dc24dd7ec6e150d6a0a Mon Sep 17 00:00:00 2001 From: Dennis Schridde Date: Mon, 19 Sep 2011 23:43:26 -0500 Subject: Adding an optional build of the dumper --- configure.ac | 16 +++++++++++++++- tests/Makefile.am | 12 ++++++++++-- tools/Makefile.am | 6 +++++- 3 files changed, 30 insertions(+), 4 deletions(-) (limited to 'tools') diff --git a/configure.ac b/configure.ac index e284980..f347625 100644 --- a/configure.ac +++ b/configure.ac @@ -96,8 +96,17 @@ AC_SUBST(DBUSMENUGTK_LIBS) X11_REQUIRED_VERSION=1.3 +AC_ARG_ENABLE([dumper], + AC_HELP_STRING([--disable-dumper], [Disable dbusmenudumper tool]), + [enable_dumper=$enableval], [enable_dumper=auto]) +AM_CONDITIONAL([WANT_DBUSMENUDUMPER], [test "x$enable_dumper" != "xno"]) + +AS_IF([test "x$enable_dumper" != "xno"],[ PKG_CHECK_MODULES(DBUSMENUDUMPER, gtk+-2.0 >= $GTK_REQUIRED_VERSION - x11 >= $X11_REQUIRED_VERSION) + x11 >= $X11_REQUIRED_VERSION, + [have_dumper=yes] +) +]) AC_SUBST(DBUSMENUDUMPER_CFLAGS) AC_SUBST(DBUSMENUDUMPER_LIBS) @@ -243,3 +252,8 @@ AM_COND_IF([HAVE_VALA], AC_MSG_NOTICE([ Vala bindings no]) ) +AS_IF([test "x$have_dumper" = "xyes"], + AC_MSG_NOTICE([ Dumper: yes]), + AC_MSG_NOTICE([ Dumper: no]) +) + diff --git a/tests/Makefile.am b/tests/Makefile.am index e6882af..a4e8682 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -12,8 +12,12 @@ TESTS = \ test-glib-properties \ test-glib-proxy \ test-glib-simple-items \ - test-glib-submenu \ + test-glib-submenu + +if WANT_DBUSMENUDUMPER +TESTS += \ test-json +endif if WANT_LIBDBUSMENUGTK TESTS += \ @@ -50,9 +54,13 @@ check_PROGRAMS = \ test-glib-proxy-proxy \ test-glib-submenu-client \ test-glib-submenu-server \ - test-glib-simple-items \ + test-glib-simple-items + +if WANT_DBUSMENUDUMPER +check_PROGRAMS += \ test-json-client \ test-json-server +endif if WANT_LIBDBUSMENUGTK check_PROGRAMS += \ diff --git a/tools/Makefile.am b/tools/Makefile.am index 48993f1..029b73e 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -1,7 +1,11 @@ SUBDIRS = testapp -libexec_PROGRAMS = dbusmenu-dumper +libexec_PROGRAMS = + +if WANT_DBUSMENUDUMPER +libexec_PROGRAMS += dbusmenu-dumper +endif libexec_SCRIPTS = dbusmenu-bench -- cgit v1.2.3