You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Philippe Poilbarbe <Ph...@cls.fr> on 2015/02/04 12:28:17 UTC

subversion 1.8.11: installing perl API with --prefix

Hello,

I had to install a version of subversion as a loadable module (via
environment modules) so it had to be in a non standard directory.

Configuring with the --prefix option works fine except for installing
the perl bindings: it wants to install it in the native perl directory
not in the 'prefix' subtree because the prefix is not transmitted to the
Makefile.PL.

Joined is a patch which corrects this (one line modified in Makefile.in).

Cheers,
Philippe.
-- 
Philippe Poilbarbe
CLS, Scientific Softwares (DT/PIL/LS).


Re: subversion 1.8.11: installing perl API with --prefix

Posted by Julian Foad <ju...@btopenworld.com>.
Branko Čibej wrote:
> Julian Foad wrote:
>> Just an additional thought: is there a way to pass all the relevant options 
>> at once to the subordinate 'Makefile.PL', instead of just passing this 
>> one particular option? For example, GNU Make puts its flags and variables 
>> defined on the command line into the environment variable 'MAKEFLAGS' 
>> and a subordinate 'make' process inherits the same definitions by 
>> reading them from this variable.
> 
> But this is not a subordinate make process. Makefile.PL is a Perl script
> ... not confusing at all.

Ah, thanks. I realized it was a Perl script; I hadn't realized its purpose was *making* a Makefile rather than *being* a Makefile.

>  $(SWIG_PL_DIR)/native/Makefile: $(SWIG_PL_DIR)/native/Makefile.PL
> -    cd $(SWIG_PL_DIR)/native; $(PERL) Makefile.PL
> +    cd $(SWIG_PL_DIR)/native; $(PERL) Makefile.PL PREFIX=$(prefix)

So the OP's suggestion sounds like the right sort of fix.

