Index: Makefile.in =================================================================== --- Makefile.in +++ Makefile.in Sun Oct 20 14:35:19 2002 @@ -9,6 +9,12 @@ DOC_DIRS = doc/programmer/design doc/handbook doc/handbook/translations/french +SWIG_SRC_DIR = $(abs_srcdir)/subversion/bindings/swig +SWIG_BUILD_DIR = $(abs_builddir)/subversion/bindings/swig +SWIG_DIRS = subversion/bindings/swig \ + subversion/bindings/swig/python \ + subversion/bindings/swig/python/svn + EXTERNAL_PROJECT_DIRS = @SVN_SUBDIRS@ NEON_LIBS = @NEON_LIBS@ @@ -158,7 +164,7 @@ tests.log mkdir-init: - @list='$(BUILD_DIRS) $(DOC_DIRS)'; for i in $$list doc; do \ + @list='$(BUILD_DIRS) $(DOC_DIRS) $(SWIG_DIRS)'; for i in $$list doc; do \ echo "mkdir $$i" ; \ $(MKDIR) $$i ; \ done @@ -209,15 +215,19 @@ done swig-py-ext: - (cd subversion/bindings/swig/python; \ - $(PYTHON) setup.py \ - -I.. -I../../../include $(SVN_APR_INCLUDES) \ - -L$(prefix)/lib -L$(SVN_APR_PREFIX)/lib \ - build) + (cd $(SWIG_SRC_DIR)/python; \ + $(PYTHON) setup.py \ + -I$(SWIG_SRC_DIR) \ + -I$(abs_srcdir)/subversion/include $(SVN_APR_INCLUDES) \ + -S$(SWIG_SRC_DIR) \ + -L$(prefix)/lib -L$(SVN_APR_PREFIX)/lib \ + build --build-base=$(SWIG_BUILD_DIR)/python/build) install-swig-py-ext: - (cd subversion/bindings/swig/python; \ - $(PYTHON) setup.py install --prefix $(prefix)) + (cd $(SWIG_BUILD_DIR)/python; \ + $(PYTHON) $(SWIG_SRC_DIR)/python/setup.py \ + -S$(SWIG_SRC_DIR) \ + install --prefix $(prefix)) ### Build a tarball. dist: Index: subversion/bindings/swig/python/setup.py =================================================================== --- subversion/bindings/swig/python/setup.py +++ subversion/bindings/swig/python/setup.py Sun Oct 20 12:36:16 2002 @@ -32,6 +32,8 @@ "search DIR for includes (multiple instances allowed)" print " -L dir " + \ "search DIR for libraries (multiple instances allowed)" + print " -S dir " + \ + "the DIR for the source of the subversion swig bindings" print " -s path " + \ "use the swig binary found at PATH" sys.exit(0) @@ -52,13 +54,15 @@ # all the options that we allow (which is FAR less than the set of # distutils options). If we find that people actually care, we can # revisit this. -options, leftovers = getopt.getopt(sys.argv[1:], "I:L:s:", +options, leftovers = getopt.getopt(sys.argv[1:], "I:L:S:s:", ["prefix=", "install-dir="]) for option in options: if option[0] == '-I': include_dirs.append(option[1]) if option[0] == '-L': library_dirs.append(option[1]) + if option[0] == '-S': + source_dir = option[1] if option[0] == '-s': swig_location = option[1]