[grisbi-cvs] [SCM] grisbi branch, master, updated. upstream_version_0_7_3-94-gdd9ba27

Rémi Cardona nobody at users.sourceforge.net
Fri Oct 22 01:06:08 CEST 2010


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grisbi".

The branch, master has been updated
       via  dd9ba27b2f60e1af7018997f965ff96e328f3d9d (commit)
       via  f7c09aadc625600207d83c22a63947d696570b7c (commit)
       via  d0969ae4053ee33756a0d942079b5ebd67b2ec81 (commit)
       via  63189e1d8dddcb3c6ad4d5ec39dd14e795e489d9 (commit)
      from  a137ef8a12c5ec82812cdc3801c709de4dd8fecf (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit dd9ba27b2f60e1af7018997f965ff96e328f3d9d
Author: Rémi Cardona <remi at gentoo.org>
Date:   Fri Oct 22 00:39:59 2010 +0200

    build: rework the autoconf logic for CUnit, make it "auto" by default

commit f7c09aadc625600207d83c22a63947d696570b7c
Author: Rémi Cardona <remi at gentoo.org>
Date:   Thu Oct 21 23:19:08 2010 +0200

    tests: remove unused header, group #includes at the top

commit d0969ae4053ee33756a0d942079b5ebd67b2ec81
Author: Rémi Cardona <remi at gentoo.org>
Date:   Thu Oct 21 23:17:10 2010 +0200

    tests: remove useless HAVE_CUNIT #ifdef
    
    It is useless because the automake conditional already makes sure we
    never build this code if CUnit support is disabled.

commit 63189e1d8dddcb3c6ad4d5ec39dd14e795e489d9
Author: Rémi Cardona <remi at gentoo.org>
Date:   Thu Oct 21 21:08:35 2010 +0200

    tests: fix tests' build with recent changes

-----------------------------------------------------------------------

Changes:
diff --git a/configure.in b/configure.in
index 0198381..11802d4 100644
--- a/configure.in
+++ b/configure.in
@@ -143,29 +143,27 @@ dnl ================================================================
 dnl Check for cunit
 dnl ================================================================
 
-AC_CHECK_HEADER(CUnit/Basic.h,,nocunit=true)
 AC_ARG_WITH(cunit,
-	AC_HELP_STRING([--with-cunit],
-	[build grisbi with cunit tests [default=without]]),
+	AS_HELP_STRING([--with-cunit],[CUnit support for unit tests (default=auto)]),
 	[build_cunit=$withval],
-	[build_cunit=no]
-)
-if test x$build_cunit != xyes
-then
-	nocunit=true
+	[build_cunit=auto])
+
+AC_CHECK_HEADER([CUnit/Basic.h], have_cunit=yes, have_cunit=no)
+if test "$build_cunit" = yes -a "$have_cunit" = no; then
+	AC_MSG_ERROR([CUnit support was requested but headers/library could not be found.])
+fi
+if test "$build_cunit" != no; then
+	build_cunit=$have_cunit
 else
-	if test x$nocunit != xtrue
-	then
-		nocunit=false
-		CUNIT_CFLAGS="-DHAVE_CUNIT"
-		CUNIT_LIBS="-lcunit"
-	else
-		AC_MSG_RESULT([libcunit header missing. Check your libcunit installation])
-	fi
+	build_cunit=no
+fi
+if test "$build_cunit" = yes; then
+	CUNIT_CFLAGS="-DHAVE_CUNIT"
+	CUNIT_LIBS="-lcunit"
 fi
 AC_SUBST(CUNIT_CFLAGS)
 AC_SUBST(CUNIT_LIBS)
-AM_CONDITIONAL(HAVE_CUNIT, test x$nocunit != xtrue)
+AM_CONDITIONAL(HAVE_CUNIT, [test "$build_cunit" = yes])
 
 dnl ================================================================
 dnl Check for libofx
@@ -321,6 +319,7 @@ echo "
                 Build with OpenSSL:        $build_openssl
                 Build with OFX plugin:     $build_ofx
                 Build ige_mac_integration: $os_osx
+                CUnit/unit tests support:  $build_cunit
 
 "
 if expr ${GRISBI_MINOR_VERSION} % 2 > /dev/null; then
diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am
index ee9ba69..a1ea9df 100644
--- a/src/tests/Makefile.am
+++ b/src/tests/Makefile.am
@@ -2,7 +2,7 @@
 
 if HAVE_CUNIT
 
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src $(GRISBI_CFLAGS) $(IGE_MAC_CFLAGS) $(CUNIT_CFLAGS)
 
 check_PROGRAMS = cunit_tests
 TESTS = cunit_tests
@@ -13,16 +13,13 @@ cunit_tests_SOURCES = \
 	gsb_real_cunit.c	\
 	utils_dates_cunit.c	\
 	\
-	main_cunit.h	\
 	gsb_data_account_cunit.h	\
 	gsb_real_cunit.h	\
 	utils_dates_cunit.h
 
-cunit_tests_LDADD = $(CUNIT_LIBS) $(top_builddir)/src/libgrisbi.la
+cunit_tests_LDADD = $(top_builddir)/src/libgrisbi.la $(GRISBI_CFLAGS) $(IGE_MAC_CFLAGS) $(CUNIT_LIBS)
 
 
 CLEANFILES = *~
 
-MAINTAINERCLEANFILES = Makefile.in
-
 endif
diff --git a/src/tests/main_cunit.c b/src/tests/main_cunit.c
index 4d77caf..3464f22 100644
--- a/src/tests/main_cunit.c
+++ b/src/tests/main_cunit.c
@@ -36,10 +36,11 @@
 #include "include.h"
 
 /*START_INCLUDE*/
-#include "main_cunit.h"
-#include "./gsb_data_account_cunit.h"
-#include "./gsb_real_cunit.h"
-#include "./utils_dates_cunit.h"
+#include <CUnit/Automated.h>
+#include <CUnit/Basic.h>
+#include "gsb_data_account_cunit.h"
+#include "gsb_real_cunit.h"
+#include "utils_dates_cunit.h"
 /*END_INCLUDE*/
 
 
@@ -47,20 +48,20 @@
  * Everything should be removed as soon as core functions and GUI functions
  * are properly separated and a libgrisbi_core.a library is generated.
  */
+GtkWidget *window = NULL;
 extern FILE *debug_file;
 extern gchar *nom_fichier_comptes;
 gboolean gsb_grisbi_close( void )
 {
 	return FALSE;
 }
+gboolean gsb_main_set_grisbi_title ( gint account_number )
+{
+	return FALSE;
+}
 /* End of unnecessary things */
 
 
-#if HAVE_CUNIT
-
-#include <CUnit/Automated.h>
-#include <CUnit/Basic.h>
-
 
 
 int gsb_cunit_run_tests()
@@ -89,14 +90,6 @@ int gsb_cunit_run_tests()
     return CU_get_error();
 }
 
-#else/*HAVE_CUNIT*/
-
-int gsb_cunit_run_tests()
-{
-    return 0;
-}
-
-#endif/*HAVE_CUNIT*/
 
 #ifdef _MSC_VER
 int APIENTRY wWinMain(HINSTANCE hInstance,
diff --git a/src/tests/main_cunit.h b/src/tests/main_cunit.h
deleted file mode 100644
index a8add5f..0000000
--- a/src/tests/main_cunit.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* *******************************************************************************/
-/*                                 GRISBI                                        */
-/*              Programme de gestion financière personnelle                      */
-/*                              license : GPLv2                                  */
-/*                                                                               */
-/*     Copyright (C)    2000-2008 Cédric Auger (cedric at grisbi.org)               */
-/*                      2003-2008 Benjamin Drieu (bdrieu at april.org)              */
-/*                      http://www.grisbi.org                                    */
-/*      Version : 0.6.0                                                          */
-/*                                                                               */
-/* *******************************************************************************/
-
-/* *******************************************************************************/
-/*                                                                               */
-/*     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 2 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
-/*                                                                               */
-/* *******************************************************************************/
-
-
-#ifndef _MAIN_CUNIT_H
-#define _MAIN_CUNIT_H (1)
-
-/* START_INCLUDE_H */
-/* END_INCLUDE_H */
-
-/* START_DECLARATION */
-int gsb_cunit_run_tests();
-/* END_DECLARATION */
-
-#endif//_MAIN_CUNIT_H
-


hooks/post-receive
-- 
grisbi


More information about the cvs mailing list