Greg Stein <gstein@lyra.org> writes:
> On Thu, Nov 07, 2002 at 12:10:02PM -0800, Daniel Rall wrote:
> >...
> > Unfortunately, when $(SWIG) isn't defined (I'm assuming this happens
> > when you don't pass --with-swig, I triggered it in testing by
> > explicitly commenting out the SWIG= bit in the patch above), your
> > getopt from setup.py seems to think that it should handle
> > --bulid-base, which it doesn't define. I'm guessing that --build-base
> > is handled by distutils' getopt processing.
>
> If SWIG isn't defined, then we shouldn't try to invoke it. Since somebody
> might want to do:
>
> $ make swig-py-ext SWIG=/usr/local/bin/swig
>
> We probably want a runtime test in the make rule. Something like:
>
> swig-py-ext:
> if test -n "$(SWIG)"; then \
> (cd $(SWIG_SRC_DIR)/python; \
> ...
> else \
> echo "SWIG variable is not defined; this rule is unavailable." \
> fi
You can find take 1 here:
http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgId=205572
With Greg's suggestion, I don't need the patch to setup.py, so I'm
leaving that out.
* Makefile.in
(SWIG): New make variable, derived from value passed via --with-swig
configure switch.
(swig-py-ext): Pass -s flag to setup.py to use the user-specified
swig binary (rather than whatever happens to be in their path),
failing with error message and status if SWIG is not set. Removed
parens creating extraneous sub-shell.
Index: Makefile.in
===================================================================
--- Makefile.in (revision 3691)
+++ Makefile.in (working copy)
@@ -65,6 +65,7 @@
APACHE_TARGET = @APACHE_TARGET@
APACHE_LIBEXECDIR = $(DESTDIR)@APACHE_LIBEXECDIR@
+SWIG = @SWIG@
SWIG_PY_INCLUDES = @SWIG_PY_INCLUDES@
SVN_APR_INCLUDES = @SVN_APR_INCLUDES@
@@ -260,13 +261,20 @@
done
swig-py-ext:
- (cd $(SWIG_SRC_DIR)/python; \
- $(PYTHON) setup.py \
+ if test -n "$(SWIG)"; then \
+ 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$(DESTDIR)$(prefix)/lib -L$(SVN_APR_PREFIX)/lib \
- build --build-base=$(SWIG_BUILD_DIR)/python/build)
+ -s"$(SWIG)" \
+ build --build-base=$(SWIG_BUILD_DIR)/python/build; \
+ else \
+ echo 'SWIG variable is not defined; this rule is unavailable' >&2; \
+ echo 'Re-run configure --with-swig' >&2; \
+ exit 1; \
+ fi
install-swig-py-ext:
(cd $(SWIG_BUILD_DIR)/python; \
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Nov 8 05:34:35 2002