Move the business object implementations from separate module into the main gnucash engine.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19329 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Christian Stimming 2010-07-03 21:53:22 +00:00
parent 8e781e8cb4
commit 76b764582a
44 changed files with 92 additions and 94 deletions

View File

@ -18,25 +18,8 @@ INCLUDE_DIRECTORIES (${CMAKE_SOURCE_DIR}/src/backend/xml) # for io-gncxml-v2.h
INCLUDE_DIRECTORIES (${CMAKE_CURRENT_SOURCE_DIR}) # when building swig-core-utils.c
INCLUDE_DIRECTORIES (${CMAKE_CURRENT_BINARY_DIR}) # for gncla-dir.h
SET (SWIG_BUSINESS_CORE_C ${CMAKE_CURRENT_BINARY_DIR}/swig-business-core.c)
GNC_ADD_SWIG_COMMAND (${SWIG_BUSINESS_CORE_C} ${CMAKE_CURRENT_SOURCE_DIR}/business-core.i)
SET (libgnc_business_core_SOURCES
gncAddress.c
gncBillTerm.c
gncBusGuile.c
gncBusiness.c
gncCustomer.c
gncEmployee.c
gncEntry.c
gncInvoice.c
gncJob.c
gncOrder.c
gncOwner.c
gncTaxTable.c
gncVendor.c
gncmod-business-core.c
${SWIG_BUSINESS_CORE_C}
)
SET (libgnc_business_core_xml_SOURCES
@ -55,30 +38,6 @@ SET (libgnc_business_core_xml_SOURCES
)
SET (libgnc_business_core_HEADERS
gncAddress.h
gncAddressP.h
gncBillTerm.h
gncBillTermP.h
gncBusGuile.h
gncBusiness.h
gncCustomer.h
gncCustomerP.h
gncEmployee.h
gncEmployeeP.h
gncEntry.h
gncEntryP.h
gncInvoice.h
gncInvoiceP.h
gncJob.h
gncJobP.h
gncOrder.h
gncOrderP.h
gncOwner.h
gncOwnerP.h
gncTaxTable.h
gncTaxTableP.h
gncVendor.h
gncVendorP.h
)
ADD_LIBRARY (business-core

View File

@ -12,47 +12,9 @@ AM_CPPFLAGS = \
${GLIB_CFLAGS}
libgncmod_business_core_la_SOURCES = \
swig-business-core.c \
gncBusGuile.c \
gncmod-business-core.c \
gncAddress.c \
gncBillTerm.c \
gncBusiness.c \
gncCustomer.c \
gncEmployee.c \
gncEntry.c \
gncInvoice.c \
gncJob.c \
gncOrder.c \
gncOwner.c \
gncTaxTable.c \
gncVendor.c
gncmod-business-core.c
noinst_HEADERS = \
gncAddress.h \
gncAddressP.h \
gncBillTerm.h \
gncBillTermP.h \
gncBusiness.h \
gncBusGuile.h \
gncCustomer.h \
gncCustomerP.h \
gncEmployee.h \
gncEmployeeP.h \
gncEntry.h \
gncEntryP.h \
gncInvoice.h \
gncInvoiceP.h \
gncJob.h \
gncJobP.h \
gncOrder.h \
gncOrderP.h \
gncOwner.h \
gncOwnerP.h \
gncTaxTable.h \
gncTaxTableP.h \
gncVendor.h \
gncVendorP.h
noinst_HEADERS =
libgncmod_business_core_la_LDFLAGS = -avoid-version
@ -66,17 +28,10 @@ libgncmod_business_core_la_LIBADD = \
# business-core-helpers.c
if BUILDING_FROM_SVN
swig-business-core.c: business-core.i ${noinst_HEADERS} \
${top_srcdir}/src/base-typemaps.i
$(SWIG) -guile $(SWIG_ARGS) -Linkage module \
-I${top_srcdir}/src -o $@ $<
endif
gncmoddir = ${GNC_SHAREDIR}/guile-modules/gnucash
gncmod_DATA = business-core.scm
EXTRA_DIST = business-core.i ${gncmod_DATA}
EXTRA_DIST = ${gncmod_DATA}
if GNUCASH_SEPARATE_BUILDDIR
#For executing test cases
@ -99,6 +54,6 @@ endif
noinst_DATA = .scm-links
CLEANFILES = gnucash .scm-links ${SCM_FILE_LINKS}
MAINTAINERCLEANFILES = swig-business-core.c
MAINTAINERCLEANFILES =
INCLUDES = -DG_LOG_DOMAIN=\"gnc.business.core\"

View File

@ -50,12 +50,39 @@ SET (libgncmod_engine_HEADERS
gncObject.h
kvp-scm.h
policy.h
gncAddress.h
gncAddressP.h
gncBillTerm.h
gncBillTermP.h
gncBusGuile.h
gncBusiness.h
gncCustomer.h
gncCustomerP.h
gncEmployee.h
gncEmployeeP.h
gncEntry.h
gncEntryP.h
gncInvoice.h
gncInvoiceP.h
gncJob.h
gncJobP.h
gncOrder.h
gncOrderP.h
gncOwner.h
gncOwnerP.h
gncTaxTable.h
gncTaxTableP.h
gncVendor.h
gncVendorP.h
)
# Command to generate the swig-engine.c wrapper file
SET (SWIG_ENGINE_C ${CMAKE_CURRENT_BINARY_DIR}/swig-engine.c)
GNC_ADD_SWIG_COMMAND (${SWIG_ENGINE_C} ${CMAKE_CURRENT_SOURCE_DIR}/engine.i)
SET (SWIG_BUSINESS_CORE_C ${CMAKE_CURRENT_BINARY_DIR}/swig-business-core.c)
GNC_ADD_SWIG_COMMAND (${SWIG_BUSINESS_CORE_C} ${CMAKE_CURRENT_SOURCE_DIR}/business-core.i)
# Command to generate the iso-4217-currencies.c file
SET (ISO_4217_C ${CMAKE_CURRENT_BINARY_DIR}/iso-4217-currencies.c)
ADD_CUSTOM_COMMAND (
@ -108,6 +135,20 @@ SET (libgncmod_engine_SOURCES
glib-helpers.c
policy.c
${SWIG_ENGINE_C}
gncAddress.c
gncBillTerm.c
gncBusGuile.c
gncBusiness.c
gncCustomer.c
gncEmployee.c
gncEntry.c
gncInvoice.c
gncJob.c
gncOrder.c
gncOwner.c
gncTaxTable.c
gncVendor.c
${SWIG_BUSINESS_CORE_C}
)
# Add dependency on config.h

View File

@ -42,7 +42,21 @@ libgncmod_engine_la_SOURCES = \
kvp-scm.c \
engine-helpers.c \
glib-helpers.c \
policy.c
policy.c \
swig-business-core.c \
gncBusGuile.c \
gncAddress.c \
gncBillTerm.c \
gncBusiness.c \
gncCustomer.c \
gncEmployee.c \
gncEntry.c \
gncInvoice.c \
gncJob.c \
gncOrder.c \
gncOwner.c \
gncTaxTable.c \
gncVendor.c
EXTRA_libgncmod_engine_la_SOURCES = iso-4217-currencies.c
@ -81,7 +95,31 @@ gncinclude_HEADERS = \
gnc-session-scm.h \
gncObject.h \
kvp-scm.h \
policy.h
policy.h \
gncAddress.h \
gncAddressP.h \
gncBillTerm.h \
gncBillTermP.h \
gncBusiness.h \
gncBusGuile.h \
gncCustomer.h \
gncCustomerP.h \
gncEmployee.h \
gncEmployeeP.h \
gncEntry.h \
gncEntryP.h \
gncInvoice.h \
gncInvoiceP.h \
gncJob.h \
gncJobP.h \
gncOrder.h \
gncOrderP.h \
gncOwner.h \
gncOwnerP.h \
gncTaxTable.h \
gncTaxTableP.h \
gncVendor.h \
gncVendorP.h
noinst_HEADERS = \
AccountP.h \
@ -129,6 +167,7 @@ EXTRA_DIST = \
kvp_doc.txt \
SX-book-p.h \
engine.i \
business-core.i \
${gncmod_DATA} \
${gncscm_DATA}
@ -162,6 +201,10 @@ swig-engine.c: engine.i ${top_srcdir}/src/base-typemaps.i \
${gncinclude_HEADERS} ${noinst_HEADERS}
$(SWIG) -guile $(SWIG_ARGS) -Linkage module \
-I${top_srcdir}/src/libqof/qof -I${top_srcdir}/src -o $@ $<
swig-business-core.c: business-core.i ${noinst_HEADERS} \
${top_srcdir}/src/base-typemaps.i
$(SWIG) -guile $(SWIG_ARGS) -Linkage module \
-I${top_srcdir}/src -o $@ $<
endif
iso-4217-currencies.c: iso-4217-currencies.scm iso-currencies-to-c
@ -172,6 +215,6 @@ BUILT_SOURCES = iso-4217-currencies.c
CLEANFILES = $(BUILT_SOURCES) gnucash .scm-links \
${SCM_FILE_LINKS}
MAINTAINERCLEANFILES = swig-engine.c
MAINTAINERCLEANFILES = swig-engine.c swig-business-core.c
INCLUDES = -DG_LOG_DOMAIN=\"gnc.engine\"

View File

@ -48,7 +48,7 @@ extern "C"
#include "swig-runtime.h"
#include "backend/xml/gnc-backend-xml.h"
#include "business/business-core/gncBusiness.h"
#include "engine/gncBusiness.h"
#include "business/business-core/xml/gncmod-business-backend-xml.h"
#ifdef WITH_SQL
# include "backend/dbi/gnc-backend-dbi.h"