diff --git a/Makefile.am b/Makefile.am index 6ec5dab0..346008ad 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,47 +1,6 @@ -if USE_PCH -#BUILT_SOURCES = pchpic.h.gch pchnopic.h.gch -BUILT_SOURCES = pchnopic.h.gch -#CLEANFILES = pchpic.h.gch pchnopic.h.gch -CLEANFILES = pchnopic.h.gch -endif - -###################################################################### - -#bin_PROGRAMS = xpath -# -#xpath_CXXFLAGS = -DTEST -#xpath_SOURCES = \ -# amount.cc \ -# datetime.cc \ -# quotes.cc \ -# balance.cc \ -# value.cc \ -# mask.cc \ -# xml.cc \ -# xpath.cc \ -# trace.cc \ -# util.cc -#xpath_LDADD = $(LIBOBJS) -#if HAVE_EXPAT -#xpath_CXXFLAGS += -DHAVE_EXPAT=1 -#endif -#if HAVE_XMLPARSE -#xpath_CXXFLAGS += -DHAVE_XMLPARSE=1 -#endif -#if DEBUG -#xpath_CXXFLAGS += -DDEBUG_LEVEL=4 -#xpath_SOURCES += debug.cc -#endif -#xpath_LDFLAGS = -static # for the sake of command-line speed - -###################################################################### - lib_LTLIBRARIES = libledger.la libledger_la_CXXFLAGS = -if USE_PCH -libledger_la_CXXFLAGS += -DUSE_PCH -Winvalid-pch -fpch-deps -endif libledger_la_SOURCES = \ amount.cc \ quotes.cc \ @@ -129,12 +88,6 @@ pkginclude_HEADERS = \ xml.h \ xpath.h -pchpic.h.gch: pch.h pchdata.h $(pkginclude_HEADERS) - $(CXXCOMPILE) $(CXXFLAGS) -DPIC -o $@ pchdata.h - -pchnopic.h.gch: pch.h pchdata.h $(pkginclude_HEADERS) - $(CXXCOMPILE) $(CXXFLAGS) -o $@ pchdata.h - ###################################################################### bin_PROGRAMS = ledger diff --git a/amount.cc b/amount.cc index bd690144..7ebbc004 100644 --- a/amount.cc +++ b/amount.cc @@ -1,6 +1,3 @@ -#ifdef USE_PCH -#include "pch.h" -#else #include "amount.h" #include "binary.h" #include "util.h" @@ -10,7 +7,6 @@ #include #include -#endif namespace ledger { @@ -1927,10 +1923,8 @@ bool compare_amount_commodities::operator()(const amount_t * left, #ifdef USE_BOOST_PYTHON -#ifndef USE_PCH #include #include -#endif using namespace boost::python; using namespace ledger; diff --git a/balance.cc b/balance.cc index c949075e..4bce6d70 100644 --- a/balance.cc +++ b/balance.cc @@ -1,12 +1,8 @@ -#ifdef USE_PCH -#include "pch.h" -#else #include "balance.h" #include "util.h" #include #include -#endif namespace ledger { @@ -326,9 +322,7 @@ balance_t::operator amount_t() const #ifdef USE_BOOST_PYTHON -#ifndef USE_PCH #include -#endif using namespace boost::python; using namespace ledger; diff --git a/binary.cc b/binary.cc index a94b6690..9ac40bdb 100644 --- a/binary.cc +++ b/binary.cc @@ -1,11 +1,7 @@ -#ifdef USE_PCH -#include "pch.h" -#else #include "binary.h" #include #include -#endif namespace ledger { diff --git a/configure.in b/configure.in index 51fcec85..c8e8e42c 100644 --- a/configure.in +++ b/configure.in @@ -252,16 +252,6 @@ else AM_CONDITIONAL(HAVE_BOOST_PYTHON, false) fi -# check for Precompiled headers (gcc4-style) -AC_ARG_ENABLE(pch, - [ --enable-pch Enable support for pre-compiled headers], - [case "${enableval}" in - yes) pch=true ;; - no) pch=false ;; - *) AC_MSG_ERROR(bad value ${enableval} for --enable-pch) ;; - esac],[pch=false]) -AM_CONDITIONAL(USE_PCH, test x$pch = xtrue) - # Check for options AC_ARG_ENABLE(debug, [ --enable-debug Turn on debugging], diff --git a/datetime.cc b/datetime.cc index acf968bc..ac20d64b 100644 --- a/datetime.cc +++ b/datetime.cc @@ -1,6 +1,3 @@ -#ifdef USE_PCH -#include "pch.h" -#else #if defined(__GNUG__) && __GNUG__ < 3 #define _XOPEN_SOURCE #endif @@ -10,7 +7,6 @@ #include #include -#endif date_t date_t::now(std::time(NULL)); int date_t::current_year = date_t::now.year(); @@ -457,9 +453,7 @@ void interval_t::parse(std::istream& in) #ifdef USE_BOOST_PYTHON -#ifndef USE_PCH #include -#endif using namespace boost::python; diff --git a/debug.cc b/debug.cc index 9b98b1f4..b3b140bc 100644 --- a/debug.cc +++ b/debug.cc @@ -1,17 +1,11 @@ -#ifdef USE_PCH -#include "pch.h" -#else #include "debug.h" -#endif #ifdef DEBUG_ENABLED -#ifndef USE_PCH #include #include #include // for the `write' method -#endif int offset = 0; @@ -119,9 +113,7 @@ static struct init_streams { #if DEBUG_LEVEL >= BETA -#ifndef USE_PCH #include -#endif void debug_assert(const std::string& reason, const std::string& file, diff --git a/format.cc b/format.cc index 3f11fec0..cb76ff8a 100644 --- a/format.cc +++ b/format.cc @@ -1,6 +1,3 @@ -#ifdef USE_PCH -#include "pch.h" -#else #include "format.h" #include "error.h" #include "util.h" @@ -9,7 +6,6 @@ #endif #include -#endif namespace ledger { @@ -245,9 +241,7 @@ int format_t::format(std::ostream& out, xml::node_t * context, #ifdef USE_BOOST_PYTHON -#ifndef USE_PCH #include -#endif using namespace boost::python; using namespace ledger; diff --git a/gnucash.cc b/gnucash.cc index b988e0d7..8095f9f3 100644 --- a/gnucash.cc +++ b/gnucash.cc @@ -1,8 +1,4 @@ -#ifdef USE_PCH -#include "pch.h" -#else #include "gnucash.h" -#endif namespace ledger { diff --git a/journal.cc b/journal.cc index 673b281c..1da58fdc 100644 --- a/journal.cc +++ b/journal.cc @@ -1,6 +1,3 @@ -#ifdef USE_PCH -#include "pch.h" -#else #include "journal.h" #include "datetime.h" #include "mask.h" @@ -11,7 +8,6 @@ #include "acconf.h" #include -#endif namespace ledger { @@ -668,10 +664,8 @@ xact_context::xact_context(const ledger::transaction_t& _xact, #ifdef USE_BOOST_PYTHON -#ifndef USE_PCH #include #include -#endif using namespace boost::python; using namespace ledger; diff --git a/main.cc b/main.cc index 0609c96d..b425598f 100644 --- a/main.cc +++ b/main.cc @@ -1,6 +1,3 @@ -#ifdef USE_PCH -#include "pch.h" -#else #include #include #include @@ -28,7 +25,6 @@ #include "ledger.h" #endif #include "debug.h" -#endif using namespace ledger; diff --git a/mask.cc b/mask.cc index 7a7a1fc3..ea621206 100644 --- a/mask.cc +++ b/mask.cc @@ -1,6 +1,3 @@ -#ifdef USE_PCH -#include "pch.h" -#else #include "mask.h" #include "debug.h" #include "util.h" @@ -8,7 +5,6 @@ #include #include -#endif mask_t::mask_t(const std::string& pat) : exclude(false) { diff --git a/ofx.cc b/ofx.cc index 9a74c750..5f0ab6f4 100644 --- a/ofx.cc +++ b/ofx.cc @@ -1,6 +1,3 @@ -#ifdef USE_PCH -#include "pch.h" -#else #include "journal.h" #include "ofx.h" #include "format.h" @@ -10,7 +7,6 @@ #include "util.h" #include -#endif namespace ledger { diff --git a/option.cc b/option.cc index 3f84d21a..ef78bfd9 100644 --- a/option.cc +++ b/option.cc @@ -1,6 +1,3 @@ -#ifdef USE_PCH -#include "pch.h" -#else #include "option.h" #include "report.h" #include "debug.h" @@ -13,7 +10,6 @@ #include #include "util.h" -#endif #ifdef USE_BOOST_PYTHON static ledger::option_t * find_option(const std::string& name); @@ -212,11 +208,9 @@ void process_arguments(int argc, char ** argv, const bool anywhere, #ifdef USE_BOOST_PYTHON -#ifndef USE_PCH #include #include #include -#endif using namespace boost::python; using namespace ledger; diff --git a/parser.cc b/parser.cc index 78076683..1e743008 100644 --- a/parser.cc +++ b/parser.cc @@ -1,15 +1,9 @@ -#ifdef USE_PCH -#include "pch.h" -#else #include "parser.h" -#endif #ifdef USE_BOOST_PYTHON -#ifndef USE_PCH #include #include -#endif using namespace boost::python; using namespace ledger; diff --git a/py_eval.cc b/py_eval.cc index ec656035..eb514f88 100644 --- a/py_eval.cc +++ b/py_eval.cc @@ -1,12 +1,8 @@ -#ifdef USE_PCH -#include "pch.h" -#else #include "py_eval.h" #include "error.h" #include "acconf.h" #include -#endif void export_amount(); void export_balance(); diff --git a/qif.cc b/qif.cc index c0dbc939..17eecc10 100644 --- a/qif.cc +++ b/qif.cc @@ -1,6 +1,3 @@ -#ifdef USE_PCH -#include "pch.h" -#else #include "journal.h" #include "qif.h" #include "datetime.h" @@ -9,7 +6,6 @@ #include #include -#endif namespace ledger { diff --git a/quotes.cc b/quotes.cc index b097d97d..a8fbfbc5 100644 --- a/quotes.cc +++ b/quotes.cc @@ -1,6 +1,3 @@ -#ifdef USE_PCH -#include "pch.h" -#else #include "quotes.h" #include "datetime.h" #include "error.h" @@ -9,7 +6,6 @@ #include #include #include -#endif namespace ledger { diff --git a/report.cc b/report.cc index 2ebe32e8..191af340 100644 --- a/report.cc +++ b/report.cc @@ -1,10 +1,6 @@ -#ifdef USE_PCH -#include "pch.h" -#else #include "report.h" #include "transform.h" #include "util.h" -#endif namespace ledger { @@ -192,9 +188,7 @@ xml::xpath_t::op_t * report_t::lookup(const std::string& name) #ifdef USE_BOOST_PYTHON -#ifndef USE_PCH #include -#endif using namespace boost::python; using namespace ledger; diff --git a/session.cc b/session.cc index d952142d..e22febdc 100644 --- a/session.cc +++ b/session.cc @@ -1,10 +1,6 @@ -#ifdef USE_PCH -#include "pch.h" -#else #include "session.h" #include -#endif namespace ledger { @@ -196,9 +192,7 @@ xml::xpath_t::op_t * session_t::lookup(const std::string& name) #ifdef USE_BOOST_PYTHON -#ifndef USE_PCH #include -#endif using namespace boost::python; using namespace ledger; diff --git a/textual.cc b/textual.cc index ecd87f33..b1c19308 100644 --- a/textual.cc +++ b/textual.cc @@ -1,6 +1,3 @@ -#ifdef USE_PCH -#include "pch.h" -#else #include "textual.h" #include "session.h" #include "util.h" @@ -16,7 +13,6 @@ #include #include #include -#endif #define TIMELOG_SUPPORT 1 diff --git a/trace.cc b/trace.cc index 46f250e1..e82b5a5e 100644 --- a/trace.cc +++ b/trace.cc @@ -1,9 +1,5 @@ -#ifdef USE_PCH -#include "pch.h" -#else #include "trace.h" #include "acconf.h" -#endif namespace ledger { diff --git a/transform.cc b/transform.cc index 58ee091e..29b493f6 100644 --- a/transform.cc +++ b/transform.cc @@ -1,8 +1,4 @@ -#ifdef USE_PCH -#include "pch.h" -#else #include "transform.h" -#endif namespace ledger { @@ -332,9 +328,7 @@ void remove_transform::execute(xml::document_t * document) #if 0 #ifdef USE_BOOST_PYTHON -#ifndef USE_PCH #include -#endif using namespace boost::python; using namespace ledger; diff --git a/util.cc b/util.cc index afa71c44..503d6105 100644 --- a/util.cc +++ b/util.cc @@ -1,6 +1,3 @@ -#ifdef USE_PCH -#include "pch.h" -#else #include "util.h" #include @@ -17,7 +14,6 @@ #if defined(HAVE_GETPWUID) || defined(HAVE_GETPWNAM) #include #endif -#endif std::string expand_path(const std::string& path) { diff --git a/value.cc b/value.cc index 8da7681b..52d9fd6d 100644 --- a/value.cc +++ b/value.cc @@ -1,11 +1,7 @@ -#ifdef USE_PCH -#include "pch.h" -#else #include "value.h" #include "xml.h" #include "debug.h" #include "error.h" -#endif namespace ledger { @@ -2311,9 +2307,7 @@ void value_context::describe(std::ostream& out) const throw() #ifdef USE_BOOST_PYTHON -#ifndef USE_PCH #include -#endif using namespace boost::python; using namespace ledger; diff --git a/xml.cc b/xml.cc index e75130c7..7705d5bb 100644 --- a/xml.cc +++ b/xml.cc @@ -1,6 +1,3 @@ -#ifdef USE_PCH -#include "pch.h" -#else #include "xml.h" #include "journal.h" #include "datetime.h" @@ -9,7 +6,6 @@ #include #include #include -#endif namespace ledger { namespace xml { diff --git a/xpath.cc b/xpath.cc index 3d43fff5..ccf0ec82 100644 --- a/xpath.cc +++ b/xpath.cc @@ -1,6 +1,3 @@ -#ifdef USE_PCH -#include "pch.h" -#else #include "xpath.h" #include "debug.h" #include "util.h" @@ -8,7 +5,6 @@ #include "py_eval.h" #endif #include -#endif namespace ledger { namespace xml { @@ -2388,9 +2384,7 @@ void xpath_t::op_t::dump(std::ostream& out, const int depth) const #ifdef USE_BOOST_PYTHON -#ifndef USE_PCH #include -#endif using namespace boost::python; using namespace ledger;