summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--Makefile.am38
-rwxr-xr-xsetup.py5
3 files changed, 36 insertions, 9 deletions
diff --git a/.gitignore b/.gitignore
index a76cf356..55cbc95f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,6 +3,7 @@
*.elc
*.la
*.lo
+*.loT
*.o
*~
.deps/
@@ -20,6 +21,7 @@
/acconf.h.in
/acconf.h.in~
/aclocal.m4
+/amounts.so
/autom4te.cache
/config.guess
/config.log
diff --git a/Makefile.am b/Makefile.am
index e97b56a0..6208cd80 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -125,11 +125,15 @@ noinst_PROGRAMS = amounts.so
amounts_so_SOURCES = amounts.cc fdstream.hpp
amounts.so: amounts.cc libamounts.la
- CFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS) -L. -L.libs" \
- python setup.py build --build-lib=.
+ CFLAGS="$(CPPFLAGS) -I$(srcdir) $(libamounts_la_CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)" \
+ LDFLAGS="$(LDFLAGS) -L$(top_builddir) -L$(top_builddir)/.libs" \
+ ARCHFLAGS="$(ARCHFLAGS)" SRCDIR="$(srcdir)" \
+ python setup.py build --build-lib=$(top_builddir)
install-exec-hook:
- CFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS) -L. -L.libs" \
+ CFLAGS="$(CPPFLAGS) -I$(srcdir) $(libamounts_la_CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)" \
+ LDFLAGS="$(LDFLAGS) -L$(top_builddir) -L$(top_builddir)/.libs" \
+ ARCHFLAGS="$(ARCHFLAGS)" SRCDIR="$(srcdir)" \
python setup.py install --prefix=$(prefix)
endif
@@ -146,9 +150,29 @@ RegressionTests:
######################################################################
-release:
- make -j3 distcheck \
- CPPFLAGS="-I/usr/local/include -I/opt/local/include " \
- LDFLAGS="-L/usr/local/lib -L/opt/local/lib"
+copy-sources:
+ -mkdir /tmp/ledger
+ rsync -av --delete $(srcdir)/.git/ /tmp/ledger/.git/
+ (cd /tmp/ledger; git reset --hard HEAD; git clean -x -d -f)
+
+release: copy-sources
+ (cd /tmp/ledger; ./acprep --local && \
+ make -j3 \
+ CPPFLAGS="-I/usr/local/include -I/opt/local/include" \
+ LDFLAGS="-L/usr/local/lib -L/opt/local/lib" \
+ ARCHFLAGS="-arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.5.sdk" \
+ CXXFLAGS="-arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.5.sdk" \
+ LDFLAGS="$LDFLAGS -arch i386 -arch ppc -Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk" \
+ DISTCHECK_CONFIGURE_FLAGS="--disable-dependency-tracking")
+
+release-distcheck: copy-sources
+ (cd /tmp/ledger; ./acprep --local && \
+ make -j3 distcheck \
+ CPPFLAGS="-I/usr/local/include -I/opt/local/include" \
+ LDFLAGS="-L/usr/local/lib -L/opt/local/lib" \
+ ARCHFLAGS="-arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.5.sdk" \
+ CXXFLAGS="-arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.5.sdk" \
+ LDFLAGS="$LDFLAGS -arch i386 -arch ppc -Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk" \
+ DISTCHECK_CONFIGURE_FLAGS="--disable-dependency-tracking")
# Makefile.am ends here
diff --git a/setup.py b/setup.py
index 0c78cb19..ad85633b 100755
--- a/setup.py
+++ b/setup.py
@@ -4,7 +4,8 @@ from distutils.core import setup, Extension
import os
-libs = ["amounts", "boost_python", "gmp"]
+defines = [('PYTHON_MODULE', 1)]
+libs = ["amounts", "boost_python", "gmp"]
setup(name = "Amounts",
version = "2.6.1",
@@ -13,6 +14,6 @@ setup(name = "Amounts",
author_email = "johnw@newartisans.com",
url = "http://www.newartisans.com/johnw/",
ext_modules = [
- Extension("amounts", ["amounts.cc"],
+ Extension("amounts", [os.path.join(os.environ['SRCDIR'], "amounts.cc")],
define_macros = [('PYTHON_MODULE', 1)],
libraries = libs)])