Author: kpvdr
Date: 2007-09-05 11:55:05 -0400 (Wed, 05 Sep 2007)
New Revision: 905
Added:
store/trunk/cpp/docs/Makefile.am
Modified:
store/trunk/cpp/Makefile.am
store/trunk/cpp/configure.ac
store/trunk/cpp/docs/
store/trunk/cpp/docs/jrnl_tmpl.dox
store/trunk/cpp/lib/
store/trunk/cpp/lib/jrnl/jcntl.hpp
store/trunk/cpp/tests/jrnl/Makefile.am
store/trunk/cpp/tests/jrnl/Makefile.rtest
store/trunk/cpp/tests/jrnl/chk_jdata
store/trunk/cpp/tests/jrnl/rtest
Log:
Documentation now included in make; fixed minor issues
Modified: store/trunk/cpp/Makefile.am
===================================================================
--- store/trunk/cpp/Makefile.am 2007-09-04 20:37:27 UTC (rev 904)
+++ store/trunk/cpp/Makefile.am 2007-09-05 15:55:05 UTC (rev 905)
@@ -3,7 +3,7 @@
EXTRA_DIST = README
-SUBDIRS = lib tests
+SUBDIRS = lib tests docs
# Update libtool, if needed.
libtool: $(LIBTOOL_DEPS)
Modified: store/trunk/cpp/configure.ac
===================================================================
--- store/trunk/cpp/configure.ac 2007-09-04 20:37:27 UTC (rev 904)
+++ store/trunk/cpp/configure.ac 2007-09-05 15:55:05 UTC (rev 905)
@@ -164,12 +164,17 @@
# We use valgrind for the tests. See if it's available.
AC_CHECK_PROG([VALGRIND], [valgrind], [yes])
+# Also doxygen for documentation...
+AC_CHECK_PROG([do_doxygen], [doxygen], [yes])
+AM_CONDITIONAL([DOXYGEN], [test x$do_doxygen = xyes])
+
AC_CONFIG_FILES([
rhm.spec
Makefile
tests/Makefile
tests/jrnl/Makefile
lib/Makefile
+ docs/Makefile
])
AC_OUTPUT
Property changes on: store/trunk/cpp/docs
___________________________________________________________________
Name: svn:ignore
+ Makefile.in
Added: store/trunk/cpp/docs/Makefile.am
===================================================================
--- store/trunk/cpp/docs/Makefile.am (rev 0)
+++ store/trunk/cpp/docs/Makefile.am 2007-09-05 15:55:05 UTC (rev 905)
@@ -0,0 +1,29 @@
+#
+# Run doxygen to generate HTML doc.
+# Generate dependency files so its rebuilt only when needed.
+#
+
+DOXYGEN = @DOXYGEN@
+
+EXTRA_DIST = html man rhmj.pdf rhmj.ps
+
+all: doxygen
+
+doxygen:
+if DOXYGEN
+ @doxygen jrnl_tmpl.dox
+ @make -C latex
+ @cd latex; dvipdf refman.dvi refman.pdf
+ @cd latex; dvips refman.dvi -o refman.ps
+ @ln -fs latex/refman.pdf rhmj.pdf
+ @ln -fs latex/refman.ps rhmj.ps
+else
+ @echo "Doxygen not found during configuration; documentation skipped."
+endif
+
+clean-local:
+ @rm -f rhmj.pdf
+ @rm -f rhmj.ps
+ @rm -rf latex
+ @rm -rf html
+ @rm -rf man
Modified: store/trunk/cpp/docs/jrnl_tmpl.dox
===================================================================
--- store/trunk/cpp/docs/jrnl_tmpl.dox 2007-09-04 20:37:27 UTC (rev 904)
+++ store/trunk/cpp/docs/jrnl_tmpl.dox 2007-09-05 15:55:05 UTC (rev 905)
@@ -30,7 +30,7 @@
# If a relative path is entered, it will be relative to the location
# where doxygen was started. If left blank the current directory will be used.
-OUTPUT_DIRECTORY = docs
+OUTPUT_DIRECTORY =
# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
# 4096 sub-directories (in 2 levels) under the output directory of each output
@@ -459,7 +459,7 @@
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.
-INPUT = jrnl
+INPUT = ../lib/jrnl
# If the value of the INPUT tag contains directories, you can use the
# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
Property changes on: store/trunk/cpp/lib
___________________________________________________________________
Name: svn:ignore
- .deps
.libs
Makefile
Makefile.in
db-inc.h
+ .deps
.libs
Makefile
Makefile.in
db-inc.h
BdbMessageStore.loT
Modified: store/trunk/cpp/lib/jrnl/jcntl.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/jcntl.hpp 2007-09-04 20:37:27 UTC (rev 904)
+++ store/trunk/cpp/lib/jrnl/jcntl.hpp 2007-09-05 15:55:05 UTC (rev 905)
@@ -272,7 +272,7 @@
void check_status(const char* fn_name) const throw (jexception);
/**
- * \brief Write info file <basefilename>.jinf to disk
+ * \brief Write info file <basefilename>.jinf to disk
*/
void write_infofile() const throw (jexception);
Modified: store/trunk/cpp/tests/jrnl/Makefile.am
===================================================================
--- store/trunk/cpp/tests/jrnl/Makefile.am 2007-09-04 20:37:27 UTC (rev 904)
+++ store/trunk/cpp/tests/jrnl/Makefile.am 2007-09-05 15:55:05 UTC (rev 905)
@@ -1,3 +1,24 @@
+# Copyright (C) 2007 Red Hat Inc.
+#
+# This file is part of Red Hat Messaging.
+#
+# Red Hat Messaging 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.
+#
+# This 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 this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+# USA
+#
+# The GNU Lesser General Public License is available in the file COPYING.
+
abs_builddir=@abs_builddir@
AM_CXXFLAGS = $(WARNING_CFLAGS) $(CPPUNIT_CXXFLAGS) -pthread -DRHM_CLEAN -DRHM_WRONLY
-DRHM_TESTVALS
@@ -24,4 +45,4 @@
libdlclose_noop_la_SOURCES = ../dlclose_noop.c
libdlclose_noop_la_LDFLAGS = -module -rpath $(abs_builddir)
-EXTRA_DIST = $(TESTS) ftest.py
+EXTRA_DIST = $(TESTS) rtest ftest.py tests.ods rtests.csv rwtests.csv wtests.csv
Modified: store/trunk/cpp/tests/jrnl/Makefile.rtest
===================================================================
--- store/trunk/cpp/tests/jrnl/Makefile.rtest 2007-09-04 20:37:27 UTC (rev 904)
+++ store/trunk/cpp/tests/jrnl/Makefile.rtest 2007-09-05 15:55:05 UTC (rev 905)
@@ -1,9 +1,47 @@
+# Copyright (C) 2007 Red Hat Software
+#
+# This file is part of Red Hat Messaging.
+#
+# Red Hat Messaging 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.
+#
+# This file 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 this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+# USA
+#
+# The GNU Lesser General Public License is available in the file COPYING.
+
+
+# RHM Defines
+# The following defines are usable during the build of rhmj:
+# RHM_CLEAN: Writes 0xff to all unused disk space bytes. This makes debugging easier,
+# but the memcpy required incurs a performance penalty. Do not use for
+# production or performance checks.
+# RHM_TESTVALS: Uses special values (e.g. RIDs starting at 0xffeeddcc00000000 rather than
0)
+# for testing purposes, or to expose special test conditions.
+# RHM_JOWRITE: Defeats the relocation of previous journal files into a subdir, makes
+# the execution quicker provided the files are of the same size as
previous
+# run. If the files are not present, they will be created.
+# RHM_WRONLY: Defeats the test which check that a journal file has been read before it
+# overwritten. NOTE: ONLY USE FOR PERFORMANCE TESTS!
+# RHM_RDONLY: Defeats the test which check that a journal file has been written before
it
+# read. Use together with RHM_JOWRITE if test reads from previously
written
+# journal. Ensure journal contains valid entries in all files. NOTE: ONLY
USE
+# FOR PERFORMANCE TESTS!
+# Prefix each define with -D. (eg RHM_DEFINES = -DRHM_JOWRITE -DRHM_WRONLY)
+
SHELL = /bin/bash
-.SUFFIXES:
-.SUFFIXES: .cpp .o
-
RHM_JRNL_SRC_DIR = ../../lib/jrnl
+RHM_JRNL_DOC_DIR = ../../docs
VPATH = $(RHM_JRNL_SRC_DIR)
@@ -37,22 +75,33 @@
CXXFLAGS = $(RHM_DEFINES) -Wall -Wextra -Werror -Wno-shadow -Wpointer-arith -Wcast-qual
-Wcast-align -Wno-long-long -Wvolatile-register-var -Winvalid-pch -Wno-system-headers
-pedantic -ggdb -O0 -pthread $(CXXINCLUDES)
LDFLAGS = -lpthread -laio -lrt
+.SUFFIXES:
+.SUFFIXES: .cpp .o
+
.PHONY: jrtest jwtest jrwtest
default: jtest
help:
@echo "The following make options are available: (* is default)"
- @echo " *jtest: Make the journal test suite"
- @echo " jrtest: Make the journal test suite for read tests"
- @echo " jwtest: Make the journal test suite for write tests"
- @echo " jrwtest: Make the journal test suite for simultaneous write/read
tests"
- @echo " check: Run complete regression test suite; compiles with special
flags"
- @echo " clean: Clean build"
- @echo " clean-data: Clean journal data files"
- @echo " clean-all: Clean build and journal data files"
+ @echo " --- Building options ---"
+ @echo " all: Run check, build jtest and docs"
+ @echo " *jtest: Make the journal test suite"
+ @echo " jrtest: Make the journal test suite for read tests"
+ @echo " jwtest: Make the journal test suite for write tests"
+ @echo " jrwtest: Make the journal test suite for simultaneous write/read
tests"
+ @echo " --- Testing options ---"
+ @echo " check: Run complete regression test suite; compiles with special
flags"
+ @echo " --- Documentation options ---"
+ @echo " help: This help message"
+ @echo " --- Cleaning options ---"
+ @echo " clean: Clean build"
+ @echo " clean-data: Clean journal data files"
+ @echo " clean-docs: Clean documtentation"
+ @echo " clean-all: Clean build, journal data files and documentation"
-# Build all journal and test object files, produces jtest executable
+all: check jtest
+
jtest: $(JRNL_OBJ_FILES) $(JTEST_OBJ_FILES)
jrtest: RHM_DEFINES = -DRHM_JOWRITE -DRHM_RDONLY -DRHM_TESTVALS
Modified: store/trunk/cpp/tests/jrnl/chk_jdata
===================================================================
--- store/trunk/cpp/tests/jrnl/chk_jdata 2007-09-04 20:37:27 UTC (rev 904)
+++ store/trunk/cpp/tests/jrnl/chk_jdata 2007-09-05 15:55:05 UTC (rev 905)
@@ -4,7 +4,7 @@
JRNL_PAGE_SIZE=256 # Journal page size in blocks
JRNL_FILE_SIZE=12 # Journal file size in pages
let END_OFFSET=${JRNL_BLK_SIZE}*${JRNL_PAGE_SIZE}*${JRNL_FILE_SIZE}
-for f in jdata/test.*; do
+for f in jdata/test.*.jdat; do
echo $f
hexdump -C -n 1024 $f
hexdump -C -s ${END_OFFSET} $f
Modified: store/trunk/cpp/tests/jrnl/rtest
===================================================================
--- store/trunk/cpp/tests/jrnl/rtest 2007-09-04 20:37:27 UTC (rev 904)
+++ store/trunk/cpp/tests/jrnl/rtest 2007-09-05 15:55:05 UTC (rev 905)
@@ -56,7 +56,7 @@
RM_DIR="${RM} -rf"
TEST_PROG="./jtest"
CHK_PROG="./ftest.py"
-VALGRIND="valgrind -q --track-fds=yes --leak-check=full --leak-resolution=high
--show-reachable=yes --suppressions=/usr/lib/valgrind/glibc-2.5.supp"
+VALGRIND="valgrind -q --track-fds=yes --leak-check=full --leak-resolution=high
--show-reachable=yes"
MAKE="make -f Makefile.rtest"