Commit 20b02e44 authored by jds2's avatar jds2

- Upgraded configure options

- integrated configure options with jam build
- reworked Makefile.am set for shared library build
- minor changes to repository managment


git-svn-id: http://svn.code.sf.net/p/cunit/code/trunk@96 f00e6729-6848-4c17-8bfb-678c97c00071
parent c947c405
......@@ -43,8 +43,9 @@ make DESTDIR=$RPM_BUILD_ROOT install
%{_prefix}/include/CUnit/TestRun.h
%{_prefix}/include/CUnit/Util.h
########## Library File
########## Library Files
%{_prefix}/lib/libcunit.a
%{_prefix}/lib/libcunit.so.@LIBTOOL_SUFFIX@
########## doc Files
%{_prefix}/doc/@PACKAGE@/CUnit_doc.css
......
......@@ -54,7 +54,7 @@
#include <math.h>
/** CUnit version number. */
#define CU_VERSION "2.0-3"
#define CU_VERSION "2.1-0"
/* Max string lengths for names (includes terminating NULL. */
/** Maximum length of a test name string. */
......
......@@ -2,7 +2,7 @@
# Jamfile to build CUnit - Source Headers Directory
# (see http://www.freetype.org/jam/index.html)
#
# Copyright (C) 2004 Jerry St.Clair
# Copyright (C) 2004-2006 Jerry St.Clair
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
......@@ -32,7 +32,8 @@ CU_HEADERS =
TestDB.h
TestRun.h
Util.h
Win.h ;
Win.h
;
if $(INSTALL_DOC_DIR)
{
......
## Process this file with automake to produce Makefile.in
CUnitIncludedir=${includedir}/CUnit
AUTOMATED_INCLUDES = Automated.h
......
......@@ -2,7 +2,7 @@
# Jamfile to build CUnit - Source root Directory
# (see http://www.freetype.org/jam/index.html)
#
# Copyright (C) 2004, 2005 Jerry St.Clair
# Copyright (C) 2004-2006 Jerry St.Clair
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
......@@ -25,106 +25,130 @@ SubDirHdrs $(CUNIT_HDR_DIR) $(CUNIT_WIN_DIR) ;
# set location for target, source, and temporary files
LOCATE_TARGET = $(BUILD_DIR)$(SLASH)CUnit ;
SEARCH_SOURCE +=
$(TOP)$(SLASH)CUnit
$(TOP)$(SLASH)CUnit$(SLASH)Headers
$(TOP)$(SLASH)CUnit$(SLASH)Sources$(SLASH)Automated
$(TOP)$(SLASH)CUnit$(SLASH)Sources$(SLASH)Basic
$(TOP)$(SLASH)CUnit$(SLASH)Sources$(SLASH)Console
$(TOP)$(SLASH)CUnit$(SLASH)Sources$(SLASH)Curses
$(TOP)$(SLASH)CUnit$(SLASH)Sources$(SLASH)Framework
$(TOP)$(SLASH)CUnit$(SLASH)Sources$(SLASH)Win ;
# extra symbolic targets for building CUnit library
DEPENDS cunit CUnit libcunit : $(CUNIT_LIB_NAME)$(SUFLIB) ;
;
SOURCES =
Automated.c
Console.c
Basic.c
CUError.c
MyMem.c
TestDB.c
TestRun.c
Util.c ;
Util.c
;
if $(UNIX)
{
SOURCES += Curses.c ;
if $(BUILD_AUTOMATED)
{
SEARCH_SOURCE += $(TOP)$(SLASH)CUnit$(SLASH)Sources$(SLASH)Automated ;
SOURCES += Automated.c ;
}
else if $(NT)
{
SOURCES += Win.c ;
if $(BUILD_BASIC)
{
SEARCH_SOURCE += $(TOP)$(SLASH)CUnit$(SLASH)Sources$(SLASH)Basic ;
SOURCES += Basic.c ;
}
if $(BUILD_CONSOLE)
{
SEARCH_SOURCE += $(TOP)$(SLASH)CUnit$(SLASH)Sources$(SLASH)Console ;
SOURCES += Console.c ;
}
if $(BUILD_CURSES)
{
SEARCH_SOURCE += $(TOP)$(SLASH)CUnit$(SLASH)Sources$(SLASH)Curses ;
SOURCES += Curses.c ;
}
if $(BUILD_WINDOWS)
{
SEARCH_SOURCE += $(TOP)$(SLASH)CUnit$(SLASH)Sources$(SLASH)Win ;
SOURCES += Win.c ;
}
if $(BUILD_SHARED_LIB)
{
if $(NT)
{
# extra symbolic targets for building CUnit library
DEPENDS cunit CUnit libcunit : $(CUNIT_LIB_NAME)$(SUFSHR) ;
SubDirCcFlags -DCU_DLL -DCU_BUILD_DLL ;
Main $(CUNIT_LIB_NAME)$(SUFSHR) : $(SOURCES) ;
MakeLocate $(CUNIT_LIB_NAME)$(SUFSHR) : $(BUILD_DIR) ;
if $(BCCROOT) || ( $(TOOLSET) = BORLANDC )
{
LINKFLAGS on $(CUNIT_LIB_NAME)$(SUFSHR) += -WD -lGi ;
{
LINKFLAGS on $(CUNIT_LIB_NAME)$(SUFSHR) += -WD -lGi ;
}
else if $(MSVCNT) || ( $(TOOLSET) = VISUALC )
{
LINKFLAGS on $(CUNIT_LIB_NAME)$(SUFSHR) = $(LINKFLAGS) /DLL /IMPLIB:$(BUILD_DIR)$(SLASH)$(CUNIT_LIB_NAME)$(SUFLIB) ;
{
LINKFLAGS on $(CUNIT_LIB_NAME)$(SUFSHR) = $(LINKFLAGS) /DLL /IMPLIB:$(BUILD_DIR)$(SLASH)$(CUNIT_LIB_NAME)_dll$(SUFLIB) ;
}
else if $(MINGW) || ( $(TOOLSET) = MINGW )
{
SubDirCcFlags -fpic ;
SubDirCcFlags -fPIC ;
LINKFLAGS on $(CUNIT_LIB_NAME)$(SUFSHR) +=
-shared
libcunit_dll.def
-Wl,--out-implib,$(BUILD_DIR)$(SLASH)$(CUNIT_LIB_NAME)$(SUFLIB)
-Wl,--out-implib,$(BUILD_DIR)$(SLASH)$(CUNIT_LIB_NAME)_dll$(SUFLIB)
;
}
else
{
EXIT Building of CUnit shared library is not supported for this compiler on Windows. ;
{
EXIT Building of CUnit shared library is not supported for this compiler on Windows. ;
}
MakeImportLibrary $(CUNIT_LIB_NAME)$(SUFSHR) : $(CUNIT_LIB_NAME)$(SUFLIB) ;
MakeImportLibrary $(CUNIT_LIB_NAME)$(SUFSHR) : $(CUNIT_LIB_NAME)_dll$(SUFLIB) ;
# install import library
if $(INSTALL_LIB_DIR)
{
InstallLib $(INSTALL_LIB_DIR) : $(CUNIT_LIB_NAME)_dll$(SUFLIB) ;
{
InstallLib $(INSTALL_LIB_DIR) : $(CUNIT_LIB_NAME)_dll$(SUFLIB) ;
}
# install shared library
if $(INSTALL_BIN_DIR)
{
InstallBin $(INSTALL_BIN_DIR) : $(CUNIT_LIB_NAME)$(SUFSHR) ;
}
}
else if ( $(OS) = UNIX ) || ( $(OS) = LINUX )
else if $(UNIX) || ( $(OS) = LINUX )
{
# UNDER CONSTRUCTION - has not been tested
# extra symbolic targets for building CUnit library
DEPENDS cunit CUnit libcunit : $(CUNIT_LIB_NAME)$(SUFSHR).$(VERSION).$(RELEASE) ;
Main $(CUNIT_LIB_NAME)$(SUFSHR).$(VERSION).$(RELEASE) : $(SOURCES) ;
MakeLocate $(CUNIT_LIB_NAME)$(SUFSHR).$(VERSION).$(RELEASE) : $(BUILD_DIR) ;
CCFLAGS on $(SOURCES) += -fpic ;
CCFLAGS on $(SOURCES) += -fPIC ;
LINKFLAGS on $(CUNIT_LIB_NAME)$(SUFSHR).$(VERSION).$(RELEASE) +=
-shared
-Wl,-soname,$(BUILD_DIR)$(SLASH)$(CUNIT_LIB_NAME)$(SUFSHR).$(VERSION_MAJOR)
-Wl,-soname,$(CUNIT_LIB_NAME)$(SUFSHR).$(VERSION_MAJOR)
;
}
# install shared library
if $(INSTALL_BIN_DIR)
{
InstallBin $(INSTALL_BIN_DIR) : $(CUNIT_LIB_NAME)$(SUFSHR) ;
# install shared library
if $(INSTALL_LIB_DIR)
{
InstallLib $(INSTALL_BIN_DIR) : $(CUNIT_LIB_NAME)$(SUFSHR).$(VERSION).$(RELEASE) ;
}
}
}
else
if $(BUILD_STATIC_LIB)
{
Library $(CUNIT_LIB_NAME) : $(SOURCES) ;
MakeLocate $(CUNIT_LIB_NAME)$(SUFLIB) : $(BUILD_DIR) ;
# install static library
if $(INSTALL_LIB_DIR)
{
InstallLib $(INSTALL_LIB_DIR) : $(CUNIT_LIB_NAME)$(SUFLIB) ;
}
}
SubInclude TOP CUnit Headers ;
......
## Process this file with automake to produce Makefile.in
SUBDIRS = Sources Headers
noinst_LTLIBRARIES = libcunitautomated.la
## Process this file with automake to produce Makefile.in
noinst_LTLIBRARIES = libcunitautomated.la
libcunitautomated_la_SOURCES = \
Automated.c
noinst_LTLIBRARIES = libcunitbasic.la
## Process this file with automake to produce Makefile.in
noinst_LTLIBRARIES = libcunitbasic.la
libcunitbasic_la_SOURCES = \
Basic.c
......@@ -344,6 +344,10 @@ static void list_suites(CU_pTestRegistry pRegistry)
CU_pSuite pCurSuite = NULL;
int i;
if (NULL == pRegistry) {
pRegistry = CU_get_registry();
}
assert(NULL != pRegistry);
if (0 == pRegistry->uiNumberOfSuites) {
fprintf(stdout, "\nNo suites registered.\n");
......
noinst_LTLIBRARIES = libcunitconsole.la
## Process this file with automake to produce Makefile.in
noinst_LTLIBRARIES = libcunitconsole.la
libcunitconsole_la_SOURCES = \
Console.c
......@@ -43,7 +43,6 @@
#include <ctype.h>
#include <assert.h>
#include <string.h>
#include <math.h>
#include <curses.h>
#include "CUnit.h"
......@@ -595,7 +594,7 @@ static STATUS curses_registry_level_run(CU_pTestRegistry pRegistry)
case 'S':
read_input_string("Enter Suite Name : ", szSuiteName, STRING_LENGTH);
refresh_details_window();
if (NULL != (pSuite = CU_get_suite_by_name(szSuiteName, pRegistry))) {
if (NULL != (pSuite = CU_get_suite_by_name(szSuiteName, (NULL == pRegistry) ? pRegistry : CU_get_registry()))) {
if (STOP == curses_suite_level_run(pSuite)) {
bContinue = false;
}
......@@ -802,12 +801,17 @@ static void list_suites(CU_pTestRegistry pRegistry)
CU_pSuite pCurSuite = NULL;
int i;
if (NULL == pRegistry) {
pRegistry = CU_get_registry();
}
assert(pRegistry);
if (!create_pad(&details_pad, application_windows.pDetailsWin,
pRegistry->uiNumberOfSuites == 0 ? 1 : pRegistry->uiNumberOfSuites + 4, 256)) {
return;
}
assert(pRegistry);
if (0 == pRegistry->uiNumberOfSuites) {
mvwprintw(details_pad.pPad, 0, 0, "%s", "No test suites defined.");
refresh_details_window();
......@@ -936,9 +940,13 @@ static CU_ErrorCode curses_run_all_tests(CU_pTestRegistry pRegistry)
f_uiTotalTests = pRegistry->uiNumberOfTests;
f_uiTotalSuites = pRegistry->uiNumberOfSuites;
pOldRegistry = CU_set_registry(pRegistry);
if (NULL != pRegistry) {
pOldRegistry = CU_set_registry(pRegistry);
}
result = CU_run_all_tests();
CU_set_registry(pOldRegistry);
if (NULL != pOldRegistry) {
CU_set_registry(pOldRegistry);
}
return result;
}
......
noinst_LTLIBRARIES = libcunitcurses.la
## Process this file with automake to produce Makefile.in
noinst_LTLIBRARIES = libcunitcurses.la
libcunitcurses_la_SOURCES = \
Curses.c
## Process this file with automake to produce Makefile.in
SHARED_SOURCES = \
CUError.c \
MyMem.c \
TestDB.c \
TestRun.c \
Util.c
noinst_LTLIBRARIES = libcunitfmk.la
noinst_LIBRARIES = libcunittestfmk.a
libcunitfmk_la_SOURCES = $(SHARED_SOURCES)
if ENABLE_TEST
TEST_DEFINES = -DCUNIT_BUILD_TESTS -DCUNIT_DO_NOT_DEFINE_UNLESS_BUILDING_TESTS -DMEMTRACE
TEST_INCLUDES = -I../Test
%_test.o: %.c
$(COMPILE) $(TEST_INCLUDES) $(TEST_DEFINES) -o $@ -c $<
libcunitfmk_la_SOURCES = \
CUError.c \
MyMem.c \
TestDB.c \
TestRun.c \
Util.c
TEST_OBJECTS = \
CUError_test.o \
MyMem_test.o \
......@@ -22,5 +25,7 @@ TEST_OBJECTS = \
TestRun_test.o \
Util_test.o
noinst_LIBRARIES = libcunittestfmk.a
libcunittestfmk_a_SOURCES =
libcunittestfmk_a_LIBADD = $(TEST_OBJECTS)
endif
......@@ -1720,24 +1720,23 @@ static void test_insert_test(void)
/*--------------------------------------------------*/
static void test_cleanup_test(void)
{
char** ppName;
char* pName;
CU_pTest pTest1 = create_test("test1", NULL);
TEST_FATAL(NULL != pTest1);
ppName = &pTest1->pName;
pName = pTest1->pName;
TEST(0 != test_cunit_get_n_memevents(pTest1));
TEST(0 != test_cunit_get_n_memevents(*ppName));
TEST(0 != test_cunit_get_n_memevents(pName));
TEST(test_cunit_get_n_allocations(pTest1) != test_cunit_get_n_deallocations(pTest1));
TEST(test_cunit_get_n_allocations(*ppName) != test_cunit_get_n_deallocations(*ppName));
TEST(test_cunit_get_n_allocations(pName) != test_cunit_get_n_deallocations(pName));
cleanup_test(pTest1);
CU_FREE(pTest1);
TEST(test_cunit_get_n_allocations(pTest1) == test_cunit_get_n_deallocations(pTest1));
TEST(test_cunit_get_n_allocations(*ppName) == test_cunit_get_n_deallocations(*ppName));
TEST(test_cunit_get_n_allocations(pName) == test_cunit_get_n_deallocations(pName));
}
/*--------------------------------------------------*/
......
AUTOMATED_OBJECTS = Automated/Automated.lo
BASIC_OBJECTS = Basic/Basic.lo
CONSOLE_OBJECTS = Console/Console.lo
CURSES_OBJECTS = Curses/Curses.lo
FRAMEWORK_OBJECTS = Framework/CUError.lo Framework/MyMem.lo Framework/TestDB.lo Framework/TestRun.lo Framework/Util.lo
## Process this file with automake to produce Makefile.in
OBJECT_FILES = $(FRAMEWORK_OBJECTS)
COMPILE_DIRS = Framework
BASIC_OBJECTS_SHARED = Basic/Basic.lo
AUTOMATED_OBJECTS_SHARED = Automated/Automated.lo
CONSOLE_OBJECTS_SHARED = Console/Console.lo
CURSES_OBJECTS_SHARED = Curses/Curses.lo
FRAMEWORK_OBJECTS_SHARED = \
Framework/CUError.lo \
Framework/MyMem.lo \
Framework/TestDB.lo \
Framework/TestRun.lo \
Framework/Util.lo
FRAMEWORK_OBJECT_FILES_SHARED = $(FRAMEWORK_OBJECTS_SHARED)
FRAMEWORK_COMPILE_DIRS = Framework
if ENABLE_AUTOMATED
AUTOMATED_OBJECT_FILES_SHARED = $(AUTOMATED_OBJECTS_SHARED)
AUTOMATED_COMPILE_DIRS = Automated
endif
if ENABLE_BASIC
BASIC_OBJECT_FILES = $(BASIC_OBJECTS)
BASIC_OBJECT_FILES_SHARED = $(BASIC_OBJECTS_SHARED)
BASIC_COMPILE_DIRS = Basic
endif
if ENABLE_CONSOLE
CONSOLE_OBJECT_FILES = $(CONSOLE_OBJECTS)
CONSOLE_OBJECT_FILES_SHARED = $(CONSOLE_OBJECTS_SHARED)
CONSOLE_COMPILE_DIRS = Console
endif
if ENABLE_AUTOMATED
AUTOMATED_OBJECT_FILES = $(AUTOMATED_OBJECTS)
AUTOMATED_COMPILE_DIRS = Automated
endif
if ENABLE_CURSES
CURSES_OBJECT_FILES = $(CURSES_OBJECTS)
CURSES_OBJECT_FILES_SHARED = $(CURSES_OBJECTS_SHARED)
CURSES_COMPILE_DIRS = Curses
endif
......@@ -37,18 +44,34 @@ TEST_OBJECT_FILES = \
TEST_COMPILE_DIRS = Test
endif
COMPILE_DIRS += $(BASIC_COMPILE_DIRS) $(CONSOLE_COMPILE_DIRS) $(AUTOMATED_COMPILE_DIRS) $(CURSES_COMPILE_DIRS) . $(TEST_COMPILE_DIRS)
OBJECT_FILES += $(BASIC_OBJECT_FILES) $(CONSOLE_OBJECT_FILES) $(AUTOMATED_OBJECT_FILES) $(CURSES_OBJECT_FILES)
COMPILE_DIRS = \
$(FRAMEWORK_COMPILE_DIRS) \
$(AUTOMATED_COMPILE_DIRS) \
$(BASIC_COMPILE_DIRS) \
$(CONSOLE_COMPILE_DIRS) \
$(CURSES_COMPILE_DIRS) \
. \
$(TEST_COMPILE_DIRS)
OBJECT_FILES_SHARED = \
$(FRAMEWORK_OBJECT_FILES_SHARED) \
$(AUTOMATED_OBJECT_FILES_SHARED) \
$(BASIC_OBJECT_FILES_SHARED) \
$(CONSOLE_OBJECT_FILES_SHARED) \
$(CURSES_OBJECT_FILES_SHARED)
TEST_OBJECTS = $(TEST_OBJECT_FILES)
SUBDIRS = $(COMPILE_DIRS)
lib_LTLIBRARIES = libcunit.la
libcunit_la_SOURCES =
libcunit_la_LIBADD = $(OBJECT_FILES)
libcunit_la_LIBADD = $(OBJECT_FILES_SHARED)
libcunit_la_LDFLAGS = -version-info @LIBTOOL_CURRENT@:@LIBTOOL_REVISION@:@LIBTOOL_AGE@
noinst_LIBRARIES = libcunit_test.a
if ENABLE_TEST
noinst_LIBRARIES = libcunit_test.a
libcunit_test_a_SOURCES =
libcunit_test_a_LIBADD = $(TEST_OBJECTS)
endif
......@@ -2,7 +2,7 @@
# Jamfile to build CUnit - internal testing
# (see http://www.freetype.org/jam/index.html)
#
# Copyright (C) 2004 Jerry St.Clair
# Copyright (C) 2004-2006 Jerry St.Clair
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
......@@ -32,65 +32,76 @@ SubDirCcFlags
# set location for target, source, and temporary files
LOCATE_TARGET = $(BUILD_DIR)$(SLASH)CUnit$(SLASH)test ;
SEARCH_SOURCE +=
$(TOP)$(SLASH)CUnit
$(TOP)$(SLASH)CUnit$(SLASH)Headers
$(TOP)$(SLASH)CUnit$(SLASH)Sources$(SLASH)Automated
$(TOP)$(SLASH)CUnit$(SLASH)Sources$(SLASH)Basic
$(TOP)$(SLASH)CUnit$(SLASH)Sources$(SLASH)Console
$(TOP)$(SLASH)CUnit$(SLASH)Sources$(SLASH)Curses
$(TOP)$(SLASH)CUnit$(SLASH)Sources$(SLASH)Framework
$(TOP)$(SLASH)CUnit$(SLASH)Sources$(SLASH)Win ;
# extra symbolic targets for building test program
DEPENDS test : $(TEST_PROG)$(SUFEXE) ;
NOTFILE test ;
;
SOURCES =
test_cunit.c
Automated.c
Console.c
Basic.c
CUError.c
MyMem.c
TestDB.c
TestRun.c
Util.c ;
Util.c
;
if $(UNIX)
{
SOURCES += Curses.c ;
if $(BUILD_AUTOMATED)
{
SEARCH_SOURCE += $(TOP)$(SLASH)CUnit$(SLASH)Sources$(SLASH)Automated ;
SOURCES += Automated.c ;
}
else if $(NT)
{
SOURCES += Win.c ;
if $(BUILD_BASIC)
{
SEARCH_SOURCE += $(TOP)$(SLASH)CUnit$(SLASH)Sources$(SLASH)Basic ;
SOURCES += Basic.c ;
}
Main $(TEST_PROG) : $(SOURCES) ;
MakeLocate $(TEST_PROG)$(SUFEXE) : $(BUILD_DIR) ;
if $(UNIX)
{
LinkLibraries $(TEST_PROG) : libncurses$(SUFLIB) ;
LOCATE on libncurses$(SUFLIB) = $(SYS_LIB_DIR) ;
if $(BUILD_CONSOLE)
{
SEARCH_SOURCE += $(TOP)$(SLASH)CUnit$(SLASH)Sources$(SLASH)Console ;
SOURCES += Console.c ;
}
if $(BUILD_CURSES)
{
SEARCH_SOURCE += $(TOP)$(SLASH)CUnit$(SLASH)Sources$(SLASH)Curses ;
SOURCES += Curses.c ;
}
if $(BUILD_WINDOWS)
{
SEARCH_SOURCE += $(TOP)$(SLASH)CUnit$(SLASH)Sources$(SLASH)Win ;
SOURCES += Win.c ;
}
# extra symbolic targets for building test program
DEPENDS test : $(TEST_PROG)$(SUFEXE) ;
NOTFILE test ;
if $(NT)
if $(BUILD_TEST)
{
if ($(BCCROOT) || ($(TOOLSET) = BORLANDC))
Main $(TEST_PROG) : $(SOURCES) ;
MakeLocate $(TEST_PROG)$(SUFEXE) : $(BUILD_DIR) ;
LINKLIBS on $(TEST_PROG)$(SUFEXE) = $(SYS_LIBS) ;
if $(NT)
{
# need to fix Borland to include library location
LINKFLAGS on $(TEST_PROG)$(SUFEXE) += -L$(STDLIBPATH) -tWC ;
if ($(BCCROOT) || ($(TOOLSET) = BORLANDC))
{
# need to fix Borland to include library location
LINKFLAGS on $(TEST_PROG)$(SUFEXE) += -L$(STDLIBPATH) -tWC ;
}
else if $(MSVCNT) || $(TOOLSET) = VISUALC)
{
# VC won't allow use of local exit() without link flag
LINKFLAGS on $(TEST_PROG)$(SUFEXE) += /FORCE:MULTIPLE ;
}
}
else if $(MSVCNT) || $(TOOLSET) = VISUALC)
if $(INSTALL_TEST_DIR)
{
# VC won't allow use of local exit() without link flag
LINKFLAGS on $(TEST_PROG)$(SUFEXE) += /FORCE:MULTIPLE ;
InstallCUnitBin $(INSTALL_TEST_DIR) : $(TEST_PROG)$(SUFEXE) ;
}
}
if $(INSTALL_SHARE_DIR)
{
InstallCUnitBin $(INSTALL_SHARE_DIR)$(SLASH)Test : $(TEST_PROG)$(SUFEXE) ;
}
## Process this file with automake to produce Makefile.in
if ENABLE_TEST
testdir=${datadir}/@PACKAGE@/Test
test_PROGRAMS = test_cunit
......@@ -6,4 +9,4 @@ test_cunit_LDADD = ../libcunit_test.a
test_cunit_LDFLAGS = -L..
INCLUDES = -I../../Headers -DMEMTRACE -DCUNIT_BUILD_TESTS -DCUNIT_DO_NOT_DEFINE_UNLESS_BUILDING_TESTS
endif
* Sat Mar 17 2006 Jerry St.Clair <jds2@users.sourceforge.net>
- Finalized upgrade of configure.in, Makefile.am.
- Upgraded Jamfile set to build shared library on Linux.
- Minor changes to repository management strategy.
* Mon Feb 13 2006 Anil Kumar (anilsaharan@users.sourceforge.net)
- Modified XSL for bgcolor properties and other tags
......
......@@ -2,7 +2,7 @@
# Jamfile to build CUnit - Examples/AutomatedTest
# (see http://www.freetype.org/jam/index.html)
#
# Copyright (C) 2004 Jerry St.Clair
# Copyright (C) 2004-2006 Jerry St.Clair
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
......@@ -21,44 +21,44 @@
SubDir TOP Examples AutomatedTest ;
SubDirHdrs $(CUNIT_HDR_DIR) $(EXAMPLES_DIR) ;
if $(BUILD_SHARED_LIB) && $(NT)
if $(BUILD_EXAMPLES) && $(BUILD_AUTOMATED)
{
SubDirCcFlags -DCU_DLL ;
}
# set location for target, source, and temporary files
LOCATE_TARGET = $(BUILD_DIR)$(SLASH)Examples$(SLASH)AutomatedTest ;
SEARCH_SOURCE += $(EXAMPLES_DIR) ;
SubDirHdrs $(CUNIT_HDR_DIR) $(EXAMPLES_DIR) ;
Main AutomatedTest : AutomatedTest.c ExampleTests.c ;
LinkLibraries AutomatedTest : $(CUNIT_LIB_NAME) ;
if $(USE_DEPRECATED_NAMES)
{
Main AutomatedTest_v1 : AutomatedTest_v1.c ;
LinkLibraries AutomatedTest_v1 : $(CUNIT_LIB_NAME) ;
# set location for target, source, and temporary files
LOCATE_TARGET = $(BUILD_DIR)$(SLASH)Examples$(SLASH)AutomatedTest ;
SEARCH_SOURCE += $(EXAMPLES_DIR) ;
ObjectCcFlags AutomatedTest_v1.c : $(USE_DEPRECATED_NAMES) ;
}
Main AutomatedTest : AutomatedTest.c ExampleTests.c ;
LinkLibraries AutomatedTest$(SUFEXE) : $(CUNIT_LIB_NAME)$(SUFLIB) ;
LINKLIBS on AutomatedTest$(SUFEXE) += $(SYS_LIBS) ;
if $(NT) && ($(BCCROOT) || ($(TOOLSET) = BORLANDC))
{
# need to fix Borland to include library location
LINKFLAGS on AutomatedTest$(SUFEXE) += -L$(STDLIBPATH) -tWC ;
if $(USE_DEPRECATED_NAMES)
{ LINKFLAGS on AutomatedTest_v1$(SUFEXE) += -L$(STDLIBPATH) -tWC ; }
}
{
Main AutomatedTest_v1 : AutomatedTest_v1.c ;
LinkLibraries AutomatedTest_v1$(SUFEXE) : $(CUNIT_LIB_NAME)$(SUFLIB) ;
LINKLIBS on AutomatedTest_v1$(SUFEXE) += $(SYS_LIBS) ;
MakeLocate AutomatedTest$(SUFEXE) : $(BUILD_DIR) ;
if $(USE_DEPRECATED_NAMES)
{ MakeLocate AutomatedTest_v1$(SUFEXE) : $(BUILD_DIR) ; }
ObjectCcFlags AutomatedTest_v1.c : $(USE_DEPRECATED_NAMES) ;
}
if $(INSTALL_EXAM_DIR)
{
InstallCUnitBin $(INSTALL_EXAM_DIR)$(SLASH)Automated : AutomatedTest$(SUFEXE) ;
InstallCUnitFile $(INSTALL_EXAM_DIR)$(SLASH)Automated : README ;
if $(NT) && ($(BCCROOT) || ($(TOOLSET) = BORLANDC))
{
# need to fix Borland to include library location
LINKFLAGS on AutomatedTest$(SUFEXE) += -L$(STDLIBPATH) -tWC ;
if $(USE_DEPRECATED_NAMES)
{ LINKFLAGS on AutomatedTest_v1$(SUFEXE) += -L$(STDLIBPATH) -tWC ; }
}
MakeLocate AutomatedTest$(SUFEXE) : $(BUILD_DIR) ;
if $(USE_DEPRECATED_NAMES)
{ InstallCUnitBin $(INSTALL_EXAM_DIR)$(SLASH)Automated : AutomatedTest_v1$(SUFEXE) ; }
}
{ MakeLocate AutomatedTest_v1$(SUFEXE) : $(BUILD_DIR) ; }
if $(INSTALL_EXAM_DIR)
{
InstallCUnitBin $(INSTALL_EXAM_DIR)$(SLASH)Automated : AutomatedTest$(SUFEXE) ;
InstallCUnitFile $(INSTALL_EXAM_DIR)$(SLASH)Automated : README ;
if $(USE_DEPRECATED_NAMES)
{ InstallCUnitBin $(INSTALL_EXAM_DIR)$(SLASH)Automated : AutomatedTest_v1$(SUFEXE) ; }
}
}
\ No newline at end of file
## Process this file with automake to produce Makefile.in
exampledir=${datadir}/@PACKAGE@/Examples/Automated
if ENABLE_EXAMPLES
if ENABLE_AUTOMATED
example_PROGRAMS = AutomatedTest
AutomatedTest_SOURCES = AutomatedTest.c AutomatedTest.h
......@@ -7,4 +12,12 @@ AutomatedTest_LDADD = -lcunit -lcunitexamples
AutomatedTest_LDFLAGS = -L.. -lm
INCLUDES = -I..
if ENABLE_CURSES
AutomatedTest_LDADD += -l$(CURSES_LIB)
endif
example_DATA = README
endif
endif
......@@ -2,7 +2,7 @@
# Jamfile to build CUnit - Examples/BasicTest
# (see http://www.freetype.org/jam/index.html)
#
# Copyright (C) 2004 Jerry St.Clair
# Copyright (C) 2004-2006 Jerry St.Clair
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
......@@ -21,31 +21,29 @@
SubDir TOP Examples BasicTest ;