You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Branko Čibej <br...@wandisco.com> on 2014/03/06 13:09:34 UTC

Re: svn commit: r1574842 - /subversion/trunk/configure.ac

On 06.03.2014 12:15, philip@apache.org wrote:
> Author: philip
> Date: Thu Mar  6 11:15:31 2014
> New Revision: 1574842
>
> URL: http://svn.apache.org/r1574842
> Log:
> * configure.ac: Tweak .pc generation to handle builddir != srcdir.
>
> Modified:
>     subversion/trunk/configure.ac
>
> Modified: subversion/trunk/configure.ac
> URL: http://svn.apache.org/viewvc/subversion/trunk/configure.ac?rev=1574842&r1=1574841&r2=1574842&view=diff
> ==============================================================================
> --- subversion/trunk/configure.ac (original)
> +++ subversion/trunk/configure.ac Thu Mar  6 11:15:31 2014
> @@ -1543,8 +1543,9 @@ AC_CONFIG_COMMANDS([svn_private_config.h
>  AC_CONFIG_FILES([Makefile])
>  
>  # Create pkg-config .pc files from .pc.in files
> -for pc_in_file in subversion/libsvn_*/*.pc.in; do
> -  pc_file="`echo ${pc_in_file} | $SED -e 's/.in$//'`"
> +for pc_in_file in ${abs_srcdir}/subversion/libsvn_*/*.pc.in; do
> +  pc_file=${pc_in_file#${abs_srcdir}/}
> +  pc_file=${pc_file%.in}


Aren't these last two lines bash-isms?

>    AC_CONFIG_FILES([${pc_file}])
>  done

-- Brane

-- 
Branko Čibej | Director of Subversion
WANdisco // Non-Stop Data
e. brane@wandisco.com

Re: svn commit: r1574842 - /subversion/trunk/configure.ac

Posted by Arfrever Frehtes Taifersar Arahesis <ar...@gmail.com>.
2014-03-06 13:09 Branko Čibej napisał(a):
> On 06.03.2014 12:15, philip@apache.org wrote:
> > Author: philip
> > Date: Thu Mar  6 11:15:31 2014
> > New Revision: 1574842
> >
> > URL: http://svn.apache.org/r1574842
> > Log:
> > * configure.ac: Tweak .pc generation to handle builddir != srcdir.
> >
> > Modified:
> >     subversion/trunk/configure.ac
> >
> > Modified: subversion/trunk/configure.ac
> > URL: http://svn.apache.org/viewvc/subversion/trunk/configure.ac?rev=1574842&r1=1574841&r2=1574842&view=diff
> > ==============================================================================
> > --- subversion/trunk/configure.ac (original)
> > +++ subversion/trunk/configure.ac Thu Mar  6 11:15:31 2014
> > @@ -1543,8 +1543,9 @@ AC_CONFIG_COMMANDS([svn_private_config.h
> >  AC_CONFIG_FILES([Makefile])
> >  
> >  # Create pkg-config .pc files from .pc.in files
> > -for pc_in_file in subversion/libsvn_*/*.pc.in; do
> > -  pc_file="`echo ${pc_in_file} | $SED -e 's/.in$//'`"
> > +for pc_in_file in ${abs_srcdir}/subversion/libsvn_*/*.pc.in; do
> > +  pc_file=${pc_in_file#${abs_srcdir}/}
> > +  pc_file=${pc_file%.in}
> 
> 
> Aren't these last two lines bash-isms?

This feature is in POSIX:
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_02

--
Arfrever Frehtes Taifersar Arahesis

Re: svn commit: r1574842 - /subversion/trunk/configure.ac

Posted by Stefan Sperling <st...@elego.de>.
On Thu, Mar 06, 2014 at 01:09:34PM +0100, Branko Čibej wrote:
> > @@ -1543,8 +1543,9 @@ AC_CONFIG_COMMANDS([svn_private_config.h
> >  AC_CONFIG_FILES([Makefile])
> >  
> >  # Create pkg-config .pc files from .pc.in files
> > -for pc_in_file in subversion/libsvn_*/*.pc.in; do
> > -  pc_file="`echo ${pc_in_file} | $SED -e 's/.in$//'`"
> > +for pc_in_file in ${abs_srcdir}/subversion/libsvn_*/*.pc.in; do
> > +  pc_file=${pc_in_file#${abs_srcdir}/}
> > +  pc_file=${pc_file%.in}
> 
> 
> Aren't these last two lines bash-isms?

Works here with OpenBSD's korn shell.

$ echo $abs_srcdir
/home/stsp/svn/svn-trunk
$ for pc_in_file in "${abs_srcdir}"/subversion/libsvn_*/*.pc.in; do       
>   pc_file=${pc_in_file#${abs_srcdir}/}
>   pc_file=${pc_file%.in}
>   echo $pc_file
> done
subversion/libsvn_auth_gnome_keyring/libsvn_auth_gnome_keyring.pc
subversion/libsvn_auth_kwallet/libsvn_auth_kwallet.pc
subversion/libsvn_client/libsvn_client.pc
subversion/libsvn_delta/libsvn_delta.pc
subversion/libsvn_diff/libsvn_diff.pc
subversion/libsvn_fs/libsvn_fs.pc
subversion/libsvn_fs_base/libsvn_fs_base.pc
subversion/libsvn_fs_fs/libsvn_fs_fs.pc
subversion/libsvn_fs_util/libsvn_fs_util.pc
subversion/libsvn_fs_x/libsvn_fs_x.pc
subversion/libsvn_ra/libsvn_ra.pc
subversion/libsvn_ra_local/libsvn_ra_local.pc
subversion/libsvn_ra_serf/libsvn_ra_serf.pc
subversion/libsvn_ra_svn/libsvn_ra_svn.pc
subversion/libsvn_repos/libsvn_repos.pc
subversion/libsvn_subr/libsvn_subr.pc
subversion/libsvn_wc/libsvn_wc.pc

Re: svn commit: r1574842 - /subversion/trunk/configure.ac

Posted by Philip Martin <ph...@wandisco.com>.
Ben Reser <be...@reser.org> writes:

> On 3/6/14, 10:29 AM, Philip Martin wrote:
>> It's also used in SVN_REMOVE_STANDARD_LIB_DIRS and so it is what is
>> causing the Solaris fails with some shells.
>
> Being in POSIX just isn't good enough.  POSIX has a lot of features that very
> basic shells just don't have.  Solaris sadly is a major platform that has a
> /bin/sh that is missing a lot of stuff that POSIX says you should have.  I
> think it also has a POSIX compliant shell but it's a hassle to users to tell
> people to specify a different shell.  A hassle we can usually avoid by just
> using a slightly different syntax.
>
> Philip is working on a buildbot on Solaris so hopefully these sorts of things
> will be exposed more quickly and we won't end up having end users telling us.

configure itself attempts to choose a working shell.  The Solaris box
gives me SHELL=/bin/bash on login.  Both configure and config.nice start
with #!/bin/sh and configure would fail if it simply used that.  However
it doesn't fail because configure has code to test and exec so that it
runs with SHELL=/bin/bash.  I have to go out of my way to force /bin/sh
to get configure to fail.

-- 
Philip Martin | Subversion Committer
WANdisco // *Non-Stop Data*

Re: svn commit: r1574842 - /subversion/trunk/configure.ac

Posted by Ben Reser <be...@reser.org>.
On 3/6/14, 10:29 AM, Philip Martin wrote:
> It's also used in SVN_REMOVE_STANDARD_LIB_DIRS and so it is what is
> causing the Solaris fails with some shells.

Being in POSIX just isn't good enough.  POSIX has a lot of features that very
basic shells just don't have.  Solaris sadly is a major platform that has a
/bin/sh that is missing a lot of stuff that POSIX says you should have.  I
think it also has a POSIX compliant shell but it's a hassle to users to tell
people to specify a different shell.  A hassle we can usually avoid by just
using a slightly different syntax.

Philip is working on a buildbot on Solaris so hopefully these sorts of things
will be exposed more quickly and we won't end up having end users telling us.

Re: svn commit: r1574842 - /subversion/trunk/configure.ac

Posted by Philip Martin <ph...@wandisco.com>.
Philip Martin <ph...@wandisco.com> writes:

> Branko Čibej <br...@wandisco.com> writes:
>
>> On 06.03.2014 12:15, philip@apache.org wrote:
>>> +for pc_in_file in ${abs_srcdir}/subversion/libsvn_*/*.pc.in; do
>>> +  pc_file=${pc_in_file#${abs_srcdir}/}
>>> +  pc_file=${pc_file%.in}
>>
>>
>> Aren't these last two lines bash-isms?
>
> We already use the construct in apache.m4, although I suppose that
> doesn't necessarily prove it works...
>
> configure fails on Solaris with /usr/bin/sh and /usr/xpg4/bin/sh but
> long before it gets to this bit.

It's also used in SVN_REMOVE_STANDARD_LIB_DIRS and so it is what is
causing the Solaris fails with some shells.

-- 
Philip Martin | Subversion Committer
WANdisco // *Non-Stop Data*

Re: svn commit: r1574842 - /subversion/trunk/configure.ac

Posted by Philip Martin <ph...@wandisco.com>.
Branko Čibej <br...@wandisco.com> writes:

> On 06.03.2014 12:15, philip@apache.org wrote:
>> +for pc_in_file in ${abs_srcdir}/subversion/libsvn_*/*.pc.in; do
>> +  pc_file=${pc_in_file#${abs_srcdir}/}
>> +  pc_file=${pc_file%.in}
>
>
> Aren't these last two lines bash-isms?

We already use the construct in apache.m4, although I suppose that
doesn't necessarily prove it works...

configure fails on Solaris with /usr/bin/sh and /usr/xpg4/bin/sh but
long before it gets to this bit.

-- 
Philip Martin | Subversion Committer
WANdisco // *Non-Stop Data*