diff options
author | Michael Cahill <michael.cahill@wiredtiger.com> | 2011-09-02 21:53:51 +1000 |
---|---|---|
committer | Michael Cahill <michael.cahill@wiredtiger.com> | 2011-09-02 21:53:51 +1000 |
commit | c545f4fc2943d94c4bcd57c162cadb3855f6974f (patch) | |
tree | 6b5eff905006f307d308506f420d0960a6a7e6cc | |
parent | 6ba3445126c94b40c68ae0f2daa2df0d9ca8451c (diff) | |
download | mongo-c545f4fc2943d94c4bcd57c162cadb3855f6974f.tar.gz |
Split out the Python and examples from the top level Makefile.
-rw-r--r-- | build_posix/Make.base | 30 | ||||
-rw-r--r-- | build_posix/aclocal/options.m4 | 11 | ||||
-rw-r--r-- | configure.ac | 7 | ||||
-rw-r--r-- | examples/c/Makefile.am | 4 | ||||
-rw-r--r-- | ext/compressors/bzip2_compress/Makefile.am | 7 | ||||
-rw-r--r-- | ext/compressors/nop_compress/Makefile.am | 7 | ||||
-rw-r--r-- | lang/python/Makefile.am | 12 | ||||
-rw-r--r-- | lang/python/setup.py | 4 |
8 files changed, 51 insertions, 31 deletions
diff --git a/build_posix/Make.base b/build_posix/Make.base index e697697ca39..5aaf690e7ba 100644 --- a/build_posix/Make.base +++ b/build_posix/Make.base @@ -1,6 +1,16 @@ ACLOCAL_AMFLAGS = -I build_posix/aclocal -SUBDIRS = . bench/tcbench ext/compressors/bzip2_compress test/format test/insert test/salvage test/thread +if HAVE_BZIP2 + BZBUILD = ext/compressors/bzip2_compress +endif +if PYTHON + PYBUILD = lang/python +endif +SUBDIRS = . \ + bench/tcbench examples/c \ + ext/compressors/nop_compress \ + test/format test/insert test/salvage test/thread \ + $(BZBUILD) $(PYBUILD) wtdir = $(prefix)/wt wt_LTLIBRARIES = libwiredtiger.la @@ -11,10 +21,6 @@ wt_SOURCES = util_create.c util_dump.c util_dumpfile.c util_getopt.c \ util_load.c util_main.c util_printlog.c util_salvage.c util_stat.c \ util_verify.c util_verbose.c -noinst_PROGRAMS = ex_access ex_all ex_call_center ex_config ex_cursor \ - ex_extending ex_hello ex_pack ex_process ex_schema ex_sequence \ - ex_stat ex_thread ex_tpcb ex_transaction - include_HEADERS= wiredtiger.h INCLUDES= -I$(srcdir)/src/include @@ -31,17 +37,3 @@ $(srcdir)/src/include/extern.h: prototype.chk prototype.chk: $(libwiredtiger_la_SOURCES) @(cd $(srcdir)/dist && sh s_prototypes) && touch $@ - -if PYTHON -PYSRC = $(srcdir)/lang/python -if DEBUG -PY_SETUP_DEBUG = -g -endif -all-local: _wiredtiger.so -$(PYSRC)/wiredtiger_wrap.c: wiredtiger.h $(PYSRC)/wiredtiger.i - @(cd $(PYSRC) && $(SWIG) -python -I$(abs_top_builddir) wiredtiger.i) - -_wiredtiger.so: $(wt_LTLIBRARIES) $(PYSRC)/wiredtiger_wrap.c - @env CFLAGS="$(PYTHON_CFLAGS)" LDFLAGS="$(PYTHON_LDFLAGS)" \ - $(PYTHON) $(PYSRC)/setup.py build_ext -b . -t . -f $(PY_SETUP_DEBUG) -endif diff --git a/build_posix/aclocal/options.m4 b/build_posix/aclocal/options.m4 index 6d7766bca36..8678c32a803 100644 --- a/build_posix/aclocal/options.m4 +++ b/build_posix/aclocal/options.m4 @@ -16,6 +16,17 @@ no) db_cv_enable_attach=no;; esac AC_MSG_RESULT($db_cv_enable_attach) +AC_MSG_CHECKING(if --enable-bzip2 option specified) +AC_ARG_ENABLE(debug, + [AC_HELP_STRING([--enable-bzip2], + [Build the bzip2 compressor extention.])], r=$enableval, r=no) +case "$r" in +no) db_cv_enable_bzip2=no;; +*) db_cv_enable_bzip2=yes;; +esac +AC_MSG_RESULT($db_cv_enable_bzip2) +AM_CONDITIONAL(HAVE_BZIP2, test x$db_cv_enable_bzip2 = xyes) + AC_MSG_CHECKING(if --enable-debug option specified) AC_ARG_ENABLE(debug, [AC_HELP_STRING([--enable-debug], diff --git a/configure.ac b/configure.ac index 8e0fe070496..cd84d91e59d 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ AC_CONFIG_AUX_DIR([build_posix/gnu-support]) AC_CONFIG_MACRO_DIR([build_posix/aclocal]) AC_CONFIG_SRCDIR([dist/RELEASE]) -LT_INIT([dlopen]) +LT_INIT([pic-only]) AC_SUBST([LIBTOOL_DEPS]) AC_PROG_CC(cc gcc) @@ -63,7 +63,7 @@ AM_CONDITIONAL(DEBUG, test "$db_cv_enable_debug" = "yes") # Python API if test "$db_cv_enable_python" = "yes"; then - AM_PATH_PYTHON([2.5]) + AM_PATH_PYTHON([2.6]) AC_PATH_PROG([SWIG], [swig]) if test -z "$SWIG" ; then AC_MSG_ERROR( @@ -87,7 +87,10 @@ AC_C_BIGENDIAN # build under the main build directory. AC_CONFIG_FILES([ bench/tcbench/Makefile + examples/c/Makefile ext/compressors/bzip2_compress/Makefile + ext/compressors/nop_compress/Makefile + lang/python/Makefile test/format/Makefile test/insert/Makefile test/salvage/Makefile diff --git a/examples/c/Makefile.am b/examples/c/Makefile.am new file mode 100644 index 00000000000..2190ec5ba8a --- /dev/null +++ b/examples/c/Makefile.am @@ -0,0 +1,4 @@ +LDADD = -L$(top_builddir) -lwiredtiger +noinst_PROGRAMS = ex_access ex_all ex_call_center ex_config ex_cursor \ + ex_extending ex_hello ex_pack ex_process ex_schema ex_sequence \ + ex_stat ex_thread ex_tpcb ex_transaction diff --git a/ext/compressors/bzip2_compress/Makefile.am b/ext/compressors/bzip2_compress/Makefile.am index e1b067b83d1..ac94ce1ef0a 100644 --- a/ext/compressors/bzip2_compress/Makefile.am +++ b/ext/compressors/bzip2_compress/Makefile.am @@ -1,6 +1,5 @@ INCLUDES = -I$(top_builddir) -I$(top_srcdir)/src/include -LDADD = -lbz2 -noinst_LTLIBRARIES = bzip2_compress.la -bzip2_compress_la_SOURCES = bzip2_compress.c -bzip2_compress_la_LDFLAGS = -no-undefined -module -avoid-version +lib_LTLIBRARIES = bzip2_compress.la +bzip2_compress_la_LDFLAGS = -avoid-version -module +bzip2_compress_la_LIBADD = -lbz2 diff --git a/ext/compressors/nop_compress/Makefile.am b/ext/compressors/nop_compress/Makefile.am index 2f919560201..13bd2af0734 100644 --- a/ext/compressors/nop_compress/Makefile.am +++ b/ext/compressors/nop_compress/Makefile.am @@ -1,5 +1,4 @@ -INCLUDES = -I$(top_builddir) -I$(top_srcdir)/../src/include +INCLUDES = -I$(top_builddir) -I$(top_srcdir)/src/include -noinst_LTLIBRARIES = nop_compress.la -bzip2_compress_la_SOURCES = nop_compress.la -bzip2_compress_la_LDFLAGS = -no-undefined -module -avoid-version +lib_LTLIBRARIES = nop_compress.la +nop_compress_la_LDFLAGS = -avoid-version -module diff --git a/lang/python/Makefile.am b/lang/python/Makefile.am new file mode 100644 index 00000000000..1fd2c58b34d --- /dev/null +++ b/lang/python/Makefile.am @@ -0,0 +1,12 @@ +INCLUDES = -I$(abs_top_builddir) + +PYSRC = $(top_srcdir)/lang/python +if DEBUG +PY_SETUP_DEBUG = -g +endif +all-local: _wiredtiger.so +$(PYSRC)/wiredtiger_wrap.c: $(top_builddir)/wiredtiger.h $(PYSRC)/wiredtiger.i + @(cd $(PYSRC) && $(SWIG) -python -I$(abs_top_builddir) wiredtiger.i) + +_wiredtiger.so: $(wt_LTLIBRARIES) $(PYSRC)/wiredtiger_wrap.c + $(PYTHON) $(PYSRC)/setup.py build_ext -b . -t . -f $(PY_SETUP_DEBUG) diff --git a/lang/python/setup.py b/lang/python/setup.py index eaa3ee1330a..e293b62afad 100644 --- a/lang/python/setup.py +++ b/lang/python/setup.py @@ -19,8 +19,8 @@ wt_ver = '%d.%d' % (WIREDTIGER_VERSION_MAJOR, WIREDTIGER_VERSION_MINOR) setup(name='wiredtiger', version=wt_ver, ext_modules=[Extension('_wiredtiger', [os.path.join(dir, 'wiredtiger_wrap.c')], - include_dirs=['.'], - library_dirs=['.libs'], + include_dirs=['../..'], + library_dirs=['../../.libs'], libraries=['wiredtiger'], )], py_modules=['wiredtiger'], |