Beautify python-bindings/Makefile.am.

* Remove gnucash_core.i from _SOURCES, because automake probably does not use it
  anyway.
* Put flags into separate lines.
* Add gnucash_core.c to maintainer-clean target and wrap it in
  BUILDING_FROM_SVN, so that timestamps in tarballs do not try to regenerate it.
* Add example_scripts/*.py, tests/*.py and *.i to EXTRA_DIST.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17787 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Andreas Köhler 2008-12-31 20:06:14 +00:00
parent a8b49ec984
commit ded37fbe7e
2 changed files with 46 additions and 16 deletions

View File

@ -1,30 +1,53 @@
SUBDIRS = . tests
BUILT_SOURCES = gnucash_core.c
SWIG_SOURCES = gnucash_core.i
pkgpython_PYTHON = __init__.py function_class.py \
gnucash_core.py gnucash_core_c.py gnucash_business.py
pkgpython_PYTHON = \
__init__.py \
function_class.py \
gnucash_core.py \
gnucash_core_c.py \
gnucash_business.py
pkgpyexec_LTLIBRARIES = _gnucash_core_c.la
_gnucash_core_c_la_SOURCES = $(BUILT_SOURCES) $(SWIG_SOURCES)
_gnucash_core_c_la_CPPFLAGS = $(PYTHON_CPPFLAGS) \
-I$(top_srcdir)/src $(QOF_CFLAGS) \
$(GLIB_CFLAGS) $(GUILE_INCS) \
-I$(top_srcdir)/src/engine \
-I$(top_srcdir)/src/business/business-core
_gnucash_core_c_la_SOURCES = \
gnucash_core.c
_gnucash_core_c_la_CPPFLAGS = \
$(PYTHON_CPPFLAGS) \
$(QOF_CFLAGS) \
$(GLIB_CFLAGS) \
$(GUILE_INCS) \
-I$(top_srcdir)/src \
-I$(top_srcdir)/src/engine \
-I$(top_srcdir)/src/business/business-core
# Suppress all warnings for now, but we really only need to -Wno-implicit
AM_CFLAGS = -w
_gnucash_core_c_la_LDFLAGS = -avoid-version -module
_gnucash_core_c_la_LIBADD = ${QOF_LIBS} ${GUILE_LIBS} ${GLIB_LIBS} \
${top_builddir}/src/gnc-module/libgnc-module.la \
${top_builddir}/src/engine/libgncmod-engine.la \
${top_builddir}/src/business/business-core/libgncmod-business-core.la
gnucash_core.c : $(SWIG_SOURCES)
_gnucash_core_c_la_LIBADD = \
${QOF_LIBS} \
${GLIB_LIBS} \
${GUILE_LIBS} \
${top_builddir}/src/gnc-module/libgnc-module.la \
${top_builddir}/src/engine/libgncmod-engine.la \
${top_builddir}/src/business/business-core/libgncmod-business-core.la
if BUILDING_FROM_SVN
gnucash_core.c: gnucash_core.i
swig $(SWIG_PYTHON_OPT) -Wall -Werror \
-I$(top_srcdir)/src -I$(top_srcdir)/src/engine \
-I$(top_srcdir)/src/business/business-core \
$(QOF_CFLAGS) -o $@ $<
endif
EXTRA_DIST = \
example_scripts/simple_book.py \
example_scripts/simple_session.py \
example_scripts/simple_test.py \
glib.i \
gnucash_core.i \
timespec.i
MAINTAINERCLEANFILES = gnucash-core.c

View File

@ -3,3 +3,10 @@ TESTS = runTests.py
clean-local:
rm -f translog.*
EXTRA_DIST = \
runTests.py \
test_account.py \
test_book.py \
test_split.py \
test_transaction.py