You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-dev@logging.apache.org by Andreas Fester <af...@apache.org> on 2005/12/01 19:40:11 UTC
More intended commits
Hi,
I intend to commit the following patches. These should be the remaining
ones necessary for a proper autotools dist-tarball generation.
They fix the following build issues (I think they can be summarized
to LOGCXX-43, "configure/make help needed"):
- Allow to create proper dist-tarball with "make dist"
- Remove build dependency on the boost C++ library. This seemed to be
necessary for the unit tests earlier, but is not needed anymore.
- Adjusted README file to reflect this. Also, with a proper
dist-tarball, the ./autogen.sh step is obsolete (This is the
very primary reason why I got involved in this project
some months ago ;-) )
- Add all missing .cpp files to the Makefile.am's.
- Copy the data necessary for the unit tests to the build directory if
it is different from the source directory.
- The "check" target in tests/ now does the same as the ant script
by executing all test cases.
All test cases succeed with my nightly build, see the
TestsuiteResult_<date> file at http://littletux.homelinux.org/log4cxx.
Thanks,
Andreas
Index: include/log4cxx/private/Makefile.am
===================================================================
--- include/log4cxx/private/Makefile.am (Revision 349448)
+++ include/log4cxx/private/Makefile.am (Arbeitskopie)
@@ -2,3 +2,7 @@
privateinc_HEADERS= $(top_builddir)/include/log4cxx/private/*.h
log4cxx_private.h
DISTCLEANFILES = log4cxx_private.h
EXTRA_DIST = log4cxx_private.hw
+
+dist-hook:
+ -rm -f $(distdir)/log4cxx_private.h
+
Index: configure.in
===================================================================
--- configure.in (Revision 349448)
+++ configure.in (Arbeitskopie)
@@ -122,12 +122,6 @@
enable_tests=no)
fi
-AC_HAVE_LIBRARY([boost_regex],,
- enable_tests=no)
-
-AC_CHECK_HEADERS([boost/regex.hpp],,
- enable_tests=no)
-
AM_CONDITIONAL(TESTS, test x$enable_tests = xyes)
Index: src/class.cpp
===================================================================
--- src/class.cpp (Revision 349448)
+++ src/class.cpp (Arbeitskopie)
@@ -34,7 +34,7 @@
#include <log4cxx/nt/outputdebugstringappender.h>
#endif
#include <log4cxx/rolling/rollingfileappender.h>
-#ifdef LOG4CXX_HAVE_SMTP
+#if LOG4CXX_HAVE_SMTP
#include <log4cxx/net/smtpappender.h>
#endif
#include <log4cxx/net/socketappender.h>
@@ -142,7 +142,7 @@
OutputDebugStringAppender::registerClass();
#endif
RollingFileAppender::registerClass();
-#ifdef LOG4CXX_HAVE_SMTP
+#if LOG4CXX_HAVE_SMTP
// TODO:
// SMTPAppender::registerClass();
#endif
Index: src/Makefile.am
===================================================================
--- src/Makefile.am (Revision 349448)
+++ src/Makefile.am (Arbeitskopie)
@@ -86,6 +86,7 @@
odbcappender.cpp \
onlyonceerrorhandler.cpp \
optionconverter.cpp \
+ outputdebugstringappender.cpp \
outputstream.cpp \
outputstreamwriter.cpp \
patternconverter.cpp \
Index: README
===================================================================
--- README (Revision 349448)
+++ README (Arbeitskopie)
@@ -1,7 +1,7 @@
Introduction
============
Log4cxx is a port to C++ of the log4j project.
-The goal is have the same functionnalities and interfaces of log4j.
+The goal is have the same functionalities and interfaces of log4j.
Features
========
@@ -34,14 +34,13 @@
Supported OS
============
-* Linux (tested on Linux Mandrake 10.0)
+* Linux (tested on Linux Mandrake 10.0, Debian GNU/Linux 3.1)
* FreeBSD
* Windows (MSVC 6.0, MSVC 7.1 or Cygwin)
* Other POSIX OS should be supported but were not tested
Installation
============
-./autogen.sh
./configure
make
make check
@@ -64,7 +63,6 @@
=============
You will need to install
* cppunit (http://cppunit.sourceforge.net/)
-* boost regex (http://www.boost.org/)
POSIC :
* run "make check"
@@ -98,4 +96,3 @@
This library is licensed under the Apache Public License. Please read the
included license.apl for details.
-
Index: tests/input/rolling/Makefile.am
===================================================================
--- tests/input/rolling/Makefile.am (Revision 349448)
+++ tests/input/rolling/Makefile.am (Arbeitskopie)
@@ -1 +1,10 @@
EXTRA_DIST = *.xml *.properties
+
+# if we are building in a separate build tree, then copy all necessary
files
+all-local:
+ @if test "$(top_srcdir)" != "$(top_builddir)"; then \
+ echo "Copying test suite data files ..." ; \
+ list='$(EXTRA_DIST)'; for file in $$list; do \
+ find $(srcdir) -name "$$file" -exec cp {} . ';' ; \
+ done \
+ fi
Index: tests/input/xml/Makefile.am
===================================================================
--- tests/input/xml/Makefile.am (Revision 349448)
+++ tests/input/xml/Makefile.am (Arbeitskopie)
@@ -1 +1,10 @@
-EXTRA_DIST = log4j.dtd *.xml
\ No newline at end of file
+EXTRA_DIST = log4j.dtd *.xml
+
+# if we are building in a separate build tree, then copy all necessary
files
+all-local:
+ @if test "$(top_srcdir)" != "$(top_builddir)"; then \
+ echo "Copying test suite data files ..." ; \
+ list='$(EXTRA_DIST)'; for file in $$list; do \
+ find $(srcdir) -name "$$file" -exec cp {} . ';' ; \
+ done \
+ fi
Index: tests/input/performance/Makefile.am
===================================================================
--- tests/input/performance/Makefile.am (Revision 349448)
+++ tests/input/performance/Makefile.am (Arbeitskopie)
@@ -1 +1,10 @@
EXTRA_DIST = *.xml
+
+# if we are building in a separate build tree, then copy all necessary
files
+all-local:
+ @if test "$(top_srcdir)" != "$(top_builddir)"; then \
+ echo "Copying test suite data files ..." ; \
+ list='$(EXTRA_DIST)'; for file in $$list; do \
+ find $(srcdir) -name "$$file" -exec cp {} . ';' ; \
+ done \
+ fi
Index: tests/input/ndc/Makefile.am
===================================================================
--- tests/input/ndc/Makefile.am (Revision 349448)
+++ tests/input/ndc/Makefile.am (Arbeitskopie)
@@ -1 +1,10 @@
EXTRA_DIST = *.properties
+
+# if we are building in a separate build tree, then copy all necessary
files
+all-local:
+ @if test "$(top_srcdir)" != "$(top_builddir)"; then \
+ echo "Copying test suite data files ..." ; \
+ list='$(EXTRA_DIST)'; for file in $$list; do \
+ find $(srcdir) -name "$$file" -exec cp {} . ';' ; \
+ done \
+ fi
Index: tests/input/Makefile.am
===================================================================
--- tests/input/Makefile.am (Revision 349448)
+++ tests/input/Makefile.am (Arbeitskopie)
@@ -1,2 +1,11 @@
SUBDIRS = ndc performance xml rolling
EXTRA_DIST = *.properties
+
+# if we are building in a separate build tree, then copy all necessary
files
+all-local:
+ @if test "$(top_srcdir)" != "$(top_builddir)"; then \
+ echo "Copying test suite data files ..." ; \
+ list='$(EXTRA_DIST)'; for file in $$list; do \
+ find $(srcdir) -name "$$file" -exec cp {} . ';' ; \
+ done \
+ fi
Index: tests/src/db/Makefile.am
===================================================================
--- tests/src/db/Makefile.am (Revision 349448)
+++ tests/src/db/Makefile.am (Arbeitskopie)
@@ -3,8 +3,9 @@
if TESTS
noinst_LIBRARIES = libdb.a
-INCLUDES = -I$(top_srcdir)/include
+INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include
+
libdb_a_SOURCES = \
odbcappendertestcase.cpp
Index: tests/src/helpers/Makefile.am
===================================================================
--- tests/src/helpers/Makefile.am (Revision 349448)
+++ tests/src/helpers/Makefile.am (Arbeitskopie)
@@ -4,11 +4,13 @@
noinst_LIBRARIES = libhelpers.a
-INCLUDES = -I$(top_srcdir)/include
+INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include
libhelpers_a_SOURCES = \
absolutetimedateformattestcase.cpp \
cacheddateformattestcase.cpp \
+ charsetdecodertestcase.cpp \
+ charsetencodertestcase.cpp \
cyclicbuffertestcase.cpp\
datetimedateformattestcase.cpp \
iso8601dateformattestcase.cpp \
@@ -17,6 +19,7 @@
propertiestestcase.cpp \
relativetimedateformattestcase.cpp \
stringtokenizertestcase.cpp \
+ stringhelpertestcase.cpp \
timezonetestcase.cpp \
transcodertestcase.cpp \
unicodehelpertestcase.cpp
Index: tests/src/varia/Makefile.am
===================================================================
--- tests/src/varia/Makefile.am (Revision 349448)
+++ tests/src/varia/Makefile.am (Arbeitskopie)
@@ -4,8 +4,9 @@
noinst_LIBRARIES = libvaria.a
-INCLUDES = -I$(top_srcdir)/include
+INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include
+
libvaria_a_SOURCES = \
errorhandlertestcase.cpp \
levelmatchfiltertestcase.cpp \
Index: tests/src/rolling/Makefile.am
===================================================================
--- tests/src/rolling/Makefile.am (Revision 349448)
+++ tests/src/rolling/Makefile.am (Arbeitskopie)
@@ -4,7 +4,7 @@
noinst_LIBRARIES = librolling.a
-INCLUDES = -I$(top_srcdir)/include
+INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include
librolling_a_SOURCES = \
filenamepatterntestcase.cpp \
Index: tests/src/defaultinit/Makefile.am
===================================================================
--- tests/src/defaultinit/Makefile.am (Revision 349448)
+++ tests/src/defaultinit/Makefile.am (Arbeitskopie)
@@ -4,7 +4,7 @@
noinst_LIBRARIES = libdefaultinit.a
-INCLUDES = -I$(top_srcdir)/include
+INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include
libdefaultinit_a_SOURCES = \
testcase1.cpp\
Index: tests/src/pattern/Makefile.am
===================================================================
--- tests/src/pattern/Makefile.am (Revision 349448)
+++ tests/src/pattern/Makefile.am (Arbeitskopie)
@@ -5,7 +5,7 @@
noinst_LIBRARIES = libpattern.a
-INCLUDES = -I$(top_srcdir)/include
+INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include
libpattern_a_SOURCES = \
num343patternconverter.cpp \
Index: tests/src/nt/Makefile.am
===================================================================
--- tests/src/nt/Makefile.am (Revision 349448)
+++ tests/src/nt/Makefile.am (Arbeitskopie)
@@ -3,7 +3,7 @@
if TESTS
noinst_LIBRARIES = libnt.a
-INCLUDES = -I$(top_srcdir)/include
+INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include
libnt_a_SOURCES = \
nteventlogappendertestcase.cpp
Index: tests/src/net/Makefile.am
===================================================================
--- tests/src/net/Makefile.am (Revision 349448)
+++ tests/src/net/Makefile.am (Arbeitskopie)
@@ -4,10 +4,16 @@
if TESTS
noinst_LIBRARIES = libnet.a
-INCLUDES = -I$(top_srcdir)/include
+INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include
libnet_a_SOURCES = \
- socketservertestcase.cpp
+ smtpappendertestcase.cpp \
+ socketappendertestcase.cpp \
+ sockethubappendertestcase.cpp \
+ socketservertestcase.cpp \
+ syslogappendertestcase.cpp \
+ telnetappendertestcase.cpp \
+ xmlsocketappendertestcase.cpp
check: libnet.a
Index: tests/src/xml/Makefile.am
===================================================================
--- tests/src/xml/Makefile.am (Revision 349448)
+++ tests/src/xml/Makefile.am (Arbeitskopie)
@@ -5,8 +5,9 @@
noinst_LIBRARIES = libxml.a
-INCLUDES = -I$(top_srcdir)/include
+INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include
+
libxml_a_SOURCES = \
customleveltestcase.cpp \
domtestcase.cpp \
Index: tests/src/Makefile.am
===================================================================
--- tests/src/Makefile.am (Revision 349448)
+++ tests/src/Makefile.am (Arbeitskopie)
@@ -5,11 +5,13 @@
if TESTS
-INCLUDES = -I$(top_srcdir)/include
+INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include
+
noinst_PROGRAMS = testsuite shortsocketserver
testsuite_SOURCES = \
asyncappendertestcase.cpp\
+ encodingtest.cpp\
filetestcase.cpp \
hierarchythresholdtestcase.cpp\
l7dtestcase.cpp\
@@ -23,6 +25,7 @@
consoleappendertestcase.cpp\
fileappendertestcase.cpp\
rollingfileappendertestcase.cpp\
+ streamtestcase.cpp\
writerappendertestcase.cpp \
ndctestcase.cpp
@@ -41,7 +44,7 @@
-Wl,--whole-archive,xml/libxml.a,--no-whole-archive\
-Wl,--whole-archive,db/libdb.a,--no-whole-archive\
-Wl,--whole-archive,nt/libnt.a,--no-whole-archive\
- @LIBS_CPPUNIT@ -lboost_regex
+ @LIBS_CPPUNIT@
AM_CPPFLAGS = @CPPFLAGS_CPPUNIT@
@@ -67,7 +70,7 @@
shortsocketserver_LDFLAGS = \
-Wl,--whole-archive,util/libutil.a,--no-whole-archive\
-Wl,--whole-archive,xml/libxml.a,--no-whole-archive\
- @LIBS_CPPUNIT@ -lboost_regex
+ @LIBS_CPPUNIT@
shortsocketserver_DEPENDENCIES = \
util/libutil.a\
Index: tests/src/customlogger/Makefile.am
===================================================================
--- tests/src/customlogger/Makefile.am (Revision 349448)
+++ tests/src/customlogger/Makefile.am (Arbeitskopie)
@@ -5,7 +5,7 @@
noinst_LIBRARIES = libcustomlogger.a
-INCLUDES = -I$(top_srcdir)/include
+INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include
libcustomlogger_a_SOURCES = \
xlogger.cpp\
Index: tests/src/util/Makefile.am
===================================================================
--- tests/src/util/Makefile.am (Revision 349448)
+++ tests/src/util/Makefile.am (Arbeitskopie)
@@ -5,11 +5,12 @@
noinst_LIBRARIES = libutil.a
-INCLUDES = -I$(top_srcdir)/include
+INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include
libutil_a_SOURCES = \
absolutetimefilter.cpp\
absolutedateandtimefilter.cpp\
+ binarycompare.cpp\
compare.cpp\
controlfilter.cpp\
filenamefilter.cpp \
Index: tests/Makefile.am
===================================================================
--- tests/Makefile.am (Revision 349448)
+++ tests/Makefile.am (Arbeitskopie)
@@ -3,6 +3,15 @@
if TESTS
+# if we are building in a separate build tree, then copy all necessary
files
+all-local:
+ @if test "$(top_srcdir)" != "$(top_builddir)"; then \
+ echo "Copying test suite data files ..." ; \
+ list='$(EXTRA_DIST)'; for file in $$list; do \
+ find $(srcdir) -name "$$file" -exec cp {} . ';' ; \
+ done \
+ fi
+
prepare:
@if test ! -d "output"; then \
mkdir output; \
@@ -15,8 +24,14 @@
cleanOutputDir:
@rm -f output/*
-check: regression longUnit
+check: prepare run-unittest
+run-unittest: cleanOutputDir
+ @export TOTO=wonderful; \
+ export key1=value1; \
+ export key2=value2; \
+ src/testsuite +TestCase1
+
regression: Minimum Logger DOM CustomLevel \
CustomLogger PatternLayout \
HierarchyThreshold DefaultInit SocketServer \
Index: tests/witness/encoding/Makefile.am
===================================================================
--- tests/witness/encoding/Makefile.am (Revision 349448)
+++ tests/witness/encoding/Makefile.am (Arbeitskopie)
@@ -1,3 +1,12 @@
EXTRA_DIST = UTF-* \
ascii.log \
latin1.log
+
+# if we are building in a separate build tree, then copy all necessary
files
+all-local:
+ @if test "$(top_srcdir)" != "$(top_builddir)"; then \
+ echo "Copying test suite data files ..." ; \
+ list='$(EXTRA_DIST)'; for file in $$list; do \
+ find $(srcdir) -name "$$file" -exec cp {} . ';' ; \
+ done \
+ fi
Index: tests/witness/rolling/Makefile.am
===================================================================
--- tests/witness/rolling/Makefile.am (Revision 349448)
+++ tests/witness/rolling/Makefile.am (Arbeitskopie)
@@ -1,3 +1,11 @@
EXTRA_DIST = sbr-test* \
tbr-test*
+# if we are building in a separate build tree, then copy all necessary
files
+all-local:
+ @if test "$(top_srcdir)" != "$(top_builddir)"; then \
+ echo "Copying test suite data files ..." ; \
+ list='$(EXTRA_DIST)'; for file in $$list; do \
+ find $(srcdir) -name "$$file" -exec cp {} . ';' ; \
+ done \
+ fi
Index: tests/witness/ndc/Makefile.am
===================================================================
--- tests/witness/ndc/Makefile.am (Revision 349448)
+++ tests/witness/ndc/Makefile.am (Arbeitskopie)
@@ -1 +1,10 @@
EXTRA_DIST = NDC.*
+
+# if we are building in a separate build tree, then copy all necessary
files
+all-local:
+ @if test "$(top_srcdir)" != "$(top_builddir)"; then \
+ echo "Copying test suite data files ..." ; \
+ list='$(EXTRA_DIST)'; for file in $$list; do \
+ find $(srcdir) -name "$$file" -exec cp {} . ';' ; \
+ done \
+ fi
Index: tests/witness/Makefile.am
===================================================================
--- tests/witness/Makefile.am (Revision 349448)
+++ tests/witness/Makefile.am (Arbeitskopie)
@@ -12,3 +12,12 @@
fallback \
simple \
ttcc
+
+# if we are building in a separate build tree, then copy all necessary
files
+all-local:
+ @if test "$(top_srcdir)" != "$(top_builddir)"; then \
+ echo "Copying test suite data files ..." ; \
+ list='$(EXTRA_DIST)'; for file in $$list; do \
+ find $(srcdir) -name "$$file" -exec cp {} . ';' ; \
+ done \
+ fi
Re: More intended commits
Posted by Curt Arnold <ca...@apache.org>.
On Dec 1, 2005, at 12:40 PM, Andreas Fester wrote:
> Hi,
>
> I intend to commit the following patches. These should be the
> remaining
> ones necessary for a proper autotools dist-tarball generation.
>
> They fix the following build issues (I think they can be summarized
> to LOGCXX-43, "configure/make help needed"):
>
> - Allow to create proper dist-tarball with "make dist"
>
> - Remove build dependency on the boost C++ library. This seemed to be
> necessary for the unit tests earlier, but is not needed anymore.
See http://issues.apache.org/jira/browse/LOGCXX-54