Merge commit 'origin/master'; commit 'savannah/master'
[pspp-builds.git] / perl-module / Makefile.PL
index dfa235e76562f07a31d7f2053cdb9aaf590f010f..cf4131760c0e875a771b3053d7f42f538db944e6 100644 (file)
@@ -5,13 +5,15 @@ use ExtUtils::MakeMaker;
 
 
 do 'pspp-module-config' || do {
-    my $src = prompt ("Enter the location of the full pspp source","../pspp");
-    my $build = prompt ("Enter the location of the pspp build directory", "$src" );
+    my $build = prompt ("Enter the location of the build directory of the configured pspp source:", "" );
+    do 'lib/pspp-vers.pl' || die "No version info";
+    my $src = $top_srcdir;
 
     %Locations = (SourceDir => "$src", BuildDir => "$build");
 };
 
 WriteMakefile(
+    FULLPERL          => "PSPP_TEST_CMD=\"$Locations{BuildDir}/src/ui/terminal/pspp -B $Locations{SourceDir}/config\" \$(PERL)",
     NAME              => 'PSPP',
     DISTNAME          => 'PSPP-Perl',
     VERSION_FROM      => "$Locations{BuildDir}/src/libpspp/version.c", 
@@ -20,8 +22,7 @@ WriteMakefile(
       (ABSTRACT_FROM  => 'lib/PSPP.pm', # retrieve abstract from module
        AUTHOR         => 'John Darrington <john@darrington.wattle.id.au>') : ()),
     INC       => "-I $Locations{SourceDir}  -I $Locations{SourceDir}/src -I $Locations{SourceDir}/gl -I $Locations{BuildDir}/gl -I $Locations{BuildDir}", 
-
-    MYEXTLIB  => "$Locations{BuildDir}/src/.libs/libpspp-core\$(LIB_EXT)",
+    MYEXTLIB  => "$Locations{BuildDir}/src/.libs/libpspp-core.\$(DLEXT)",
     MAN3PODS  => {"lib/PSPP.pm", "\$(INST_MAN3DIR)/PSPP.3pm",
            "Examples.pod", "\$(INST_MAN3DIR)/PSPP::Examples.3pm"}
 );