Author: peters
Date: Sun Nov 21 00:09:54 2010
New Revision: 1037358

URL: http://svn.apache.org/viewvc?rev=1037358&view=rev
Log:
Minor cleanups to Makefile.PL.in, and fix a corner case I discovered in
passing.

* subversion/bindings/swig/perl/native/Makefile.PL.in
  (TOP): Expand @ldpaths to absolute paths at definition time, instead
   of at first use.  Not a functional change, but somewhat clearer.
   Well, this also fixes running 'perl Makefile.PL' before building the
   rest of Subversion, since previously the abs_path() function failed
   if the .libs directories had not been created yet.
  (MY::postamble): Fix indentation.  Delete unneeded 'package MY'.
   Use 'join' a little more intuitively (IMO).

Modified:
    subversion/trunk/subversion/bindings/swig/perl/native/Makefile.PL.in

Modified: subversion/trunk/subversion/bindings/swig/perl/native/Makefile.PL.in
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/swig/perl/native/Makefile.PL.in?rev=1037358&r1=1037357&r2=1037358&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/swig/perl/native/Makefile.PL.in 
(original)
+++ subversion/trunk/subversion/bindings/swig/perl/native/Makefile.PL.in Sun 
Nov 21 00:09:54 2010
@@ -37,15 +37,11 @@ my $swig_srcdir = "${svnlib_srcdir}/bind
 my $swig_builddir = "${svnlib_builddir}/bindings/swig";
 
 my @modules = qw/client delta fs ra repos wc/;
-my @ldpaths = ("$swig_builddir/perl/libsvn_swig_perl/.libs",
-               map {"$svnlib_builddir/libsvn_$_/.libs"} (@modules, qw/diff subr
-                                                                      ra_local
-                                                                      ra_svn
-                                                                      ra_neon
-                                                                      ra_serf
-                                                                      fs_base
-                                                                      fs_util
-                                                                      fs_fs/));
+my @ldpaths = (abs_path($swig_builddir) . "/perl/libsvn_swig_perl/.libs",
+               map { abs_path($svnlib_builddir) . "/libsvn_$_/.libs" }
+                   @modules, qw/diff subr ra_local ra_svn ra_neon
+                                ra_serf fs_base fs_util fs_fs/);
+
 my @ldmodules = map {"-lsvn_$_-1"} (@modules, qw/diff subr/);
 
 my $apr_shlib_path_var = '@SVN_APR_SHLIB_PATH_VAR@';
@@ -72,7 +68,7 @@ my %config = (
                  " -I$swig_srcdir -g"),
     OBJECT => q/$(O_FILES)/,
     LIBS => [join(' ', $apr_ldflags,
-                  (map {$_ = abs_path($_); "-L$_"} @ldpaths),
+                  (map {"-L$_"} @ldpaths),
                   @ldmodules, '-lsvn_swig_perl-1',
                   `$swig -perl -ldflags`)],
     test => { TESTS => "$swig_srcdir/perl/native/t/*.t" }
@@ -108,13 +104,12 @@ for (@modules) {
 # the dependencies need to be fixed
 
 sub MY::postamble {
-   package MY ;
-   
-   my $module_c_files = join (' ',map { "svn_$_.c"} @modules);
-   my $module_make_commands = join ('',map {"\t\$(MAKE) -f Makefile.$_\n"} 
@modules);
+    my $module_c_files = join (' ',map { "svn_$_.c"} @modules);
+    my $module_make_commands = join ('',map {"\t\$(MAKE) -f Makefile.$_\n"} 
@modules);
+
+    my $fullperlrun = "$apr_shlib_path_var=" .
+                      join(':', "\$($apr_shlib_path_var)", @ldpaths);
 
-  my $fullperlrun = "$apr_shlib_path_var=\${$apr_shlib_path_var}:" . 
join(':',@ldpaths);
-  
    return <<"EOPOST";
 all :: modules
 test :: modules


Reply via email to