(Another observation: Looking at the documentation of MakeMaker [1], I notice that as well as PREFIX, an alternative 'INSTALL_BASE' is documented as 'more like what everyone
else calls "prefix" than PREFIX is.')

- Julian

[1] http://perldoc.perl.org/ExtUtils/MakeMaker.html#INSTALL_BASE


Re: subversion 1.8.11: installing perl API with --prefix

Posted by Branko Čibej <br...@wandisco.com>.
On 09.02.2015 10:23, Julian Foad wrote:
> Daniel Shahaf wrote:
>
>> Forwarding to dev@
>>
>> Philippe Poilbarbe wrote on Wed, Feb 04, 2015 at 12:28:17 +0100:
>>>  I had to install a version of subversion as a loadable module (via
>>>  environment modules) so it had to be in a non standard directory.
>>>
>>>  Configuring with the --prefix option works fine except for installing
>>>  the perl bindings: it wants to install it in the native perl directory
>>>  not in the 'prefix' subtree because the prefix is not transmitted to the
>>>  Makefile.PL.
>>>
>>>  Joined is a patch which corrects this (one line modified in Makefile.in).
> [...]
>>>  diff -Naur subversion-1.8.11.orig/Makefile.in subversion-1.8.11/Makefile.in
>>>  --- subversion-1.8.11.orig/Makefile.in    2014-02-10 05:04:51.000000000 +0100
>>>  +++ subversion-1.8.11/Makefile.in    2015-02-02 18:13:16.058431000 +0100
>>>  @@ -777,7 +777,7 @@
>>>       ./config.status subversion/bindings/swig/perl/native/Makefile.PL
>>>   
>>>   $(SWIG_PL_DIR)/native/Makefile: $(SWIG_PL_DIR)/native/Makefile.PL
>>>  -    cd $(SWIG_PL_DIR)/native; $(PERL) Makefile.PL
>>>  +    cd $(SWIG_PL_DIR)/native; $(PERL) Makefile.PL PREFIX=$(prefix)
> Just an additional thought: is there a way to pass all the relevant options at once to the subordinate 'Makefile.PL', instead of just passing this one particular option? For example, GNU Make puts its flags and variables defined on the command line into the environment variable 'MAKEFLAGS' and a subordinate 'make' process inherits the same definitions by reading them from this variable.

But this is not a subordinate make process. Makefile.PL is a Perl script
... not confusing at all.

-- Brane


Re: subversion 1.8.11: installing perl API with --prefix

Posted by Julian Foad <ju...@btopenworld.com>.
Daniel Shahaf wrote:

> Forwarding to dev@
> 
> Philippe Poilbarbe wrote on Wed, Feb 04, 2015 at 12:28:17 +0100:
>>  I had to install a version of subversion as a loadable module (via
>>  environment modules) so it had to be in a non standard directory.
>> 
>>  Configuring with the --prefix option works fine except for installing
>>  the perl bindings: it wants to install it in the native perl directory
>>  not in the 'prefix' subtree because the prefix is not transmitted to the
>>  Makefile.PL.
>> 
>>  Joined is a patch which corrects this (one line modified in Makefile.in).
[...]
>>  diff -Naur subversion-1.8.11.orig/Makefile.in subversion-1.8.11/Makefile.in
>>  --- subversion-1.8.11.orig/Makefile.in    2014-02-10 05:04:51.000000000 +0100
>>  +++ subversion-1.8.11/Makefile.in    2015-02-02 18:13:16.058431000 +0100
>>  @@ -777,7 +777,7 @@
>>       ./config.status subversion/bindings/swig/perl/native/Makefile.PL
>>   
>>   $(SWIG_PL_DIR)/native/Makefile: $(SWIG_PL_DIR)/native/Makefile.PL
>>  -    cd $(SWIG_PL_DIR)/native; $(PERL) Makefile.PL
>>  +    cd $(SWIG_PL_DIR)/native; $(PERL) Makefile.PL PREFIX=$(prefix)

Just an additional thought: is there a way to pass all the relevant options at once to the subordinate 'Makefile.PL', instead of just passing this one particular option? For example, GNU Make puts its flags and variables defined on the command line into the environment variable 'MAKEFLAGS' and a subordinate 'make' process inherits the same definitions by reading them from this variable.

- Julian


[1] http://www.gnu.org/software/make/manual/make.html#Options_002fRecursion

Re: subversion 1.8.11: installing perl API with --prefix

Posted by Philip Martin <ph...@wandisco.com>.
Daniel Shahaf <d....@daniel.shahaf.name> writes:

>> Joined is a patch which corrects this (one line modified in Makefile.in).

I've committed this in r1658459.

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

Re: subversion 1.8.11: installing perl API with --prefix

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Forwarding to dev@

Philippe Poilbarbe wrote on Wed, Feb 04, 2015 at 12:28:17 +0100:
> Hello,
> 
> I had to install a version of subversion as a loadable module (via
> environment modules) so it had to be in a non standard directory.
> 
> Configuring with the --prefix option works fine except for installing
> the perl bindings: it wants to install it in the native perl directory
> not in the 'prefix' subtree because the prefix is not transmitted to the
> Makefile.PL.
> 
> Joined is a patch which corrects this (one line modified in Makefile.in).
> 
> Cheers,
> Philippe.
> -- 
> Philippe Poilbarbe
> CLS, Scientific Softwares (DT/PIL/LS).
> 

> diff -Naur subversion-1.8.11.orig/Makefile.in subversion-1.8.11/Makefile.in
> --- subversion-1.8.11.orig/Makefile.in	2014-02-10 05:04:51.000000000 +0100
> +++ subversion-1.8.11/Makefile.in	2015-02-02 18:13:16.058431000 +0100
> @@ -777,7 +777,7 @@
>  	./config.status subversion/bindings/swig/perl/native/Makefile.PL
>  
>  $(SWIG_PL_DIR)/native/Makefile: $(SWIG_PL_DIR)/native/Makefile.PL
> -	cd $(SWIG_PL_DIR)/native; $(PERL) Makefile.PL
> +	cd $(SWIG_PL_DIR)/native; $(PERL) Makefile.PL PREFIX=$(prefix)
>  
>  # There is a "readlink -f" command on some systems for the same purpose,
>  # but it's not as portable (e.g. Mac OS X doesn't have it).  These should