From 44902f4e2cb905f62ab2b69022b30d334c922c48 Mon Sep 17 00:00:00 2001 From: djcb Date: Mon, 21 May 2012 09:45:13 +0300 Subject: [PATCH] * add some missing files for refactoring, bump version --- configure.ac | 2 +- mu/Makefile.am | 54 +++++++++++++++++++++++++++++++++++++ mu/tests/Makefile.am | 64 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 119 insertions(+), 1 deletion(-) create mode 100644 mu/Makefile.am create mode 100644 mu/tests/Makefile.am diff --git a/configure.ac b/configure.ac index 9a64f70a..beda7980 100644 --- a/configure.ac +++ b/configure.ac @@ -14,7 +14,7 @@ ## along with this program; if not, write to the Free Software Foundation, ## Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -AC_INIT([mu],[0.9.8.5-dev2],[http://code.google.com/p/mu0/issues/list],[mu]) +AC_INIT([mu],[0.9.8.5-dev3],[http://code.google.com/p/mu0/issues/list],[mu]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_SRCDIR([mu/mu.cc]) # libtoolize wants to put some stuff in here; if you have an old diff --git a/mu/Makefile.am b/mu/Makefile.am new file mode 100644 index 00000000..475042f0 --- /dev/null +++ b/mu/Makefile.am @@ -0,0 +1,54 @@ +## Copyright (C) 2010-2012 Dirk-Jan C. Binnema +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 3 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software Foundation, +## Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +include $(top_srcdir)/gtest.mk + +# enforce compiling guile (optionally) first,then this dir first +# before decending into tests/ +SUBDIRS= . + +if BUILD_TESTS +SUBDIRS += tests +endif + +INCLUDES=-I${top_srcdir}/lib $(GLIB_CFLAGS) + +# don't use -Werror, as it might break on other compilers +# use -Wno-unused-parameters, because some callbacks may not +# really need all the params they get +AM_CFLAGS=-Wall -Wextra -Wno-unused-parameter -Wdeclaration-after-statement -pedantic -Wno-variadic-macros +AM_CXXFLAGS=-Wall -Wextra -Wno-unused-parameter + +bin_PROGRAMS= \ + mu + +# note, mu.cc is only '.cc' and not '.c' because libmu must explicitly +# be linked as c++, not c. +mu_SOURCES= \ + mu.cc \ + mu-cmd-cfind.c \ + mu-config.c \ + mu-config.h \ + mu-cmd-extract.c \ + mu-cmd-find.c \ + mu-cmd-index.c \ + mu-cmd-server.c \ + mu-cmd.c \ + mu-cmd.h + +mu_LDADD= \ + ${top_builddir}/lib/libmu.la \ + $(GLIB_LIBS) diff --git a/mu/tests/Makefile.am b/mu/tests/Makefile.am new file mode 100644 index 00000000..db451591 --- /dev/null +++ b/mu/tests/Makefile.am @@ -0,0 +1,64 @@ +# Copyright (C) 2008-2011 Dirk-Jan C. Binnema +## +## This program is free software; you can redistribute it and/or modify it +## under the terms of the GNU General Public License as published by the +## Free Software Foundation; either version 3, or (at your option) any +## later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software Foundation, +## Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +include $(top_srcdir)/gtest.mk + +INCLUDES=$(XAPIAN_CXXFLAGS) \ + $(GMIME_CFLAGS) \ + $(GLIB_CFLAGS) \ + -I ${top_srcdir} \ + -I ${top_srcdir}/lib \ + -I ${top_srcdir}/lib/tests \ + -DMU_TESTMAILDIR=\"${top_srcdir}/lib/tests/testdir\" \ + -DMU_TESTMAILDIR2=\"${top_srcdir}/lib/tests/testdir2\" \ + -DMU_TESTMAILDIR3=\"${top_srcdir}/lib/tests/testdir3\" \ + -DMU_PROGRAM=\"${abs_top_builddir}/mu/mu\" \ + -DABS_CURDIR=\"${abs_builddir}\" \ + -DABS_SRCDIR=\"${abs_srcdir}\" + +# don't use -Werror, as it might break on other compilers +# use -Wno-unused-parameters, because some callbacks may not +# really need all the params they get +AM_CFLAGS=-Wall -Wextra -Wno-unused-parameter -Wdeclaration-after-statement +AM_CXXFLAGS=-Wall -Wextra -Wno-unused-parameter + +noinst_PROGRAMS= $(TEST_PROGS) + +TEST_PROGS += test-mu-query +test_mu_query_SOURCES= test-mu-query.c dummy.cc +test_mu_query_LDADD=${top_builddir}/lib/tests/libtestmucommon.la + +TEST_PROGS += test-mu-contacts +test_mu_contacts_SOURCES= test-mu-contacts.c dummy.cc +test_mu_contacts_LDADD=${top_builddir}/lib/tests/libtestmucommon.la + +TEST_PROGS += test-mu-cmd +test_mu_cmd_SOURCES= test-mu-cmd.c dummy.cc +test_mu_cmd_LDADD=${top_builddir}/lib/tests/libtestmucommon.la + +TEST_PROGS += test-mu-cmd-cfind +test_mu_cmd_cfind_SOURCES= test-mu-cmd-cfind.c dummy.cc +test_mu_cmd_cfind_LDADD=${top_builddir}/lib/tests/libtestmucommon.la + +TEST_PROGS += test-mu-threads +test_mu_threads_SOURCES= test-mu-threads.c dummy.cc +test_mu_threads_LDADD=${top_builddir}/lib/tests/libtestmucommon.la + +# we need to use dummy.cc to enforce c++ linking... +BUILT_SOURCES= \ + dummy.cc +dummy.cc: + touch dummy.cc