You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Eric Gillespie <ep...@pretzelnet.org> on 2003/08/16 00:03:54 UTC
[PATCH] Put CPPFLAGS in SWIG_PY_COMPILE and friends
Does anyone have any objection to this change? CPPFLAGS often
contains some necessary settings, and without it building the
bindings can fail. I'll go ahead and commit if no one screams.
* Makefile.in:
Add $(CPPFLAGS) to SWIG_PY_COMPILE, SWIG_JAVA_COMPILE, and
SWIG_PL_COMPILE.
--- Makefile.in (revision 6747)
+++ Makefile.in (working copy)
@@ -107,13 +107,13 @@
$(SVN_APR_INCLUDES)
SWIG_LDFLAGS = @SWIG_LDFLAGS@
SWIG_PY_INCLUDES = @SWIG_PY_INCLUDES@
-SWIG_PY_COMPILE = @SWIG_PY_COMPILE@
+SWIG_PY_COMPILE = @SWIG_PY_COMPILE@ $(CPPFLAGS)
SWIG_PY_LINK = @SWIG_PY_LINK@
SWIG_JAVA_INCLUDES = @SWIG_JAVA_INCLUDES@
-SWIG_JAVA_COMPILE = $(CC) -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC
+SWIG_JAVA_COMPILE = $(CC) -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC $(CPPFLAGS)
SWIG_JAVA_LINK = $(CC) -shared
SWIG_PL_INCLUDES = @SWIG_PL_INCLUDES@
-SWIG_PL_COMPILE = @SWIG_PL_COMPILE@
+SWIG_PL_COMPILE = @SWIG_PL_COMPILE@ $(CPPFLAGS)
SWIG_PL_LINK = @SWIG_PL_LINK@
SVN_APR_INCLUDES = @SVN_APR_INCLUDES@
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Put CPPFLAGS in SWIG_PY_COMPILE and friends
Posted by Sander Roobol <ph...@wanadoo.nl>.
On Sat, Aug 16, 2003 at 02:17:05PM -0500, Eric Gillespie wrote:
> Greg Hudson <gh...@MIT.EDU> writes:
>
> > Well, it's better to perpetuate existing hackishness than it is to
> > introduce completely new hackishness, but it's still distasteful. When
> > you have a variable substituted into a Makefile by a configure script,
> > it shouldn't change name or value during the assignment, or people are
> > more likely to get confused when debugging build problems. Better to
> > pick different variable names for the extended values.
>
> OK. How's this? SWIG_PY_COMPILE and SWIG_PL_COMPILE are only
> used to define COMPILE_PY_WRAPPER and COMPILE_PL_WRAPPER, so it
> looks like the extended value macro you were suggesting already
> exists.
I've filed this patch as issue #1503:
http://subversion.tigris.org/issues/show_bug.cgi?id=1503
Sander
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Put CPPFLAGS in SWIG_PY_COMPILE and friends
Posted by Eric Gillespie <ep...@pretzelnet.org>.
Greg Hudson <gh...@MIT.EDU> writes:
> Well, it's better to perpetuate existing hackishness than it is to
> introduce completely new hackishness, but it's still distasteful. When
> you have a variable substituted into a Makefile by a configure script,
> it shouldn't change name or value during the assignment, or people are
> more likely to get confused when debugging build problems. Better to
> pick different variable names for the extended values.
OK. How's this? SWIG_PY_COMPILE and SWIG_PL_COMPILE are only
used to define COMPILE_PY_WRAPPER and COMPILE_PL_WRAPPER, so it
looks like the extended value macro you were suggesting already
exists.
Index: Makefile.in
===================================================================
--- Makefile.in (revision 6756)
+++ Makefile.in (working copy)
@@ -149,9 +149,9 @@
RUN_SWIG_JAVA = cd ${SWIG_SRC_DIR}/java/org/tigris/subversion/swig && $(SWIG) -c -java -package 'org.tigris.subversion.swig' $(SWIG_INCLUDES) -o ${abs_builddir}/$@
# Compilation of SWIG-generated C source code
-COMPILE_PY_WRAPPER = $(LIBTOOL) $(LTFLAGS) --mode=compile $(SWIG_PY_COMPILE) $(SWIG_INCLUDES) $(SWIG_PY_INCLUDES) -prefer-pic -c -o $@
+COMPILE_PY_WRAPPER = $(LIBTOOL) $(LTFLAGS) --mode=compile $(SWIG_PY_COMPILE) $(CPPFLAGS) $(SWIG_INCLUDES) $(SWIG_PY_INCLUDES) -prefer-pic -c -o $@
COMPILE_JAVA_WRAPPER = $(LIBTOOL) $(LTFLAGS) --mode=compile $(SWIG_JAVA_COMPILE) -DSWIGJAVA $(SWIG_INCLUDES) $(SWIG_JAVA_INCLUDES) -prefer-pic -c -o $@
-COMPILE_PL_WRAPPER = $(LIBTOOL) $(LTFLAGS) --mode=compile $(SWIG_PL_COMPILE) $(SWIG_INCLUDES) $(SWIG_PL_INCLUDES) -prefer-pic -c -o $@
+COMPILE_PL_WRAPPER = $(LIBTOOL) $(LTFLAGS) --mode=compile $(SWIG_PL_COMPILE) $(CPPFLAGS) $(SWIG_INCLUDES) $(SWIG_PL_INCLUDES) -prefer-pic -c -o $@
# these commands link the wrapper objects into an extension library/module
LINK_PY_WRAPPER = $(LIBTOOL) $(LTFLAGS) --mode=link $(SWIG_PY_LINK) $(SWIG_LDFLAGS) -rpath $(swig_pydir) -avoid-version -module
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Put CPPFLAGS in SWIG_PY_COMPILE and friends
Posted by Greg Hudson <gh...@MIT.EDU>.
On Fri, 2003-08-15 at 21:19, Eric Gillespie wrote:
> I'm passing CPPFLAGS to cc(1). The rest of the command to run is
> pulled from Python's Makefile, hard-coded for Java, and i don't
> know where it comes from for Perl. Does that make sense nwo?
Clearer, yes.
> > And the first and third changes don't seem appropriate;
> > changing "FOO = @FOO@" to "FOO = @FOO@ otherstuff" is hackish.
>
> Heh, the first and third are the only ones i'm concerned with :).
> This style is used elsewhere in the file, for example in the
> definition of CPPFLAGS itself. What would you suggest doing
> instead?
Well, it's better to perpetuate existing hackishness than it is to
introduce completely new hackishness, but it's still distasteful. When
you have a variable substituted into a Makefile by a configure script,
it shouldn't change name or value during the assignment, or people are
more likely to get confused when debugging build problems. Better to
pick different variable names for the extended values.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Put CPPFLAGS in SWIG_PY_COMPILE and friends
Posted by Eric Gillespie <ep...@pretzelnet.org>.
Greg Hudson <gh...@MIT.EDU> writes:
> On Fri, 2003-08-15 at 20:03, Eric Gillespie wrote:
> > +SWIG_PY_COMPILE = @SWIG_PY_COMPILE@ $(CPPFLAGS)
> > +SWIG_JAVA_COMPILE = $(CC) -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC
> $(CPPFLAGS)
> > +SWIG_PL_COMPILE = @SWIG_PL_COMPILE@ $(CPPFLAGS)
>
> I'm not sure I understand the spirit of the change; passing C
> preprocessor flags to Python, Java, or Perl compile commands seems
> strange.
I'm passing CPPFLAGS to cc(1). The rest of the command to run is
pulled from Python's Makefile, hard-coded for Java, and i don't
know where it comes from for Perl. Does that make sense nwo?
> And the first and third changes don't seem appropriate;
> changing "FOO = @FOO@" to "FOO = @FOO@ otherstuff" is hackish.
Heh, the first and third are the only ones i'm concerned with :).
This style is used elsewhere in the file, for example in the
definition of CPPFLAGS itself. What would you suggest doing
instead?
--
Eric Gillespie <*> epg@pretzelnet.org
Build a fire for a man, and he'll be warm for a day. Set a man on
fire, and he'll be warm for the rest of his life. -Terry Pratchett
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Put CPPFLAGS in SWIG_PY_COMPILE and friends
Posted by Greg Hudson <gh...@MIT.EDU>.
On Fri, 2003-08-15 at 20:03, Eric Gillespie wrote:
> +SWIG_PY_COMPILE = @SWIG_PY_COMPILE@ $(CPPFLAGS)
> +SWIG_JAVA_COMPILE = $(CC) -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC $(CPPFLAGS)
> +SWIG_PL_COMPILE = @SWIG_PL_COMPILE@ $(CPPFLAGS)
I'm not sure I understand the spirit of the change; passing C
preprocessor flags to Python, Java, or Perl compile commands seems
strange. And the first and third changes don't seem appropriate;
changing "FOO = @FOO@" to "FOO = @FOO@ otherstuff" is hackish.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Put CPPFLAGS in SWIG_PY_COMPILE and friends
Posted by Julian Foad <ju...@btopenworld.com>.
Eric Gillespie wrote:
> Does anyone have any objection to this change? CPPFLAGS often
> contains some necessary settings, and without it building the
> bindings can fail. I'll go ahead and commit if no one screams.
>
>
> * Makefile.in:
> Add $(CPPFLAGS) to SWIG_PY_COMPILE, SWIG_JAVA_COMPILE, and
> SWIG_PL_COMPILE.
I don't know anything about this change specifically, but it's always good for the log message to start with a summary of What you are changing and Why. For example, cutting and pasting from your Subject: and introduction,
[[[
Put CPPFLAGS in SWIG_PY_COMPILE and friends, because CPPFLAGS often
contains some necessary settings, and without it building the
bindings can fail.
* Makefile.in:
Add $(CPPFLAGS) to SWIG_PY_COMPILE, SWIG_JAVA_COMPILE, and
SWIG_PL_COMPILE.
]]]
- Julian
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org