2 use ExtUtils
::MakeMaker
;
6 my $perl_path = $Config{perlpath
};
8 $perl_path .= $Config{_exe
} unless $perl_path =~ m/$Config{_exe}$/i;
11 my $top_builddir = '@top_builddir@';
12 my $top_srcdir = '@top_srcdir@';
13 my $svnlib_srcdir = "${top_srcdir}/subversion";
14 my $svnlib_builddir = "${top_builddir}/subversion";
15 my $swig_srcdir = "${svnlib_srcdir}/bindings/swig";
16 my $swig_builddir = "${svnlib_builddir}/bindings/swig";
18 my @modules = qw
/client delta fs ra repos wc/;
19 my @ldpaths = ("$swig_builddir/perl/libsvn_swig_perl/.libs",
20 map {"$svnlib_builddir/libsvn_$_/.libs"} (@modules, qw
/diff subr
28 my @ldmodules = map {"-lsvn_$_-1"} (@modules, qw
/diff subr/);
30 my $apr_shlib_path_var = '@SVN_APR_SHLIB_PATH_VAR@';
31 my $cppflags = '@CPPFLAGS@';
32 my $apr_cflags = '@SVN_APR_INCLUDES@';
33 my $apu_cflags = '@SVN_APRUTIL_INCLUDES@';
35 # According to the log of r7937, the flags guarded by the conditional break
36 # the build on FreeBSD if not conditionalized.
37 my $apr_ldflags = '@SVN_APR_EXPORT_LIBS@'
38 if $^O
eq 'darwin' or $^O
eq 'cygwin';
40 chomp $apr_shlib_path_var;
43 ABSTRACT
=> 'Perl bindings for Subversion',
45 INC
=> join(' ',$apr_cflags, $apu_cflags,
46 " -I$swig_srcdir/perl/libsvn_swig_perl",
47 " -I$svnlib_srcdir/include",
48 " -I$svnlib_builddir",
49 " -I$swig_srcdir -g"),
50 OBJECT
=> q
/$(O_FILES)/,
51 LIBS
=> [join(' ', $apr_ldflags,
52 (map {$_ = abs_path
($_); "-L$_"} @ldpaths),
53 @ldmodules, '-lsvn_swig_perl-1',
54 `$swig -perl -ldflags`)],
55 test
=> { TESTS
=> "$swig_srcdir/perl/native/t/*.t" }
64 WriteMakefile
(%config, NAME
=> 'SVN::_Core', C
=> ['core.c'],
65 PM
=> {map { ("$swig_srcdir/perl/native/$_.pm" =>
66 "\$(INST_LIBDIR)/$_.pm") }
68 ('base', 'core', @modules)},
69 MAN3PODS
=> {map { ("$swig_srcdir/perl/native/$_.pm" =>
70 "\$(INST_MAN3DIR)/SVN::$_.\$(MAN3EXT)") }
72 ('base', 'core', @modules)},
73 clean
=> { FILES
=> "*.bs".
74 join(' Makefile.','',@modules) }
78 WriteMakefile
(%config,
79 MAKEFILE
=> "Makefile.$_",
80 NAME
=> "SVN::_".perlish
($_),
85 # the dependencies need to be fixed
90 my $module_c_files = join (' ',map { "svn_$_.c"} @modules);
91 my $module_make_commands = join ('',map {"\t\$(MAKE) -f Makefile.$_\n"} @modules);
93 my $fullperlrun = "$apr_shlib_path_var=" . join(':',@ldpaths);
101 \t$perl_path -MPAR::Dist -e"blip_to_par(name=>'SVN",version=>'`$perl_path -Mblib -MSVN::Core -e 'print $SVN::Core::VERSION'`')"
103 modules :: $module_c_files
104 $module_make_commands\t\$(NOECHO) \$(TOUCH) \$\@
106 FULLPERLRUN=$fullperlrun \$(FULLPERL)