Merge branch 'next'
This commit is contained in:
commit
6b59bc54d2
7 changed files with 20 additions and 2405 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -2,16 +2,19 @@
|
|||
*.pyc
|
||||
*~
|
||||
/ABOUT-NLS
|
||||
/Makefile.am
|
||||
/Makefile.in
|
||||
/TAGS
|
||||
/acconf.h.in
|
||||
/aclocal.m4
|
||||
/autogen.sh
|
||||
/autom4te.cache/
|
||||
/config.guess
|
||||
/config.h.in
|
||||
/config.rpath
|
||||
/config.sub
|
||||
/configure
|
||||
/configure.ac
|
||||
/depcomp
|
||||
/elisp-comp
|
||||
/install-sh
|
||||
|
|
|
|||
520
Makefile.am
520
Makefile.am
|
|
@ -1,520 +0,0 @@
|
|||
VERSION = 3.0
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
dist_man_MANS = doc/ledger.1
|
||||
SUBDIRS = po intl
|
||||
EXTRA_DIST = autogen.sh config.rpath contrib src/system.hh.in
|
||||
DISTCLEANFILES = .timestamp
|
||||
|
||||
lib_LTLIBRARIES = \
|
||||
libledger_report.la \
|
||||
libledger_data.la \
|
||||
libledger_expr.la \
|
||||
libledger_math.la \
|
||||
libledger_util.la
|
||||
|
||||
lib_cppflags = -I$(srcdir)/src -I$(srcdir)/lib \
|
||||
-I$(srcdir)/lib/utfcpp/source
|
||||
|
||||
libledger_util_la_SOURCES = \
|
||||
src/stream.cc \
|
||||
src/mask.cc \
|
||||
src/times.cc \
|
||||
src/error.cc \
|
||||
src/utils.cc \
|
||||
src/accum.cc \
|
||||
lib/sha1.cpp
|
||||
|
||||
libledger_util_la_CPPFLAGS = $(lib_cppflags)
|
||||
libledger_util_la_LDFLAGS = -release $(VERSION).0
|
||||
|
||||
libledger_math_la_SOURCES = \
|
||||
src/value.cc \
|
||||
src/balance.cc \
|
||||
src/quotes.cc \
|
||||
src/pool.cc \
|
||||
src/annotate.cc \
|
||||
src/commodity.cc \
|
||||
src/amount.cc
|
||||
|
||||
libledger_math_la_CPPFLAGS = $(lib_cppflags)
|
||||
libledger_math_la_LDFLAGS = -release $(VERSION).0
|
||||
|
||||
libledger_expr_la_SOURCES = \
|
||||
src/option.cc \
|
||||
src/format.cc \
|
||||
src/predicate.cc \
|
||||
src/scope.cc \
|
||||
src/interactive.cc \
|
||||
src/expr.cc \
|
||||
src/op.cc \
|
||||
src/parser.cc \
|
||||
src/token.cc
|
||||
|
||||
libledger_expr_la_CPPFLAGS = $(lib_cppflags)
|
||||
libledger_expr_la_LDFLAGS = -release $(VERSION).0
|
||||
|
||||
libledger_data_la_SOURCES = \
|
||||
src/compare.cc \
|
||||
src/iterators.cc \
|
||||
src/timelog.cc \
|
||||
src/textual.cc \
|
||||
src/journal.cc \
|
||||
src/archive.cc \
|
||||
src/account.cc \
|
||||
src/xact.cc \
|
||||
src/post.cc \
|
||||
src/item.cc
|
||||
|
||||
libledger_data_la_CPPFLAGS = $(lib_cppflags)
|
||||
libledger_data_la_LDFLAGS = -release $(VERSION).0
|
||||
|
||||
libledger_report_la_SOURCES = \
|
||||
src/stats.cc \
|
||||
src/generate.cc \
|
||||
src/derive.cc \
|
||||
src/emacs.cc \
|
||||
src/output.cc \
|
||||
src/precmd.cc \
|
||||
src/chain.cc \
|
||||
src/filters.cc \
|
||||
src/temps.cc \
|
||||
src/report.cc \
|
||||
src/session.cc
|
||||
|
||||
libledger_report_la_CPPFLAGS = $(lib_cppflags)
|
||||
libledger_report_la_LDFLAGS = -release $(VERSION).0
|
||||
|
||||
pkginclude_HEADERS = \
|
||||
src/utils.h \
|
||||
src/flags.h \
|
||||
src/hooks.h \
|
||||
src/error.h \
|
||||
src/times.h \
|
||||
src/mask.h \
|
||||
src/stream.h \
|
||||
src/pstream.h \
|
||||
src/unistring.h \
|
||||
src/accum.h \
|
||||
\
|
||||
src/amount.h \
|
||||
src/commodity.h \
|
||||
src/annotate.h \
|
||||
src/pool.h \
|
||||
src/quotes.h \
|
||||
src/balance.h \
|
||||
src/value.h \
|
||||
\
|
||||
src/token.h \
|
||||
src/parser.h \
|
||||
src/op.h \
|
||||
src/expr.h \
|
||||
src/scope.h \
|
||||
src/interactive.h \
|
||||
src/predicate.h \
|
||||
src/format.h \
|
||||
src/option.h \
|
||||
\
|
||||
src/item.h \
|
||||
src/post.h \
|
||||
src/xact.h \
|
||||
src/account.h \
|
||||
src/journal.h \
|
||||
src/archive.h \
|
||||
src/timelog.h \
|
||||
src/iterators.h \
|
||||
src/compare.h \
|
||||
\
|
||||
src/session.h \
|
||||
src/report.h \
|
||||
src/filters.h \
|
||||
src/temps.h \
|
||||
src/chain.h \
|
||||
src/precmd.h \
|
||||
src/derive.h \
|
||||
src/generate.h \
|
||||
src/stats.h \
|
||||
src/output.h \
|
||||
src/emacs.h \
|
||||
\
|
||||
src/global.h \
|
||||
\
|
||||
src/pyinterp.h \
|
||||
\
|
||||
lib/sha1.h \
|
||||
lib/gettext.h \
|
||||
\
|
||||
lib/utfcpp/source/utf8.h \
|
||||
lib/utfcpp/source/utf8/checked.h \
|
||||
lib/utfcpp/source/utf8/core.h \
|
||||
lib/utfcpp/source/utf8/unchecked.h
|
||||
|
||||
nodist_libledger_util_la_SOURCES = system.hh
|
||||
|
||||
BUILT_SOURCES = system.hh
|
||||
CLEANFILES = system.hh
|
||||
|
||||
system.hh: src/system.hh.in
|
||||
cp -p $< $@
|
||||
|
||||
if USE_PCH
|
||||
nodist_libledger_util_la_SOURCES += system.hh.gch
|
||||
|
||||
BUILT_SOURCES += system.hh.gch
|
||||
CLEANFILES += system.hh.gch
|
||||
|
||||
system.hh.gch: system.hh
|
||||
$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(lib_cppflags) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) \
|
||||
-o $@ $<
|
||||
endif
|
||||
|
||||
######################################################################
|
||||
|
||||
bin_PROGRAMS = ledger
|
||||
|
||||
ledger_CPPFLAGS = $(lib_cppflags)
|
||||
if HAVE_BOOST_PYTHON
|
||||
ledger_CPPFLAGS += -I$(srcdir)/python
|
||||
endif
|
||||
ledger_SOURCES = src/main.cc src/global.cc
|
||||
ledger_LDADD = $(LIBOBJS) $(lib_LTLIBRARIES) $(INTLLIBS)
|
||||
ledger_LDFLAGS = -static
|
||||
|
||||
info_TEXINFOS = doc/ledger.texi
|
||||
|
||||
dist_lisp_LISP = lisp/ledger.el lisp/timeclock.el
|
||||
ELCFILES =
|
||||
DISTCLEANFILES += ledger.elc timeclock.elc
|
||||
|
||||
all_sources = $(libledger_util_la_SOURCES) \
|
||||
$(libledger_math_la_SOURCES) \
|
||||
$(libledger_expr_la_SOURCES) \
|
||||
$(libledger_data_la_SOURCES) \
|
||||
$(libledger_report_la_SOURCES) \
|
||||
$(libledger_python_la_SOURCES) \
|
||||
src/pyledger.cc
|
||||
|
||||
all_files = $(all_sources) $(pkginclude_HEADERS)
|
||||
|
||||
######################################################################
|
||||
|
||||
if HAVE_BOOST_PYTHON
|
||||
|
||||
lib_LTLIBRARIES += libledger_python.la
|
||||
|
||||
libledger_python_la_SOURCES = \
|
||||
src/pyutils.h \
|
||||
src/pyfstream.h \
|
||||
src/py_amount.cc \
|
||||
src/py_balance.cc \
|
||||
src/py_chain.cc \
|
||||
src/py_commodity.cc \
|
||||
src/py_expr.cc \
|
||||
src/py_flags.cc \
|
||||
src/py_format.cc \
|
||||
src/py_global.cc \
|
||||
src/py_item.cc \
|
||||
src/py_journal.cc \
|
||||
src/py_post.cc \
|
||||
src/py_report.cc \
|
||||
src/py_scope.cc \
|
||||
src/py_session.cc \
|
||||
src/py_timelog.cc \
|
||||
src/py_times.cc \
|
||||
src/py_utils.cc \
|
||||
src/py_value.cc \
|
||||
src/py_xact.cc \
|
||||
src/pyinterp.cc
|
||||
|
||||
libledger_python_la_CPPFLAGS = $(lib_cppflags) -I$(srcdir)/python
|
||||
|
||||
pyexec_LTLIBRARIES = ledger.la
|
||||
|
||||
ledger_la_CPPFLAGS = $(libledger_python_la_CPPFLAGS)
|
||||
ledger_la_SOURCES = src/pyledger.cc
|
||||
ledger_la_DEPENDENCIES = $(lib_LTLIBRARIES)
|
||||
ledger_la_LDFLAGS = -avoid-version -module
|
||||
ledger_la_LIBADD = $(LIBOBJS) $(lib_LTLIBRARIES) $(INTLLIBS)
|
||||
|
||||
pkgpython_PYTHON = python/__init__.py \
|
||||
python/hello.py \
|
||||
python/server.py
|
||||
|
||||
endif
|
||||
|
||||
######################################################################
|
||||
|
||||
TESTS =
|
||||
|
||||
if HAVE_PYTHON
|
||||
TESTS += RegressTests BaselineTests ConfirmTests GenerateTests
|
||||
endif
|
||||
|
||||
if HAVE_CPPUNIT
|
||||
TESTS += \
|
||||
UtilTests \
|
||||
MathTests \
|
||||
ExprTests \
|
||||
DataTests \
|
||||
ReportTests
|
||||
endif
|
||||
|
||||
if HAVE_BOOST_PYTHON
|
||||
TESTS += PyUnitTests
|
||||
endif
|
||||
|
||||
check_PROGRAMS = $(TESTS)
|
||||
|
||||
UtilTests_SOURCES = \
|
||||
test/UnitTests.cc \
|
||||
test/UnitTests.h \
|
||||
test/UtilTests.cc \
|
||||
test/unit/t_utils.cc \
|
||||
test/unit/t_utils.h \
|
||||
test/unit/t_times.cc \
|
||||
test/unit/t_times.h
|
||||
|
||||
UtilTests_CPPFLAGS = -I$(srcdir)/test $(lib_cppflags)
|
||||
UtilTests_LDADD = libledger_util.la -lcppunit
|
||||
|
||||
MathTests_SOURCES = \
|
||||
test/UnitTests.cc \
|
||||
test/UnitTests.h \
|
||||
test/MathTests.cc \
|
||||
test/unit/t_commodity.cc \
|
||||
test/unit/t_commodity.h \
|
||||
test/unit/t_amount.cc \
|
||||
test/unit/t_amount.h \
|
||||
test/unit/t_balance.cc \
|
||||
test/unit/t_balance.h
|
||||
|
||||
MathTests_CPPFLAGS = -I$(srcdir)/test $(lib_cppflags)
|
||||
MathTests_LDADD = libledger_math.la $(UtilTests_LDADD)
|
||||
|
||||
ExprTests_SOURCES = \
|
||||
test/UnitTests.cc \
|
||||
test/UnitTests.h \
|
||||
test/ExprTests.cc \
|
||||
test/unit/t_expr.cc \
|
||||
test/unit/t_expr.h
|
||||
|
||||
ExprTests_CPPFLAGS = -I$(srcdir)/test $(lib_cppflags)
|
||||
ExprTests_LDADD = libledger_expr.la $(MathTests_LDADD)
|
||||
|
||||
DataTests_SOURCES = \
|
||||
test/UnitTests.cc \
|
||||
test/UnitTests.h \
|
||||
test/DataTests.cc
|
||||
|
||||
DataTests_CPPFLAGS = -I$(srcdir)/test $(lib_cppflags)
|
||||
DataTests_LDADD = libledger_data.la $(ExprTests_LDADD)
|
||||
|
||||
ReportTests_SOURCES = \
|
||||
test/UnitTests.cc \
|
||||
test/UnitTests.h \
|
||||
test/ReportTests.cc
|
||||
|
||||
ReportTests_CPPFLAGS = -I$(srcdir)/test $(lib_cppflags)
|
||||
ReportTests_LDADD = libledger_report.la $(DataTests_LDADD)
|
||||
|
||||
all_tests_sources = \
|
||||
$(UtilTests_SOURCES) \
|
||||
$(MathTests_SOURCES) \
|
||||
$(ExprTests_SOURCES) \
|
||||
$(DataTests_SOURCES) \
|
||||
$(ReportTests_SOURCES)
|
||||
|
||||
PyUnitTests_SOURCES = test/PyUnitTests.py
|
||||
|
||||
all_py_tests_sources = \
|
||||
$(patsubst test/unit/%.cc,$(top_builddir)/test/python/%.py, \
|
||||
$(filter test/unit/t_%.cc,$(all_tests_sources)))
|
||||
|
||||
test/python/%.py: test/unit/%.cc test/convert.py
|
||||
$(PYTHON) $(srcdir)/test/convert.py $< $@
|
||||
|
||||
test/python/UnitTests.py: $(all_py_tests_sources)
|
||||
@echo "from unittest import TextTestRunner, TestSuite" > $@
|
||||
@for file in $$(ls $(srcdir)/test/unit/*.cc); do \
|
||||
base=$$(basename $$file); \
|
||||
base=$$(echo $$base | sed 's/\.cc//'); \
|
||||
echo "import $$base" >> $@; \
|
||||
done
|
||||
@echo "suites = [" >> $@
|
||||
@for file in $$(ls $(srcdir)/test/unit/*.cc); do \
|
||||
base=$$(basename $$file); \
|
||||
base=$$(echo $$base | sed 's/\.cc//'); \
|
||||
echo " $$base.suite()," >> $@; \
|
||||
done
|
||||
@echo "]" >> $@
|
||||
@echo "TextTestRunner().run(TestSuite(suites))" >> $@
|
||||
|
||||
ledger_python = $(top_builddir)/ledger$(EXEEXT) python
|
||||
|
||||
ESC_python=`echo "$(ledger_python)" | sed 's/\//\\\\\//g'`
|
||||
ESC_srcdir=`echo "$(srcdir)" | sed 's/\//\\\\\//g'`
|
||||
ESC_builddir=`echo "$(top_builddir)" | sed 's/\//\\\\\//g'`
|
||||
ESC_distdir=`echo "$(distdir)" | sed 's/\//\\\\\//g'`
|
||||
|
||||
# jww (2007-05-10): This rule will not be triggered on systems that
|
||||
# define an EXEEXT.
|
||||
PyUnitTests: test/PyUnitTests.py test/python/UnitTests.py
|
||||
@cat $(srcdir)/test/PyUnitTests.py \
|
||||
| sed "s/%python%/$(ESC_python)/" \
|
||||
| sed "s/%srcdir%/$(ESC_srcdir)/g" \
|
||||
| sed "s/%builddir%/$(ESC_builddir)/g" > $@
|
||||
chmod 755 $@
|
||||
|
||||
RegressTests_SOURCES = test/RegressTests.py
|
||||
|
||||
EXTRA_DIST += test/regress test/convert.py test/LedgerHarness.py
|
||||
|
||||
RegressTests: $(srcdir)/test/RegressTests.py
|
||||
echo "$(PYTHON) $(srcdir)/test/RegressTests.py $(top_builddir)/ledger$(EXEEXT) $(srcdir)/test/regress \"\$$@\"" > $@
|
||||
chmod 755 $@
|
||||
|
||||
BaselineTests_SOURCES = test/RegressTests.py
|
||||
|
||||
EXTRA_DIST += test/baseline
|
||||
|
||||
BaselineTests: $(srcdir)/test/RegressTests.py
|
||||
echo "$(PYTHON) $(srcdir)/test/RegressTests.py $(top_builddir)/ledger$(EXEEXT) $(srcdir)/test/baseline \"\$$@\"" > $@
|
||||
chmod 755 $@
|
||||
|
||||
ConfirmTests_SOURCES = test/ConfirmTests.py
|
||||
|
||||
EXTRA_DIST += test/input
|
||||
|
||||
test/input/mondo.dat: test/input/standard.dat
|
||||
@for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 ; do \
|
||||
for j in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 ; do \
|
||||
cat $< >> $@; \
|
||||
done; \
|
||||
done
|
||||
|
||||
ConfirmTests: $(srcdir)/test/ConfirmTests.py
|
||||
echo "$(PYTHON) $(srcdir)/test/ConfirmTests.py $(top_builddir)/ledger$(EXEEXT) $(srcdir)/test/input \"\$$@\"" > $@
|
||||
chmod 755 $@
|
||||
|
||||
GenerateTests_SOURCES = test/GenerateTests.py
|
||||
|
||||
GenerateTests: $(srcdir)/test/GenerateTests.py
|
||||
echo "$(PYTHON) $(srcdir)/test/GenerateTests.py $(top_builddir)/ledger$(EXEEXT) 1 20 \"\$$@\"" > $@
|
||||
chmod 755 $@
|
||||
|
||||
FULLCHECK=$(srcdir)/test/fullcheck.sh
|
||||
|
||||
if HAVE_CPPUNIT
|
||||
cppunittests: check
|
||||
@sh $(FULLCHECK) $(top_builddir)/UtilTests$(EXEEXT) --verify \
|
||||
2>&1 | grep -v '^GuardMalloc:'
|
||||
@sh $(FULLCHECK) $(top_builddir)/MathTests$(EXEEXT) --verify \
|
||||
2>&1 | grep -v '^GuardMalloc:'
|
||||
@sh $(FULLCHECK) $(top_builddir)/ExprTests$(EXEEXT) --verify \
|
||||
2>&1 | grep -v '^GuardMalloc:'
|
||||
@sh $(FULLCHECK) $(top_builddir)/DataTests$(EXEEXT) --verify \
|
||||
2>&1 | grep -v '^GuardMalloc:'
|
||||
@sh $(FULLCHECK) $(top_builddir)/ReportTests$(EXEEXT) --verify \
|
||||
2>&1 | grep -v '^GuardMalloc:'
|
||||
else
|
||||
cppunittests: check
|
||||
@test 1 -eq 1
|
||||
endif
|
||||
|
||||
fullcheck: cppunittests
|
||||
@$(top_builddir)/RegressTests --verify
|
||||
@$(top_builddir)/BaselineTests --verify
|
||||
@$(top_builddir)/ConfirmTests --verify
|
||||
@$(top_builddir)/GenerateTests --verify
|
||||
@$(top_builddir)/RegressTests --gmalloc
|
||||
@$(top_builddir)/BaselineTests --gmalloc
|
||||
# @$(top_builddir)/ConfirmTests --gmalloc
|
||||
# @$(top_builddir)/GenerateTests --gmalloc
|
||||
|
||||
######################################################################
|
||||
|
||||
EXTRA_DIST += doc/README doc/LICENSE doc/NEWS doc/ledger.pdf
|
||||
if USE_DOXYGEN
|
||||
EXTRA_DIST += doc/Doxyfile doc/refman.pdf
|
||||
endif
|
||||
|
||||
DISTCLEANFILES += doc/ledger.info doc/ledger.pdf
|
||||
if USE_DOXYGEN
|
||||
DISTCLEANFILES += Doxyfile.gen doc/Doxyfile.bak doc/refman.pdf
|
||||
endif
|
||||
|
||||
if USE_DOXYGEN
|
||||
dist-hook-doxygen:
|
||||
find $(distdir)/doc -name .dirstamp -delete
|
||||
rm -fr $(distdir)/doc/latex \
|
||||
$(distdir)/doc/Doxyfile.bak \
|
||||
$(distdir)/doc/Doxyfile.gen
|
||||
cp -pR doc/html $(distdir)/doc
|
||||
else
|
||||
dist-hook-doxygen:
|
||||
@test 1 -eq 1
|
||||
endif
|
||||
|
||||
dist-hook: dist-hook-doxygen
|
||||
find $(distdir) -name .DS_Store -delete
|
||||
find $(distdir) -name .localized -delete
|
||||
rm -f $(distdir)/README.textile
|
||||
cp -p $(srcdir)/doc/README $(distdir)/README
|
||||
|
||||
if USE_DOXYGEN
|
||||
distclean-local-doxygen:
|
||||
rm -fr doc/html doc/latex
|
||||
rm -f doc/refman.pdf
|
||||
else
|
||||
distclean-local-doxygen:
|
||||
@test 1 -eq 1
|
||||
endif
|
||||
|
||||
distclean-local: distclean-local-doxygen
|
||||
rm -fr test/python
|
||||
|
||||
if USE_DOXYGEN
|
||||
ESC_top_builddir=`cd $(top_builddir); pwd | sed 's/\//\\\\\//g'`
|
||||
|
||||
Doxyfile.gen: doc/Doxyfile
|
||||
cat $< | sed "s/%srcdir%/$(ESC_srcdir)/g" \
|
||||
| sed "s/%builddir%/$(ESC_top_builddir)/g" > $@
|
||||
|
||||
doc/html/index.html: Doxyfile.gen $(all_files)
|
||||
BUILD_DIR=`cd $(top_builddir); pwd`; \
|
||||
(cd $(srcdir); doxygen $$BUILD_DIR/Doxyfile.gen)
|
||||
|
||||
# The intention with the following rules is that all of the Doxygen
|
||||
# documentation (both HTML and PDF) is built locally before distcheck is
|
||||
# run, since it's quite possible that the user will not have a complete
|
||||
# TeX + Doxygen + dot environment on their own system.
|
||||
|
||||
doc/refman.pdf: doc/html/index.html
|
||||
(cd doc/latex && make)
|
||||
cp doc/latex/refman.pdf $@
|
||||
|
||||
docs: pdf doc/refman.pdf
|
||||
else
|
||||
docs: pdf
|
||||
endif
|
||||
|
||||
libs:
|
||||
@echo Building dependency libs and installing in /usr/local/stow ...
|
||||
git submodule update --init
|
||||
(cd lib; make)
|
||||
|
||||
report: all
|
||||
-rm -fr build
|
||||
lcov -d $(shell pwd) --zerocounters
|
||||
-mkdir doc/report
|
||||
lcov -c -i -d $(shell pwd) -o doc/report/ledger_base.info
|
||||
make fullcheck
|
||||
lcov -c -d $(shell pwd) --checksum -o doc/report/ledger_test.info
|
||||
lcov -a doc/report/ledger_base.info \
|
||||
-a doc/report/ledger_test.info -o doc/report/ledger_total.info
|
||||
lcov --extract doc/report/ledger_total.info '*src/ledger/*' \
|
||||
-o doc/report/ledger_cov.info
|
||||
genhtml -o doc/report doc/report/ledger_cov.info
|
||||
@echo Coverage reported generated\; now open doc/report/index.html
|
||||
|
||||
# Makefile.am ends here
|
||||
5
acprep
5
acprep
|
|
@ -976,9 +976,8 @@ class PrepareBuild(CommandLineApp):
|
|||
self.sys_include_dirs.remove('/usr/local/stow/cppunit/include')
|
||||
self.sys_library_dirs.remove('/usr/local/stow/cppunit/lib')
|
||||
|
||||
if exists('/usr/local/stow/cppunit-debug/include'):
|
||||
self.sys_include_dirs.insert(0, '/usr/local/stow/cppunit-debug/include')
|
||||
self.sys_library_dirs.insert(0, '/usr/local/stow/cppunit-debug/lib')
|
||||
self.sys_include_dirs.insert(0, '/usr/local/stow/cppunit-debug/include')
|
||||
self.sys_library_dirs.insert(0, '/usr/local/stow/cppunit-debug/lib')
|
||||
|
||||
if exists('/opt/local/lib/libboost_regex-d.a'):
|
||||
self.envvars['BOOST_HOME'] = '/opt/local'
|
||||
|
|
|
|||
1491
autogen.sh
1491
autogen.sh
File diff suppressed because it is too large
Load diff
391
configure.ac
391
configure.ac
|
|
@ -1,391 +0,0 @@
|
|||
# -*- Autoconf -*-
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.61)
|
||||
|
||||
m4_include([version.m4])
|
||||
|
||||
AC_INIT([ledger],[VERSION_NUMBER],[johnw@newartisans.com])
|
||||
|
||||
AC_CONFIG_AUX_DIR([.])
|
||||
AM_INIT_AUTOMAKE([dist-bzip2 foreign])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
AC_CONFIG_SRCDIR([src/main.cc])
|
||||
AC_CONFIG_HEADER([config.h])
|
||||
|
||||
# Checks for programs.
|
||||
AC_USE_SYSTEM_EXTENSIONS
|
||||
AC_PROG_CXX
|
||||
AC_PROG_MAKE_SET
|
||||
AC_PROG_LIBTOOL
|
||||
AM_GNU_GETTEXT
|
||||
AM_GNU_GETTEXT_VERSION([0.17])
|
||||
|
||||
# Checks for emacs lisp path
|
||||
AM_PATH_LISPDIR
|
||||
|
||||
# Check for options
|
||||
AC_ARG_ENABLE(debug,
|
||||
[ --enable-debug Turn on debugging],
|
||||
[case "${enableval}" in
|
||||
yes) debug=true ;;
|
||||
no) debug=false ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
|
||||
esac],[debug=false])
|
||||
|
||||
if [ test x$debug = xtrue ]; then
|
||||
AC_DEFINE([DEBUG_MODE], [1], [Whether debugging is enabled])
|
||||
fi
|
||||
AM_CONDITIONAL(DEBUG, test x$debug = xtrue)
|
||||
|
||||
AC_ARG_ENABLE(pch,
|
||||
[ --enable-pch Use GCC 4.x pre-compiled headers],
|
||||
[case "${enableval}" in
|
||||
yes) pch=true ;;
|
||||
no) pch=false ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for --enable-pch) ;;
|
||||
esac],[pch=false])
|
||||
|
||||
if [ test x$pch = xtrue ]; then
|
||||
AC_DEFINE([USE_PCH], [1], [Whether pre-compiled headers are being used])
|
||||
fi
|
||||
AM_CONDITIONAL(USE_PCH, test x$pch = xtrue)
|
||||
|
||||
AC_ARG_ENABLE(doxygen,
|
||||
[ --enable-doxygen Turns on generation of code documentation],
|
||||
[case "${enableval}" in
|
||||
yes) doxygen=true ;;
|
||||
no) doxygen=false ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for --enable-doxygen) ;;
|
||||
esac],[doxygen=false])
|
||||
|
||||
AM_CONDITIONAL(USE_DOXYGEN, test x$doxygen = xtrue)
|
||||
|
||||
AC_ARG_WITH(boost-suffix,
|
||||
[ --with-boost-suffix=X Append X to the Boost library names],
|
||||
[BOOST_SUFFIX="${withval}"],
|
||||
[BOOST_SUFFIX=""])
|
||||
|
||||
AC_SUBST([BOOST_SUFFIX], $BOOST_SUFFIX)
|
||||
|
||||
# check if UNIX pipes are available
|
||||
AC_CACHE_CHECK(
|
||||
[if pipes can be used],
|
||||
[pipes_avail_cv_],
|
||||
[AC_LANG_PUSH(C++)
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>]],
|
||||
[[int status, pfd[2];
|
||||
status = pipe(pfd);
|
||||
status = fork();
|
||||
if (status < 0) {
|
||||
;
|
||||
} else if (status == 0) {
|
||||
char *arg0 = NULL;
|
||||
|
||||
status = dup2(pfd[0], STDIN_FILENO);
|
||||
|
||||
close(pfd[1]);
|
||||
close(pfd[0]);
|
||||
|
||||
execlp("", arg0, (char *)0);
|
||||
perror("execl");
|
||||
exit(1);
|
||||
} else {
|
||||
close(pfd[0]);
|
||||
}]])],
|
||||
[pipes_avail_cv_=true],
|
||||
[pipes_avail_cv_=false])
|
||||
AC_LANG_POP])
|
||||
|
||||
if [test x$pipes_avail_cv_ = xtrue ]; then
|
||||
AC_DEFINE([HAVE_UNIX_PIPES], [1], [Whether UNIX pipes are available])
|
||||
fi
|
||||
|
||||
# check for gmp
|
||||
AC_CACHE_CHECK(
|
||||
[if GMP is available],
|
||||
[libgmp_avail_cv_],
|
||||
[libgmp_save_libs=$LIBS
|
||||
LIBS="-lgmp $LIBS"
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <gmp.h>]], [[mpz_t bar;
|
||||
mpz_init(bar);
|
||||
mpz_clear(bar);]])],[libgmp_avail_cv_=true],[libgmp_avail_cv_=false])
|
||||
AC_LANG_POP
|
||||
LIBS=$libgmp_save_libs])
|
||||
|
||||
if [test x$libgmp_avail_cv_ = xtrue ]; then
|
||||
LIBS="-lgmp $LIBS"
|
||||
else
|
||||
AC_MSG_FAILURE("Could not find gmp library (set CPPFLAGS and LDFLAGS?)")
|
||||
fi
|
||||
|
||||
# check for mpfr
|
||||
AC_CACHE_CHECK(
|
||||
[if MPFR is available],
|
||||
[libmpfr_avail_cv_],
|
||||
[libmpfr_save_libs=$LIBS
|
||||
LIBS="-lmpfr $LIBS"
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <mpfr.h>]], [[mpfr_t bar;
|
||||
mpfr_init(bar);
|
||||
char * buf = NULL;
|
||||
mpfr_asprintf(&buf, "%Rf", bar);
|
||||
mpfr_clear(bar);]])],[libmpfr_avail_cv_=true],[libmpfr_avail_cv_=false])
|
||||
AC_LANG_POP
|
||||
LIBS=$libmpfr_save_libs])
|
||||
|
||||
if [test x$libmpfr_avail_cv_ = xtrue ]; then
|
||||
LIBS="-lmpfr $LIBS"
|
||||
else
|
||||
AC_MSG_FAILURE("Could not find mpfr library 2.4.0 or higher (set CPPFLAGS and LDFLAGS?)")
|
||||
fi
|
||||
|
||||
# check for edit
|
||||
AC_CACHE_CHECK(
|
||||
[if libedit is available],
|
||||
[libedit_avail_cv_],
|
||||
[libedit_save_libs=$LIBS
|
||||
LIBS="-ledit $LIBS"
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM(
|
||||
[[#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <editline/readline.h>]],
|
||||
[[rl_readline_name = const_cast<char *>("foo");
|
||||
char * line = readline(const_cast<char *>("foo: "));
|
||||
free(line);]])],[libedit_avail_cv_=true],[libedit_avail_cv_=false])
|
||||
AC_LANG_POP
|
||||
LIBS=$libedit_save_libs])
|
||||
|
||||
if [test x$libedit_avail_cv_ = xtrue ]; then
|
||||
LIBS="-ledit $LIBS"
|
||||
AC_DEFINE([HAVE_LIBEDIT], [1], [If the libedit library is available])
|
||||
fi
|
||||
|
||||
# check for boost_regex
|
||||
AC_CACHE_CHECK(
|
||||
[if boost_regex is available],
|
||||
[boost_regex_avail_cv_],
|
||||
[boost_regex_save_libs=$LIBS
|
||||
LIBS="-lboost_regex$BOOST_SUFFIX $LIBS"
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[#include <boost/regex.hpp>]],
|
||||
[[boost::regex foo_regexp("Hello, world!");]])],
|
||||
[boost_regex_avail_cv_=true],
|
||||
[boost_regex_avail_cv_=false])
|
||||
AC_LANG_POP
|
||||
LIBS=$boost_regex_save_libs])
|
||||
|
||||
if [test x$boost_regex_avail_cv_ = xtrue ]; then
|
||||
LIBS="-lboost_regex$BOOST_SUFFIX $LIBS"
|
||||
else
|
||||
AC_MSG_FAILURE("Could not find boost_regex library (set CPPFLAGS and LDFLAGS?)")
|
||||
fi
|
||||
|
||||
# check for boost_date_time
|
||||
AC_CACHE_CHECK(
|
||||
[if boost_date_time is available],
|
||||
[boost_date_time_cpplib_avail_cv_],
|
||||
[boost_date_time_save_libs=$LIBS
|
||||
LIBS="-lboost_date_time$BOOST_SUFFIX $LIBS"
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[#include <boost/date_time/posix_time/posix_time.hpp>
|
||||
#include <boost/date_time/gregorian/gregorian.hpp>
|
||||
#include <boost/date_time/local_time_adjustor.hpp>
|
||||
#include <boost/date_time/time_duration.hpp>
|
||||
|
||||
using namespace boost::posix_time;
|
||||
using namespace boost::date_time;
|
||||
|
||||
#include <ctime>
|
||||
|
||||
inline ptime time_to_system_local(const ptime& when) {
|
||||
struct std::tm tm_gmt = to_tm(when);
|
||||
return from_time_t(mktime(&tm_gmt));
|
||||
}]],
|
||||
[[ptime t10 = ptime(boost::gregorian::from_string("2007-01-15"),
|
||||
ptime::time_duration_type());
|
||||
|
||||
ptime t12 = time_to_system_local(t10);
|
||||
|
||||
return t10 != t12;]])],
|
||||
[boost_date_time_cpplib_avail_cv_=true],
|
||||
[boost_date_time_cpplib_avail_cv_=false])
|
||||
AC_LANG_POP
|
||||
LIBS=$boost_date_time_save_libs])
|
||||
|
||||
if [test x$boost_date_time_cpplib_avail_cv_ = xtrue ]; then
|
||||
LIBS="-lboost_date_time$BOOST_SUFFIX $LIBS"
|
||||
else
|
||||
AC_MSG_FAILURE("Could not find boost_date_time library (set CPPFLAGS and LDFLAGS?)")
|
||||
fi
|
||||
|
||||
# check for boost_filesystem
|
||||
AC_CACHE_CHECK(
|
||||
[if boost_filesystem is available],
|
||||
[boost_filesystem_cpplib_avail_cv_],
|
||||
[boost_filesystem_save_libs=$LIBS
|
||||
LIBS="-lboost_filesystem$BOOST_SUFFIX -lboost_system$BOOST_SUFFIX $LIBS"
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[#include <boost/filesystem/path.hpp>]],
|
||||
[[boost::filesystem::path this_path("Hello");]])],
|
||||
[boost_filesystem_cpplib_avail_cv_=true],
|
||||
[boost_filesystem_cpplib_avail_cv_=false])
|
||||
AC_LANG_POP
|
||||
LIBS=$boost_filesystem_save_libs])
|
||||
|
||||
if [test x$boost_filesystem_cpplib_avail_cv_ = xtrue ]; then
|
||||
LIBS="-lboost_filesystem$BOOST_SUFFIX -lboost_system$BOOST_SUFFIX $LIBS"
|
||||
else
|
||||
AC_MSG_FAILURE("Could not find boost_filesystem library (set CPPFLAGS and LDFLAGS?)")
|
||||
fi
|
||||
|
||||
# check for boost_iostreams
|
||||
AC_CACHE_CHECK(
|
||||
[if boost_iostreams is available],
|
||||
[boost_iostreams_cpplib_avail_cv_],
|
||||
[boost_iostreams_save_libs=$LIBS
|
||||
LIBS="-lboost_iostreams$BOOST_SUFFIX -lboost_system$BOOST_SUFFIX $LIBS"
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[#include <boost/iostreams/device/file_descriptor.hpp>
|
||||
#include <boost/iostreams/stream.hpp>]],
|
||||
[[namespace io = boost::iostreams;
|
||||
typedef io::stream<io::file_descriptor_sink> ofdstream;
|
||||
ofdstream outstream(1);]])],
|
||||
[boost_iostreams_cpplib_avail_cv_=true],
|
||||
[boost_iostreams_cpplib_avail_cv_=false])
|
||||
AC_LANG_POP
|
||||
LIBS=$boost_iostreams_save_libs])
|
||||
|
||||
if [test x$boost_iostreams_cpplib_avail_cv_ = xtrue ]; then
|
||||
LIBS="-lboost_iostreams$BOOST_SUFFIX -lboost_system$BOOST_SUFFIX $LIBS"
|
||||
else
|
||||
AC_MSG_FAILURE("Could not find boost_iostreams library (set CPPFLAGS and LDFLAGS?)")
|
||||
fi
|
||||
|
||||
# check for boost_serialization
|
||||
AC_CACHE_CHECK(
|
||||
[if boost_serialization is available],
|
||||
[boost_serialization_cpplib_avail_cv_],
|
||||
[boost_serialization_save_libs=$LIBS
|
||||
LIBS="-lboost_serialization$BOOST_SUFFIX -lboost_system$BOOST_SUFFIX $LIBS"
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[#include <boost/archive/binary_oarchive.hpp>
|
||||
#include <iostream>
|
||||
struct foo {
|
||||
int a;
|
||||
template<class Archive>
|
||||
void serialize(Archive & ar, const unsigned int) {
|
||||
ar & a;
|
||||
}
|
||||
};]],
|
||||
[[boost::archive::binary_oarchive oa(std::cout);
|
||||
foo x;
|
||||
oa << x;]])],
|
||||
[boost_serialization_cpplib_avail_cv_=true],
|
||||
[boost_serialization_cpplib_avail_cv_=false])
|
||||
AC_LANG_POP
|
||||
LIBS=$boost_serialization_save_libs])
|
||||
|
||||
if [test x$boost_serialization_cpplib_avail_cv_ = xtrue ]; then
|
||||
AC_DEFINE([HAVE_BOOST_SERIALIZATION], [1], [Whether Boost.Serialization is available])
|
||||
LIBS="-lboost_serialization$BOOST_SUFFIX $LIBS"
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_BOOST_SERIALIZATION, test x$boost_serialization_cpplib_avail_cv_ = xtrue)
|
||||
|
||||
# check for Python
|
||||
AM_PATH_PYTHON(2.4,, :)
|
||||
if [test "$PYTHON" != :]; then
|
||||
AM_CONDITIONAL(HAVE_PYTHON, true)
|
||||
AC_CACHE_CHECK(
|
||||
[if boost_python is available],
|
||||
[boost_python_cpplib_avail_cv_],
|
||||
[boost_python_save_libs=$LIBS
|
||||
LIBS="-lboost_python$BOOST_SUFFIX -lpython$PYTHON_VERSION $LIBS"
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[#include <boost/python.hpp>
|
||||
using namespace boost::python;
|
||||
class foo {};
|
||||
BOOST_PYTHON_MODULE(samp) {
|
||||
class_< foo > ("foo") ;
|
||||
}]],
|
||||
[[return 0]])],
|
||||
[boost_python_cpplib_avail_cv_=true],
|
||||
[boost_python_cpplib_avail_cv_=false])
|
||||
AC_LANG_POP
|
||||
LIBS=$boost_python_save_libs])
|
||||
|
||||
if [ test x$boost_python_cpplib_avail_cv_ = xtrue ]; then
|
||||
AC_DEFINE([HAVE_BOOST_PYTHON], [1], [Whether Boost.Python is available])
|
||||
LIBS="-lboost_python$BOOST_SUFFIX -lpython$PYTHON_VERSION $LIBS"
|
||||
fi
|
||||
else
|
||||
AM_CONDITIONAL(HAVE_PYTHON, false)
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_BOOST_PYTHON, test x$boost_python_cpplib_avail_cv_ = xtrue)
|
||||
|
||||
# check for CppUnit
|
||||
AC_CACHE_CHECK(
|
||||
[if cppunit is available],
|
||||
[cppunit_avail_cv_],
|
||||
[cppunit_save_libs=$LIBS
|
||||
LIBS="-lcppunit $LIBS"
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[#include <cppunit/CompilerOutputter.h>
|
||||
#include <cppunit/TestResult.h>
|
||||
#include <cppunit/TestResultCollector.h>
|
||||
#include <cppunit/TestRunner.h>
|
||||
#include <cppunit/TextTestProgressListener.h>
|
||||
#include <cppunit/BriefTestProgressListener.h>
|
||||
#include <cppunit/XmlOutputter.h>
|
||||
#include <cppunit/extensions/TestFactoryRegistry.h>]],
|
||||
[[CPPUNIT_NS::TestResult controller;
|
||||
CPPUNIT_NS::TestResultCollector result;]])],
|
||||
[cppunit_avail_cv_=true],
|
||||
[cppunit_avail_cv_=false])
|
||||
AC_LANG_POP
|
||||
LIBS=$cppunit_save_libs])
|
||||
|
||||
AM_CONDITIONAL(HAVE_CPPUNIT, test x$cppunit_avail_cv_ = xtrue)
|
||||
|
||||
# Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
AC_HEADER_STAT
|
||||
AC_CHECK_HEADERS([langinfo.h])
|
||||
|
||||
# Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_TYPE_SIZE_T
|
||||
AC_STRUCT_TM
|
||||
|
||||
# Checks for library functions.
|
||||
#AC_FUNC_MKTIME
|
||||
#AC_FUNC_STAT
|
||||
#AC_FUNC_STRFTIME
|
||||
AC_CHECK_FUNCS([access realpath getpwuid getpwnam isatty])
|
||||
|
||||
# Pepare the Makefiles
|
||||
AC_CONFIG_FILES([Makefile po/Makefile.in intl/Makefile])
|
||||
AC_OUTPUT
|
||||
|
|
@ -77,8 +77,10 @@ void archive_t::read_header()
|
|||
"Version number: " << std::hex << version << std::dec);
|
||||
DEBUG("archive.journal", "Number of sources: " << sources.size());
|
||||
|
||||
#if defined(DEBUG_ON)
|
||||
foreach (const journal_t::fileinfo_t& i, sources)
|
||||
DEBUG("archive.journal", "Loaded source: " << *i.filename);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -209,8 +211,10 @@ void archive_t::save(shared_ptr<journal_t> journal)
|
|||
version = ARCHIVE_VERSION;
|
||||
sources = journal->sources;
|
||||
|
||||
#if defined(DEBUG_ON)
|
||||
foreach (const journal_t::fileinfo_t& i, sources)
|
||||
DEBUG("archive.journal", "Saving source: " << *i.filename);
|
||||
#endif
|
||||
|
||||
DEBUG("archive.journal",
|
||||
"Creating archive with version " << std::hex << version << std::dec);
|
||||
|
|
|
|||
11
tools/proof
Executable file
11
tools/proof
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
git stash
|
||||
git checkout master
|
||||
|
||||
rm -fr ~/Products/ledger*
|
||||
|
||||
(./acprep -j16 --warn proof 2>&1 | tee ~/Desktop/proof.log) \
|
||||
|| notify "Ledger proof build failed"
|
||||
Loading…
Add table
Reference in a new issue