OSDN Git Service

inserted the relative path from configure.
[ccunit/ccunit.git] / tests / Makefile.am
index 4e8b593..6302987 100755 (executable)
@@ -1,48 +1,61 @@
 ## Process this file with automake to produce Makefile.in
-#    Copyright (C) 2003 TSUTSUMI Kikuo.
-#    This file is part of the CCUnit Library.
+##    Copyright (C) 2003, 2010 TSUTSUMI Kikuo.
+##    This file is part of the CCUnit Library.
 
-#    The CCUnit Library is free software; you can redistribute it and/or
-#    modify it under the terms of the GNU Lesser General Public License
-#    as published by the Free Software Foundation; either version 2.1 of
-#    the License, or (at your option) any later version.
+##    The CCUnit Library is free software; you can redistribute it and/or
+##    modify it under the terms of the GNU Lesser General Public License
+##    as published by the Free Software Foundation; either version 2.1 of
+##    the License, or (at your option) any later version.
 
-#    The CCUnit Library 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 Lesser General Public License for more details.
+##    The CCUnit Library 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 Lesser General Public License for more details.
 
-#    You should have received a copy of the GNU Lesser General Public
-#    License along with the CCUnit Library; see the file COPYING.LESSER.
-#    If not, write to the Free Software Foundation, Inc., 59 Temple
-#    Place - Suite 330, Boston, MA 02111-1307, USA.  
+##    You should have received a copy of the GNU Lesser General Public
+##    License along with the CCUnit Library; see the file COPYING.LESSER.
+##    If not, write to the Free Software Foundation, Inc., 59 Temple
+##    Place - Suite 330, Boston, MA 02111-1307, USA.  
 
 # $Id$
 
 check_PROGRAMS = runSuccess runFailure
-runSuccess_SOURCES = runSuccess.c suiteSuccess.c
-runFailure_SOURCES = runFailure.c suiteFailure.c
-
-runSuccess_LDADD = @TESTOBJS@ -lccunit
-runSuccess_DEPENDENCIES = @TESTOBJS@ $(top_srcdir)/src/ccunit/libccunit.a
-
-runFailure_LDADD = @FAILOBJS@ -lccunit
-runFailure_DEPENDENCIES = @FAILOBJS@ $(top_srcdir)/src/ccunit/libccunit.a
-
-EXTRA_DIST= @TESTSRCS@ @FAILSRCS@
-
-AM_CPPFLAGS=-I$(top_srcdir)/src
+runSuccess_SOURCES = runSuccess.c $(TESTSRCS)
+runFailure_SOURCES = runFailure.c $(FAILSRCS)
+nodist_runSuccess_SOURCES = suiteSuccess.c 
+nodist_runFailure_SOURCES = suiteAssert.c
+runSuccess_DEPENDENCIES = $(top_builddir)/src/ccunit/libccunit.la
+runFailure_DEPENDENCIES = $(top_builddir)/src/ccunit/libccunit.la
+
+## ls -1 test*.c | sed -e 's/^\(.*\)$/ \1 \\/' -e '$s/ \\$//'
+TESTSRCS= \
+       $(top_srcdir)/tests/testAssert.c \
+       $(top_srcdir)/tests/testReadSuite.c \
+       $(top_srcdir)/tests/testSuite.c \
+       $(top_srcdir)/tests/testSetup.c
+
+## ls -1 fail*.c | sed -e 's/^\(.*\)$/ \1 \\/' -e '$s/ \\$//'
+FAILSRCS= \
+       $(top_srcdir)/tests/failAssert.c
+
+runSuccess_LDADD = -lccunit
+runFailure_LDADD = -lccunit
+
+EXTRA_DIST=
+
+AM_CPPFLAGS=-I$(top_srcdir)/src -I$(top_builddir)/src
 AM_CFLAGS=-Wall -Werror
-AM_LDFLAGS=-L$(top_srcdir)/src/ccunit
+AM_LDFLAGS=-L$(top_builddir)/src/ccunit
+
+TESTS = runSuccess $(XFAIL_TESTS)
+XFAIL_TESTS = runFailure
 
-TESTS = ./runSuccess ./runFailure
+CLEANFILES=*~ .*~ ./\#*\# *.log suiteSuccess.c failAssert.h
 
-CLEANFILES=*~ .*~ ./\#*\# *.log suiteSuccess.c suiteFailure.c
+MAKESUITE = PATH="$(top_builddir)/src/tools:$$PATH" ccunit_makeSuite
 
-MAKESUITE=$(top_srcdir)/src/tools/ccunit_makeSuite
+suiteSuccess.c: $(TESTSRCS)
+       $(MAKESUITE) -o $@ $(TESTSRCS)
 
-suiteSuccess.c suiteFailure:: $(MAKESUITE)
-suiteSuccess.c:: @TESTSRCS@
-       $(MAKESUITE) -o $@ -v $+ /dev/null
-suiteFailure.c:: @FAILSRCS@
-       $(MAKESUITE) -o $@ -v $+ /dev/null
+suiteAssert.c: $(FAILSRCS)
+       $(MAKESUITE) -o $@ -f failAssert_suite $(FAILSRCS)