diff options
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | Makefile.am | 255 | ||||
-rwxr-xr-x | acprep | 136 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | contrib/ledger.vim (renamed from ledger.vim) | 0 | ||||
-rw-r--r-- | contrib/scripts/README (renamed from scripts/README) | 0 | ||||
-rwxr-xr-x | contrib/scripts/bal (renamed from scripts/bal) | 0 | ||||
-rwxr-xr-x | contrib/scripts/bal-huquq (renamed from scripts/bal-huquq) | 0 | ||||
-rwxr-xr-x | contrib/scripts/entry (renamed from scripts/entry) | 0 | ||||
-rwxr-xr-x | contrib/scripts/getquote (renamed from scripts/getquote) | 0 | ||||
-rwxr-xr-x | contrib/scripts/ledger-du (renamed from scripts/ledger-du) | 0 | ||||
-rwxr-xr-x | contrib/scripts/report (renamed from scripts/report) | 0 | ||||
-rwxr-xr-x | contrib/scripts/tc (renamed from scripts/tc) | 0 | ||||
-rwxr-xr-x | contrib/scripts/ti (renamed from scripts/ti) | 0 | ||||
-rwxr-xr-x | contrib/scripts/to (renamed from scripts/to) | 0 | ||||
-rwxr-xr-x | contrib/scripts/trend (renamed from scripts/trend) | 0 | ||||
-rw-r--r-- | doc/ledger.texi (renamed from ledger.texi) | 0 | ||||
-rw-r--r-- | doc/sample.dat (renamed from sample.dat) | 0 | ||||
-rw-r--r-- | lisp/ledger.el (renamed from ledger.el) | 0 | ||||
-rw-r--r-- | lisp/timeclock.el (renamed from timeclock.el) | 0 | ||||
-rw-r--r-- | python/amounts.cc (renamed from amounts.cc) | 0 | ||||
-rw-r--r-- | python/py_amount.cc (renamed from py_amount.cc) | 0 | ||||
-rw-r--r-- | python/py_commodity.cc (renamed from py_commodity.cc) | 0 | ||||
-rw-r--r-- | python/py_times.cc (renamed from py_times.cc) | 0 | ||||
-rw-r--r-- | python/py_utils.cc (renamed from py_utils.cc) | 0 | ||||
-rw-r--r-- | python/pyfstream.h (renamed from pyfstream.h) | 0 | ||||
-rw-r--r-- | python/pyinterp.cc (renamed from pyinterp.cc) | 0 | ||||
-rw-r--r-- | python/pyinterp.h (renamed from pyinterp.h) | 0 | ||||
-rw-r--r-- | python/pyledger.cc (renamed from pyledger.cc) | 0 | ||||
-rw-r--r-- | python/pyledger.h (renamed from pyledger.h) | 0 | ||||
-rw-r--r-- | python/pyutils.h (renamed from pyutils.h) | 0 | ||||
-rwxr-xr-x | python/setup.py (renamed from setup.py) | 0 | ||||
-rwxr-xr-x | python/test/PyUnitTests.py (renamed from test/python/PyUnitTests.py) | 0 | ||||
-rw-r--r-- | python/test/UnitTests.py (renamed from test/python/UnitTests.py) | 0 | ||||
-rw-r--r-- | python/test/__init__.py (renamed from test/python/__init__.py) | 0 | ||||
-rw-r--r-- | python/test/numerics/__init__.py (renamed from test/python/numerics/__init__.py) | 0 | ||||
-rw-r--r-- | python/test/numerics/t_amount.py (renamed from test/python/numerics/t_amount.py) | 0 | ||||
-rw-r--r-- | python/tuples.h (renamed from tuples.hpp) | 0 | ||||
-rw-r--r-- | src/account.cc (renamed from account.cc) | 0 | ||||
-rw-r--r-- | src/account.h (renamed from account.h) | 0 | ||||
-rw-r--r-- | src/amount.cc (renamed from amount.cc) | 0 | ||||
-rw-r--r-- | src/amount.h (renamed from amount.h) | 0 | ||||
-rw-r--r-- | src/balance.cc (renamed from balance.cc) | 0 | ||||
-rw-r--r-- | src/balance.h (renamed from balance.h) | 0 | ||||
-rw-r--r-- | src/balpair.h (renamed from balpair.h) | 0 | ||||
-rw-r--r-- | src/binary.cc (renamed from binary.cc) | 0 | ||||
-rw-r--r-- | src/binary.h (renamed from binary.h) | 0 | ||||
-rw-r--r-- | src/cache.cc (renamed from cache.cc) | 0 | ||||
-rw-r--r-- | src/cache.h (renamed from cache.h) | 0 | ||||
-rw-r--r-- | src/commodity.cc (renamed from commodity.cc) | 0 | ||||
-rw-r--r-- | src/commodity.h (renamed from commodity.h) | 0 | ||||
-rw-r--r-- | src/compare.cc (renamed from compare.cc) | 0 | ||||
-rw-r--r-- | src/compare.h (renamed from compare.h) | 0 | ||||
-rw-r--r-- | src/csv.cc (renamed from csv.cc) | 0 | ||||
-rw-r--r-- | src/csv.h (renamed from csv.h) | 0 | ||||
-rw-r--r-- | src/derive.cc (renamed from derive.cc) | 0 | ||||
-rw-r--r-- | src/derive.h (renamed from derive.h) | 0 | ||||
-rw-r--r-- | src/emacs.cc (renamed from emacs.cc) | 0 | ||||
-rw-r--r-- | src/emacs.h (renamed from emacs.h) | 0 | ||||
-rw-r--r-- | src/entry.cc (renamed from entry.cc) | 0 | ||||
-rw-r--r-- | src/entry.h (renamed from entry.h) | 0 | ||||
-rw-r--r-- | src/error.h (renamed from error.h) | 0 | ||||
-rw-r--r-- | src/expr.cc (renamed from expr.cc) | 0 | ||||
-rw-r--r-- | src/expr.h (renamed from expr.h) | 0 | ||||
-rw-r--r-- | src/fdstream.h (renamed from fdstream.hpp) | 0 | ||||
-rw-r--r-- | src/filters.cc (renamed from filters.cc) | 0 | ||||
-rw-r--r-- | src/filters.h (renamed from filters.h) | 0 | ||||
-rw-r--r-- | src/flags.h (renamed from flags.h) | 0 | ||||
-rw-r--r-- | src/format.cc (renamed from format.cc) | 0 | ||||
-rw-r--r-- | src/format.h (renamed from format.h) | 0 | ||||
-rw-r--r-- | src/gnucash.cc (renamed from gnucash.cc) | 0 | ||||
-rw-r--r-- | src/gnucash.h (renamed from gnucash.h) | 0 | ||||
-rw-r--r-- | src/handler.h (renamed from handler.h) | 0 | ||||
-rw-r--r-- | src/help.cc (renamed from help.cc) | 0 | ||||
-rw-r--r-- | src/help.h (renamed from help.h) | 0 | ||||
-rw-r--r-- | src/hooks.h (renamed from hooks.h) | 0 | ||||
-rw-r--r-- | src/iterators.cc (renamed from iterators.cc) | 0 | ||||
-rw-r--r-- | src/iterators.h (renamed from iterators.h) | 0 | ||||
-rw-r--r-- | src/journal.cc (renamed from journal.cc) | 0 | ||||
-rw-r--r-- | src/journal.h (renamed from journal.h) | 0 | ||||
-rw-r--r-- | src/ledger.h (renamed from ledger.h) | 0 | ||||
-rw-r--r-- | src/main.cc (renamed from main.cc) | 2 | ||||
-rw-r--r-- | src/mask.cc (renamed from mask.cc) | 0 | ||||
-rw-r--r-- | src/mask.h (renamed from mask.h) | 0 | ||||
-rw-r--r-- | src/ofx.cc (renamed from ofx.cc) | 0 | ||||
-rw-r--r-- | src/ofx.h (renamed from ofx.h) | 0 | ||||
-rw-r--r-- | src/op.cc (renamed from op.cc) | 0 | ||||
-rw-r--r-- | src/op.h (renamed from op.h) | 0 | ||||
-rw-r--r-- | src/option.cc (renamed from option.cc) | 0 | ||||
-rw-r--r-- | src/option.h (renamed from option.h) | 0 | ||||
-rw-r--r-- | src/output.cc (renamed from output.cc) | 0 | ||||
-rw-r--r-- | src/output.h (renamed from output.h) | 0 | ||||
-rw-r--r-- | src/parser.cc (renamed from parser.cc) | 0 | ||||
-rw-r--r-- | src/parser.h (renamed from parser.h) | 0 | ||||
-rw-r--r-- | src/predicate.h (renamed from predicate.h) | 0 | ||||
-rw-r--r-- | src/pushvar.h (renamed from pushvar.h) | 0 | ||||
-rw-r--r-- | src/qif.cc (renamed from qif.cc) | 0 | ||||
-rw-r--r-- | src/qif.h (renamed from qif.h) | 0 | ||||
-rw-r--r-- | src/quotes.cc (renamed from quotes.cc) | 0 | ||||
-rw-r--r-- | src/quotes.h (renamed from quotes.h) | 0 | ||||
-rw-r--r-- | src/reconcile.cc (renamed from reconcile.cc) | 0 | ||||
-rw-r--r-- | src/reconcile.h (renamed from reconcile.h) | 0 | ||||
-rw-r--r-- | src/report.cc (renamed from report.cc) | 0 | ||||
-rw-r--r-- | src/report.h (renamed from report.h) | 0 | ||||
-rw-r--r-- | src/scope.cc (renamed from scope.cc) | 0 | ||||
-rw-r--r-- | src/scope.h (renamed from scope.h) | 0 | ||||
-rw-r--r-- | src/session.cc (renamed from session.cc) | 0 | ||||
-rw-r--r-- | src/session.h (renamed from session.h) | 0 | ||||
-rw-r--r-- | src/system.hh (renamed from system.hh) | 0 | ||||
-rw-r--r-- | src/textual.cc (renamed from textual.cc) | 0 | ||||
-rw-r--r-- | src/textual.h (renamed from textual.h) | 0 | ||||
-rw-r--r-- | src/times.cc (renamed from times.cc) | 0 | ||||
-rw-r--r-- | src/times.h (renamed from times.h) | 0 | ||||
-rw-r--r-- | src/token.cc (renamed from token.cc) | 0 | ||||
-rw-r--r-- | src/token.h (renamed from token.h) | 0 | ||||
-rw-r--r-- | src/utils.cc (renamed from utils.cc) | 0 | ||||
-rw-r--r-- | src/utils.h (renamed from utils.h) | 0 | ||||
-rw-r--r-- | src/value.cc (renamed from value.cc) | 0 | ||||
-rw-r--r-- | src/value.h (renamed from value.h) | 0 | ||||
-rw-r--r-- | src/xact.cc (renamed from xact.cc) | 0 | ||||
-rw-r--r-- | src/xact.h (renamed from xact.h) | 0 | ||||
-rw-r--r-- | src/xml.cc (renamed from xml.cc) | 0 | ||||
-rw-r--r-- | src/xml.h (renamed from xml.h) | 0 |
123 files changed, 240 insertions, 157 deletions
@@ -71,3 +71,5 @@ ltmain.sh missing stamp-h1 texinfo.tex +*.tar.gz +*.tar.bz2 diff --git a/Makefile.am b/Makefile.am index 9dd37afe..84719bd5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,6 @@ BUILT_SOURCES = CLEANFILES = -EXTRA_DIST = LICENSE test scripts setup.py acprep valgrind.sh \ - version sample.dat ledger.vim +EXTRA_DIST = LICENSE NEWS README test contrib doc python # Files that are still only in the Ledger source tree (g200d919): # @@ -23,30 +22,27 @@ ESC_srcdir=`echo "$(srcdir)" | sed 's/\//\\\\\//g'` ESC_builddir=`echo "$(top_builddir)" | sed 's/\//\\\\\//g'` ESC_distdir=`echo "$(distdir)" | sed 's/\//\\\\\//g'` -dist-hook: - rm -fr .git - lib_LTLIBRARIES = libamounts.la libledger.la -libamounts_la_CPPFLAGS = -libamounts_la_SOURCES = \ - utils.cc \ - times.cc \ - mask.cc \ - binary.cc \ - \ - amount.cc \ - commodity.cc \ - balance.cc \ - value.cc \ - \ - token.cc \ - parser.cc \ - op.cc \ - expr.cc \ - scope.cc \ - format.cc \ - option.cc +libamounts_la_CPPFLAGS = -I$(srcdir)/src +libamounts_la_SOURCES = \ + src/utils.cc \ + src/times.cc \ + src/mask.cc \ + src/binary.cc \ + \ + src/amount.cc \ + src/commodity.cc \ + src/balance.cc \ + src/value.cc \ + \ + src/token.cc \ + src/parser.cc \ + src/op.cc \ + src/expr.cc \ + src/scope.cc \ + src/format.cc \ + src/option.cc if HAVE_EXPAT libamounts_la_CPPFLAGS += -DHAVE_EXPAT=1 @@ -65,111 +61,110 @@ libamounts_la_CPPFLAGS += -DDEBUG_MODE endif libledger_la_CPPFLAGS = $(libamounts_la_CPPFLAGS) -libledger_la_SOURCES = \ - journal.cc \ - entry.cc \ - xact.cc \ - account.cc \ - iterators.cc \ - compare.cc \ - \ - textual.cc \ - cache.cc \ - emacs.cc \ - qif.cc \ - xml.cc \ - csv.cc \ - \ - session.cc \ - report.cc \ - filters.cc \ - output.cc \ - help.cc \ - \ - derive.cc \ - reconcile.cc \ - quotes.cc +libledger_la_LDFLAGS = -release 3.0.0 +libledger_la_SOURCES = \ + src/journal.cc \ + src/entry.cc \ + src/xact.cc \ + src/account.cc \ + src/iterators.cc \ + src/compare.cc \ + \ + src/textual.cc \ + src/cache.cc \ + src/emacs.cc \ + src/qif.cc \ + src/xml.cc \ + src/csv.cc \ + \ + src/session.cc \ + src/report.cc \ + src/filters.cc \ + src/output.cc \ + src/help.cc \ + \ + src/derive.cc \ + src/reconcile.cc \ + src/quotes.cc if HAVE_EXPAT -libledger_la_SOURCES += gnucash.cc +libledger_la_SOURCES += src/gnucash.cc endif if HAVE_XMLPARSE -libledger_la_SOURCES += gnucash.cc +libledger_la_SOURCES += src/gnucash.cc endif if HAVE_LIBOFX -libledger_la_SOURCES += ofx.cc +libledger_la_SOURCES += src/ofx.cc endif -libledger_la_LDFLAGS = -release 2.7.0 - -pkginclude_HEADERS = \ - acconf.h \ - system.hh \ - fdstream.hpp \ - utils.h \ - flags.h \ - hooks.h \ - pushvar.h \ - error.h \ - times.h \ - mask.h \ - binary.h \ - \ - amount.h \ - commodity.h \ - balance.h \ - balpair.h \ - value.h \ - \ - token.h \ - parser.h \ - op.h \ - expr.h \ - scope.h \ - predicate.h \ - format.h \ - option.h \ - \ - journal.h \ - entry.h \ - xact.h \ - account.h \ - iterators.h \ - compare.h \ - \ - textual.h \ - cache.h \ - emacs.h \ - qif.h \ - xml.h \ - csv.h \ - gnucash.h \ - ofx.h \ - \ - session.h \ - report.h \ - handler.h \ - filters.h \ - output.h \ - help.h \ - \ - derive.h \ - reconcile.h \ - quotes.h \ - \ - ledger.h +pkginclude_HEADERS = \ + acconf.h \ + src/system.hh \ + src/fdstream.h \ + src/utils.h \ + src/flags.h \ + src/hooks.h \ + src/pushvar.h \ + src/error.h \ + src/times.h \ + src/mask.h \ + src/binary.h \ + \ + src/amount.h \ + src/commodity.h \ + src/balance.h \ + src/balpair.h \ + src/value.h \ + \ + src/token.h \ + src/parser.h \ + src/op.h \ + src/expr.h \ + src/scope.h \ + src/predicate.h \ + src/format.h \ + src/option.h \ + \ + src/journal.h \ + src/entry.h \ + src/xact.h \ + src/account.h \ + src/iterators.h \ + src/compare.h \ + \ + src/textual.h \ + src/cache.h \ + src/emacs.h \ + src/qif.h \ + src/xml.h \ + src/csv.h \ + src/gnucash.h \ + src/ofx.h \ + \ + src/session.h \ + src/report.h \ + src/handler.h \ + src/filters.h \ + src/output.h \ + src/help.h \ + \ + src/derive.h \ + src/reconcile.h \ + src/quotes.h \ + \ + src/ledger.h if USE_PCH -nodist_libledger_la_SOURCES = system.hh.gch +nodist_libledger_la_SOURCES = src/system.hh.gch -BUILT_SOURCES += system.hh.gch -CLEANFILES += system.hh.gch +BUILT_SOURCES += src/system.hh.gch +CLEANFILES += src/system.hh.gch -$(top_builddir)/system.hh.gch: $(srcdir)/system.hh $(top_builddir)/acconf.h +$(srcdir)/src/system.hh.gch: $(srcdir)/src/system.hh $(top_builddir)/acconf.h $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(libledger_la_CPPFLAGS) \ $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) \ - -g -o $@ $(srcdir)/system.hh + -g -o $@ $(srcdir)/src/system.hh endif ###################################################################### @@ -177,13 +172,13 @@ endif bin_PROGRAMS = ledger ledger_CPPFLAGS = $(libledger_la_CPPFLAGS) -ledger_SOURCES = main.cc +ledger_SOURCES = src/main.cc ledger_LDADD = $(LIBOBJS) libamounts.la libledger.la -ledger_LDFLAGS = -static # for the sake of command-line speed +ledger_LDFLAGS = -static -info_TEXINFOS = ledger.texi +info_TEXINFOS = doc/ledger.texi -dist_lisp_LISP = ledger.el timeclock.el +dist_lisp_LISP = lisp/ledger.el lisp/timeclock.el DISTCLEANFILES = ledger.elc timeclock.elc @@ -201,17 +196,17 @@ clean-local: PYLIBS = amounts gmp -amounts.so: amounts.cc libamounts.la +amounts.so: python/amounts.cc libamounts.la CFLAGS="$(CPPFLAGS) $(DEFAULT_INCLUDES) $(libamounts_la_CPPFLAGS)" \ LDFLAGS="$(LDFLAGS) -L. -L.libs" \ PYLIBS="$(PYLIBS)" SRCDIR="$(srcdir)" \ - python $(srcdir)/setup.py build --build-lib=. + python $(srcdir)/python/setup.py build --build-lib=. install-exec-hook: CFLAGS="$(CPPFLAGS) $(DEFAULT_INCLUDES) $(libamounts_la_CPPFLAGS)" \ LDFLAGS="$(LDFLAGS) -L. -L.libs" \ PYLIBS="$(PYLIBS)" SRCDIR="$(srcdir)" \ - python $(srcdir)/setup.py install --prefix=$(prefix) + python $(srcdir)/python/setup.py install --prefix=$(prefix) endif @@ -237,16 +232,18 @@ UnitTests_CPPFLAGS = -I$(srcdir)/test $(libledger_la_CPPFLAGS) UnitTests_LDFLAGS = $(LIBADD_DL) UnitTests_LDADD = $(lib_LTLIBRARIES) -lcppunit -nodist_PyUnitTests_SOURCES = test/python/PyUnitTests.py +nodist_PyUnitTests_SOURCES = python/test/PyUnitTests.py # jww (2007-05-10): This rule will not be triggered on systems that # define an EXEEXT. -PyUnitTests: $(srcdir)/test/python/PyUnitTests.py - cat $(srcdir)/test/python/PyUnitTests.py \ +PyUnitTests: $(srcdir)/python/test/PyUnitTests.py + cat $(srcdir)/python/test/PyUnitTests.py \ | sed "s/%srcdir%/$(ESC_srcdir)/g" \ | sed "s/%builddir%/$(ESC_builddir)/g" > $@ chmod 755 $@ +RegressionTests_SOURCES = test/regress.py + RegressionTests: $(srcdir)/test/regress.py echo "python $(srcdir)/test/regress.py $(top_builddir)/ledger$(EXEEXT) $(srcdir)/test/regress" > $@ chmod 755 $@ @@ -264,14 +261,14 @@ fullcheck: check DISTCLEANFILES += Doxyfile.gen -alldocs: ledger.info ledger.pdf doxygen-docs +alldocs: doc/ledger.info doc/ledger.pdf doxygen-docs -$(top_builddir)/Doxyfile.gen: $(srcdir)/Doxyfile - cat $(srcdir)/Doxyfile \ +$(top_builddir)/doc/Doxyfile.gen: $(srcdir)/doc/Doxyfile + cat $(srcdir)/doc/Doxyfile \ | sed "s/%srcdir%/$(ESC_srcdir)/g" \ | sed "s/%builddir%/$(ESC_builddir)/g" > $@ -doxygen-docs: $(top_builddir)/Doxyfile.gen - doxygen $(top_builddir)/Doxyfile.gen +doxygen-docs: $(top_builddir)/doc/Doxyfile.gen + doxygen $(top_builddir)/doc/Doxyfile.gen # Makefile.am ends here @@ -2,15 +2,14 @@ # acprep, version 3.0 # -# This script configures my ledger source tree on my Mac OS/X machine. -# This is not necessary, however, since I keep all the files necessary -# for building checked in to the source tree. Users can just type -# './configure && make'. This script simply sets up the compiler and -# linker flags for all the various build permutations I use for testing -# and profiling. +# This script configures my ledger source tree on my Mac OS/X machine. This +# is not necessary, however, since I keep all the files necessary for building +# checked in to the source tree. Users can just type './configure && make'. +# This script simply sets up the compiler and linker flags for all the various +# build permutations I use for testing and profiling. -export AUTOCONF_VERSION=2.61 -export AUTOMAKE_VERSION=1.9 +export AUTOCONF_VERSION=2.62 +export AUTOMAKE_VERSION=1.10.1 touch AUTHORS COPYING ChangeLog @@ -34,10 +33,6 @@ LIBDIRS="-L/usr/local/lib -L/opt/local/lib" PYTHON_HOME="/usr" -# Use the latest g++, if it's been installed (with Xcode 3.1 on OS X) -if [ -x /usr/bin/g++-4.2 ]; then - CXX=g++-4.2 -fi SYSTEM=$(uname -s) @@ -46,10 +41,9 @@ if [ $SYSTEM = Linux ]; then elif [ $SYSTEM = Solaris ]; then CXXFLAGS="-pthreads" elif [ $SYSTEM = Darwin ]; then + CXXFLAGS="" #CXXFLAGS="-arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.5.sdk" - #CXXFLAGS="$CXXFLAGS -Wno-long-double" #LIBDIRS="$LIBDIRS -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.5.sdk" - CXXFLAGS="" else CXXFLAGS="" fi @@ -82,18 +76,114 @@ CXXFLAGS="$CXXFLAGS -Wstrict-null-sentinel" CXXFLAGS="$CXXFLAGS -Wwrite-strings" +# The following are options to prepare a developer tree of Ledger for +# building: +# +# --debug +# +# Build with debugging information. This doesn't slow things down by much, +# but gives you useful stack traces to mention in your bug reports. +# Recommended if you're not running a release version. +# +# --local +# +# Prepare for building in the same directory as the sources. This is +# required for using pre-compiled headers with the --devel option (see +# below). Otherwise, if you have a directory named ~/Products, Ledger will +# build itself there. There's no option for changing that directory yet, so +# just edit this script if you need to. +# +# --boost SUFFIX +# +# Use the boost library with the given SUFFIX. Check the Boost "Getting +# Started" documentation for what the different suffixes are and what they +# mean. Usually you can see the available suffixes on your system using +# something like this command: +# +# $ ls /usr/local/lib/libboost_date_time* +# +# Here's everything that's available on my machine right now: +# +# "" - dynamic optimized Boost library +# d - dynamic debug +# s - static optimized +# sd - static debug +# mt - multi-threaded optimized +# mt-d - multi-threaded debug +# mt-s - multi-threaded static optimized +# mt-sd - multi-threaded static debug +# +# Since Ledger does not use threading, I recommend using the static +# optimized library unless you wish to build with debugging enabled. If you +# want to do that, see the --devel switch below. +# +# --devel +# +# This means you want to build like the developer does, which means: +# +# * using pre-compiled headers +# * with glibc debugging enabled +# * static linking as much as possible +# +# The glibc debugging is the only tricky part, since you must have Boost +# compiled with _GLIBCXX_DEBUG defined also -- which it won't be on your +# system by default. +# +# So, you have to roll your own set of Boost debug libraries in order to +# support this. I like this because it gives me the most amount of safety +# and checking possible, which is great for testing. Here's how I build a +# super-debugging Boost: +# +# src $ git clone git://repo.or.cz/boost.git +# src $ git checkout -b v1.35.0 svn/Version_1_35_0 +# src $ cd boost +# boost $ sudo bjam release --prefix=/usr/local/stow/boost_1_35_0 \ +# --build-dir=$HOME/Products/boost_1_35_0 --toolset=darwin \ +# architecture=combined install +# boost $ sudo bjam debug --prefix=/usr/local/stow/boost_1_35_0 \ +# --build-dir=$HOME/Products/boost_1_35_0 --toolset=darwin \ +# architecture=combined define=_GLIBCXX_DEBUG=1 install +# boost $ cd /usr/local/stow +# stow $ stow boost_1_35_0 +# +# Of course, you'll need MacPorts to do this, with both the "bjam" and "stow" +# packages installed. +# +# Now you're ready to run acprep like this: +# +# $ ./acprep --local --devel --debug --boost sd +# +# Or, as I do it: +# +# $ ./myacprep +# + while [ -n "$1" ]; do case "$1" in --devel) - SWITCHES="$SWITCHES --disable-shared --enable-pch" - CPPFLAGS="$CPPFLAGS -DBOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING=1" - CPPFLAGS="$CPPFLAGS -DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE=1" + #SWITCHES="$SWITCHES --disable-shared --enable-pch" + SWITCHES="$SWITCHES --disable-shared" + # The use of this flag requires that Boost be also build with + # _GLIBCXX_DEBUG. + CPPFLAGS="$CPPFLAGS -D_GLIBCXX_DEBUG=1" + LIBS="" + #if [ -f /opt/local/lib/libexpat.a ]; then + # LIBS="$LIBS /opt/local/lib/libexpat.a" + #fi + #if [ -f /opt/local/lib/libgmp.a ]; then + # LIBS="$LIBS /opt/local/lib/libgmp.a" + #fi + #if [ -f /usr/lib/gcc/i686-apple-darwin9/4.2.1/libgcc_static.a ]; then + # LIBS="$LIBS /usr/lib/gcc/i686-apple-darwin9/4.2.1/libgcc_static.a" + #fi shift 1 ;; --debug) SWITCHES="$SWITCHES --enable-debug" - #CPPFLAGS="$CPPFLAGS -D_GLIBCXX_DEBUG=1" + CPPFLAGS="$CPPFLAGS -DBOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING=1" + CPPFLAGS="$CPPFLAGS -DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE=1" CXXFLAGS="$CXXFLAGS -g" + LDFLAGS="$LDFLAGS -g" shift 1 ;; --boost) @@ -138,12 +228,6 @@ done HERE="$PWD" if [ "$LOCAL" = "false" -a -d "$HOME/Products" ]; then - version="" - if [ -x version ]; then - version="-$(./version)" - fi - #projdir="$HOME/Products/$(basename $HERE)" - #projdir="$projdir$version" projdir="$HOME/Products/ledger" if [ ! -d "$projdir" ]; then mkdir -p "$projdir" @@ -155,8 +239,8 @@ fi CPPFLAGS="$CPPFLAGS" CXXFLAGS="$CXXFLAGS $local_cxxflags" \ LDFLAGS="$LDFLAGS" LIBS="$LIBS" $SWITCHES "$@" -# Alter the Makefile so that it's not nearly so verbose. This makes finding -# errors and warnings much easier. +# Alter the Makefile so that it's not nearly so verbose. This makes errors +# and warnings much easier to spot. if [ -f Makefile ]; then perl -i -pe 's/^\t(\$\((LIBTOOL|CXX)\).*?\.cc)$/\t\@echo " " CXX \$\@;$1 > \/dev\/null/;' Makefile diff --git a/configure.ac b/configure.ac index 9ddd8e68..38a748dc 100644 --- a/configure.ac +++ b/configure.ac @@ -6,7 +6,7 @@ AC_PREREQ(2.61) m4_include([version.m4]) AC_INIT([ledger],VERSION_NUMBER,[johnw@newartisans.com]) -AC_CONFIG_SRCDIR([main.cc]) +AC_CONFIG_SRCDIR([src/main.cc]) AC_CONFIG_HEADER([acconf.h]) AM_INIT_AUTOMAKE([dist-bzip2]) diff --git a/ledger.vim b/contrib/ledger.vim index df63feb8..df63feb8 100644 --- a/ledger.vim +++ b/contrib/ledger.vim diff --git a/scripts/README b/contrib/scripts/README index 6108afbf..6108afbf 100644 --- a/scripts/README +++ b/contrib/scripts/README diff --git a/scripts/bal b/contrib/scripts/bal index 423e3e41..423e3e41 100755 --- a/scripts/bal +++ b/contrib/scripts/bal diff --git a/scripts/bal-huquq b/contrib/scripts/bal-huquq index fad2854a..fad2854a 100755 --- a/scripts/bal-huquq +++ b/contrib/scripts/bal-huquq diff --git a/scripts/entry b/contrib/scripts/entry index cc030d8e..cc030d8e 100755 --- a/scripts/entry +++ b/contrib/scripts/entry diff --git a/scripts/getquote b/contrib/scripts/getquote index bed561d6..bed561d6 100755 --- a/scripts/getquote +++ b/contrib/scripts/getquote diff --git a/scripts/ledger-du b/contrib/scripts/ledger-du index f5d7dd7d..f5d7dd7d 100755 --- a/scripts/ledger-du +++ b/contrib/scripts/ledger-du diff --git a/scripts/report b/contrib/scripts/report index 24418cdc..24418cdc 100755 --- a/scripts/report +++ b/contrib/scripts/report diff --git a/scripts/tc b/contrib/scripts/tc index c24be99a..c24be99a 100755 --- a/scripts/tc +++ b/contrib/scripts/tc diff --git a/scripts/ti b/contrib/scripts/ti index a7214e65..a7214e65 100755 --- a/scripts/ti +++ b/contrib/scripts/ti diff --git a/scripts/to b/contrib/scripts/to index 3198db3c..3198db3c 100755 --- a/scripts/to +++ b/contrib/scripts/to diff --git a/scripts/trend b/contrib/scripts/trend index 3c189c0b..3c189c0b 100755 --- a/scripts/trend +++ b/contrib/scripts/trend diff --git a/ledger.texi b/doc/ledger.texi index 4b995e78..4b995e78 100644 --- a/ledger.texi +++ b/doc/ledger.texi diff --git a/sample.dat b/doc/sample.dat index 4a271d6f..4a271d6f 100644 --- a/sample.dat +++ b/doc/sample.dat diff --git a/ledger.el b/lisp/ledger.el index 2ce949d9..2ce949d9 100644 --- a/ledger.el +++ b/lisp/ledger.el diff --git a/timeclock.el b/lisp/timeclock.el index 03159e94..03159e94 100644 --- a/timeclock.el +++ b/lisp/timeclock.el diff --git a/amounts.cc b/python/amounts.cc index ad3cda9a..ad3cda9a 100644 --- a/amounts.cc +++ b/python/amounts.cc diff --git a/py_amount.cc b/python/py_amount.cc index 16880f6f..16880f6f 100644 --- a/py_amount.cc +++ b/python/py_amount.cc diff --git a/py_commodity.cc b/python/py_commodity.cc index 3cf7d30c..3cf7d30c 100644 --- a/py_commodity.cc +++ b/python/py_commodity.cc diff --git a/py_times.cc b/python/py_times.cc index 00108b04..00108b04 100644 --- a/py_times.cc +++ b/python/py_times.cc diff --git a/py_utils.cc b/python/py_utils.cc index 9fc375f6..9fc375f6 100644 --- a/py_utils.cc +++ b/python/py_utils.cc diff --git a/pyfstream.h b/python/pyfstream.h index 1d72d471..1d72d471 100644 --- a/pyfstream.h +++ b/python/pyfstream.h diff --git a/pyinterp.cc b/python/pyinterp.cc index 07a619fe..07a619fe 100644 --- a/pyinterp.cc +++ b/python/pyinterp.cc diff --git a/pyinterp.h b/python/pyinterp.h index 5486eea5..5486eea5 100644 --- a/pyinterp.h +++ b/python/pyinterp.h diff --git a/pyledger.cc b/python/pyledger.cc index 76d7ab0c..76d7ab0c 100644 --- a/pyledger.cc +++ b/python/pyledger.cc diff --git a/pyledger.h b/python/pyledger.h index a298cc05..a298cc05 100644 --- a/pyledger.h +++ b/python/pyledger.h diff --git a/pyutils.h b/python/pyutils.h index bdb1f142..bdb1f142 100644 --- a/pyutils.h +++ b/python/pyutils.h diff --git a/setup.py b/python/setup.py index 4413a88d..4413a88d 100755 --- a/setup.py +++ b/python/setup.py diff --git a/test/python/PyUnitTests.py b/python/test/PyUnitTests.py index 3c19093f..3c19093f 100755 --- a/test/python/PyUnitTests.py +++ b/python/test/PyUnitTests.py diff --git a/test/python/UnitTests.py b/python/test/UnitTests.py index 843e9fc1..843e9fc1 100644 --- a/test/python/UnitTests.py +++ b/python/test/UnitTests.py diff --git a/test/python/__init__.py b/python/test/__init__.py index e69de29b..e69de29b 100644 --- a/test/python/__init__.py +++ b/python/test/__init__.py diff --git a/test/python/numerics/__init__.py b/python/test/numerics/__init__.py index e69de29b..e69de29b 100644 --- a/test/python/numerics/__init__.py +++ b/python/test/numerics/__init__.py diff --git a/test/python/numerics/t_amount.py b/python/test/numerics/t_amount.py index 95c98bdb..95c98bdb 100644 --- a/test/python/numerics/t_amount.py +++ b/python/test/numerics/t_amount.py diff --git a/tuples.hpp b/python/tuples.h index d7695934..d7695934 100644 --- a/tuples.hpp +++ b/python/tuples.h diff --git a/account.cc b/src/account.cc index d3b19ad0..d3b19ad0 100644 --- a/account.cc +++ b/src/account.cc diff --git a/account.h b/src/account.h index 7d35593c..7d35593c 100644 --- a/account.h +++ b/src/account.h diff --git a/amount.cc b/src/amount.cc index 7f849bff..7f849bff 100644 --- a/amount.cc +++ b/src/amount.cc diff --git a/balance.cc b/src/balance.cc index bac8d40c..bac8d40c 100644 --- a/balance.cc +++ b/src/balance.cc diff --git a/balance.h b/src/balance.h index 5146937c..5146937c 100644 --- a/balance.h +++ b/src/balance.h diff --git a/balpair.h b/src/balpair.h index 62da0810..62da0810 100644 --- a/balpair.h +++ b/src/balpair.h diff --git a/binary.cc b/src/binary.cc index 1744bb5d..1744bb5d 100644 --- a/binary.cc +++ b/src/binary.cc diff --git a/commodity.cc b/src/commodity.cc index a1c1e2c9..a1c1e2c9 100644 --- a/commodity.cc +++ b/src/commodity.cc diff --git a/commodity.h b/src/commodity.h index 2f5ce258..2f5ce258 100644 --- a/commodity.h +++ b/src/commodity.h diff --git a/compare.cc b/src/compare.cc index 1cbe7082..1cbe7082 100644 --- a/compare.cc +++ b/src/compare.cc diff --git a/compare.h b/src/compare.h index d86771ef..d86771ef 100644 --- a/compare.h +++ b/src/compare.h diff --git a/derive.cc b/src/derive.cc index dd9dc4ca..dd9dc4ca 100644 --- a/derive.cc +++ b/src/derive.cc diff --git a/fdstream.hpp b/src/fdstream.h index 8a06fba2..8a06fba2 100644 --- a/fdstream.hpp +++ b/src/fdstream.h diff --git a/filters.cc b/src/filters.cc index e5455423..e5455423 100644 --- a/filters.cc +++ b/src/filters.cc diff --git a/filters.h b/src/filters.h index 7f67cbd8..7f67cbd8 100644 --- a/filters.h +++ b/src/filters.h diff --git a/format.cc b/src/format.cc index 65dfce95..65dfce95 100644 --- a/format.cc +++ b/src/format.cc diff --git a/gnucash.cc b/src/gnucash.cc index 41990cb0..41990cb0 100644 --- a/gnucash.cc +++ b/src/gnucash.cc diff --git a/gnucash.h b/src/gnucash.h index b8273a19..b8273a19 100644 --- a/gnucash.h +++ b/src/gnucash.h diff --git a/handler.h b/src/handler.h index 6ebd6a5d..6ebd6a5d 100644 --- a/handler.h +++ b/src/handler.h diff --git a/iterators.cc b/src/iterators.cc index 34beba7e..34beba7e 100644 --- a/iterators.cc +++ b/src/iterators.cc diff --git a/iterators.h b/src/iterators.h index c52a6827..c52a6827 100644 --- a/iterators.h +++ b/src/iterators.h diff --git a/journal.cc b/src/journal.cc index 7d95d72f..7d95d72f 100644 --- a/journal.cc +++ b/src/journal.cc diff --git a/journal.h b/src/journal.h index 293439bb..293439bb 100644 --- a/journal.h +++ b/src/journal.h @@ -48,7 +48,7 @@ #ifdef HAVE_UNIX_PIPES #include <sys/types.h> #include <sys/wait.h> -#include <fdstream.hpp> +#include "fdstream.h" #endif namespace ledger { diff --git a/option.cc b/src/option.cc index b633de32..b633de32 100644 --- a/option.cc +++ b/src/option.cc diff --git a/output.cc b/src/output.cc index 324a20e4..324a20e4 100644 --- a/output.cc +++ b/src/output.cc diff --git a/parser.cc b/src/parser.cc index 4795c8f7..4795c8f7 100644 --- a/parser.cc +++ b/src/parser.cc diff --git a/predicate.h b/src/predicate.h index 624d3d65..624d3d65 100644 --- a/predicate.h +++ b/src/predicate.h diff --git a/pushvar.h b/src/pushvar.h index a6ec0fab..a6ec0fab 100644 --- a/pushvar.h +++ b/src/pushvar.h diff --git a/quotes.cc b/src/quotes.cc index ac6cb96e..ac6cb96e 100644 --- a/quotes.cc +++ b/src/quotes.cc diff --git a/reconcile.cc b/src/reconcile.cc index aca1732e..aca1732e 100644 --- a/reconcile.cc +++ b/src/reconcile.cc diff --git a/reconcile.h b/src/reconcile.h index 2e133087..2e133087 100644 --- a/reconcile.h +++ b/src/reconcile.h diff --git a/report.cc b/src/report.cc index 92f20d4f..92f20d4f 100644 --- a/report.cc +++ b/src/report.cc diff --git a/session.cc b/src/session.cc index 06288444..06288444 100644 --- a/session.cc +++ b/src/session.cc diff --git a/session.h b/src/session.h index dc78d6f5..dc78d6f5 100644 --- a/session.h +++ b/src/session.h diff --git a/system.hh b/src/system.hh index 221b81ef..221b81ef 100644 --- a/system.hh +++ b/src/system.hh diff --git a/textual.cc b/src/textual.cc index e46ae22a..e46ae22a 100644 --- a/textual.cc +++ b/src/textual.cc diff --git a/textual.h b/src/textual.h index 8064d0db..8064d0db 100644 --- a/textual.h +++ b/src/textual.h |