From 15b104953a57a869002236c1f020a219bbd82402 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Sat, 11 Aug 2007 09:15:35 +0000 Subject: [PATCH] merge support/Makefile.am and support/tests/Makefile.am git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19422 a592a061-630c-0410-9148-cb99ea01b6c8 --- configure.ac | 1 - src/support/Makefile.am | 41 ++++++++++++++++++- src/support/tests/Makefile.am | 40 ------------------ .../tests/{convert.cpp => check_convert.cpp} | 0 .../{filetools.cpp => check_filetools.cpp} | 0 .../{lstrings.cpp => check_lstrings.cpp} | 0 src/support/tests/pch.h | 0 src/support/tests/test_convert | 2 +- src/support/tests/test_filetools | 2 +- src/support/tests/test_lstrings | 2 +- 10 files changed, 42 insertions(+), 46 deletions(-) delete mode 100644 src/support/tests/Makefile.am rename src/support/tests/{convert.cpp => check_convert.cpp} (100%) rename src/support/tests/{filetools.cpp => check_filetools.cpp} (100%) rename src/support/tests/{lstrings.cpp => check_lstrings.cpp} (100%) delete mode 100644 src/support/tests/pch.h diff --git a/configure.ac b/configure.ac index f0a286d14b..863b7d118b 100644 --- a/configure.ac +++ b/configure.ac @@ -419,7 +419,6 @@ AC_CONFIG_FILES([Makefile src/graphics/Makefile \ src/insets/Makefile \ src/support/Makefile \ - src/support/tests/Makefile \ src/frontends/Makefile \ src/frontends/controllers/Makefile \ src/frontends/controllers/tests/Makefile \ diff --git a/src/support/Makefile.am b/src/support/Makefile.am index 6a209cdb9d..a360611194 100644 --- a/src/support/Makefile.am +++ b/src/support/Makefile.am @@ -1,7 +1,5 @@ include $(top_srcdir)/config/common.am -SUBDIRS = . tests - CLEANFILES += $(BUILT_SOURCES) EXTRA_DIST = Package.cpp.in pch.h \ @@ -107,3 +105,42 @@ s,@PROGRAM_SUFFIX@,$(program_suffix)," \ rm -f package.C ;\ mv tmp_package package.C ;\ fi + + +############################## Tests ################################## + +EXTRA_DIST += test_convert test_filetools test_lstrings regfiles + +TESTS = \ + test_convert \ + test_filetools \ + test_lstrings + +check_PROGRAMS = \ + check_convert \ + check_filetools \ + check_lstrings + +check_convert_LDADD = ../debug.o convert.o docstring.o lstrings.o unicode.o \ + qstring_helpers.o $(BOOST_LIBS) $(QT4_CORE_LIB) +check_convert_LDFLAGS = $(QT4_CORE_LDFLAGS) +check_convert_SOURCES = \ + tests/check_convert.cpp \ + tests/boost.cpp + +check_filetools_LDADD = ../debug.o libsupport.la $(BOOST_LIBS) +check_filetools_SOURCES = \ + tests/check_filetools.cpp \ + tests/boost.cpp + +check_lstrings_LDADD = ../debug.o lstrings.o convert.o docstring.o unicode.o \ + qstring_helpers.o $(QT4_CORE_LIB) +check_lstrings_LDFLAGS = $(QT4_CORE_LDFLAGS) +check_lstrings_SOURCES = \ + tests/check_lstrings.cpp \ + tests/boost.cpp + +makeregfiles: ${check_PROGRAMS} + for all in ${check_PROGRAMS} ; do \ + ./$$all > ${srcdir}/regfiles/$$all ; \ + done diff --git a/src/support/tests/Makefile.am b/src/support/tests/Makefile.am deleted file mode 100644 index 69b0a813b4..0000000000 --- a/src/support/tests/Makefile.am +++ /dev/null @@ -1,40 +0,0 @@ -include $(top_srcdir)/config/common.am - -EXTRA_DIST = pch.h test_convert test_filetools test_lstrings regfiles - -BUILT_SOURCES = $(PCH_FILE) - -TESTS = \ - test_convert \ - test_filetools \ - test_lstrings - -check_PROGRAMS = \ - convert \ - filetools \ - lstrings - -AM_CPPFLAGS += $(BOOST_INCLUDES) -I$(srcdir)/../.. - - -convert_LDADD = ../../debug.o ../convert.o ../docstring.o ../lstrings.o ../unicode.o ../qstring_helpers.o $(BOOST_REGEX) $(QT4_CORE_LIB) -convert_LDFLAGS = $(QT4_CORE_LDFLAGS) -convert_SOURCES = \ - convert.cpp \ - boost.cpp - -filetools_LDADD = ../../debug.o ../libsupport.la $(BOOST_REGEX) $(BOOST_FILESYSTEM) -filetools_SOURCES = \ - filetools.cpp \ - boost.cpp - -lstrings_LDADD = ../../debug.o ../lstrings.o ../convert.o ../docstring.o ../unicode.o ../qstring_helpers.o $(QT4_CORE_LIB) -lstrings_LDFLAGS = $(QT4_CORE_LDFLAGS) -lstrings_SOURCES = \ - lstrings.cpp \ - boost.cpp - -makeregfiles: ${check_PROGRAMS} - for all in ${check_PROGRAMS} ; do \ - ./$$all > ${srcdir}/regfiles/$$all ; \ - done diff --git a/src/support/tests/convert.cpp b/src/support/tests/check_convert.cpp similarity index 100% rename from src/support/tests/convert.cpp rename to src/support/tests/check_convert.cpp diff --git a/src/support/tests/filetools.cpp b/src/support/tests/check_filetools.cpp similarity index 100% rename from src/support/tests/filetools.cpp rename to src/support/tests/check_filetools.cpp diff --git a/src/support/tests/lstrings.cpp b/src/support/tests/check_lstrings.cpp similarity index 100% rename from src/support/tests/lstrings.cpp rename to src/support/tests/check_lstrings.cpp diff --git a/src/support/tests/pch.h b/src/support/tests/pch.h deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/src/support/tests/test_convert b/src/support/tests/test_convert index 07e1d45759..ae65fa9bee 100755 --- a/src/support/tests/test_convert +++ b/src/support/tests/test_convert @@ -1,7 +1,7 @@ #!/bin/sh regfile=`cat ${srcdir}/regfiles/convert` -output=`./convert` +output=`./check_convert` test "$regfile" = "$output" exit $? diff --git a/src/support/tests/test_filetools b/src/support/tests/test_filetools index e930a6714c..3e67aacec8 100755 --- a/src/support/tests/test_filetools +++ b/src/support/tests/test_filetools @@ -1,7 +1,7 @@ #!/bin/sh regfile=`cat ${srcdir}/regfiles/filetools` -output=`./filetools` +output=`./check_filetools` test "$regfile" = "$output" exit $? diff --git a/src/support/tests/test_lstrings b/src/support/tests/test_lstrings index 2db5bc8298..09ce1c29dc 100755 --- a/src/support/tests/test_lstrings +++ b/src/support/tests/test_lstrings @@ -1,7 +1,7 @@ #!/bin/sh regfile=`cat ${srcdir}/regfiles/lstrings` -output=`./lstrings` +output=`./check_lstrings` test "$regfile" = "$output" exit $?