Lines 2-7
Link Here
|
2 |
|
2 |
|
3 |
use strict; |
3 |
use strict; |
4 |
use ExtUtils::MakeMaker; |
4 |
use ExtUtils::MakeMaker; |
|
|
5 |
use Carp; |
5 |
use Config; # for path separator |
6 |
use Config; # for path separator |
6 |
use File::Spec; # for catpath |
7 |
use File::Spec; # for catpath |
7 |
use File::Basename; # for locating swish-e binary based on location of swish-config |
8 |
use File::Basename; # for locating swish-e binary based on location of swish-config |
Lines 22-27
Link Here
|
22 |
NORECURS => 1, # keep it from recursing into subdirectories |
23 |
NORECURS => 1, # keep it from recursing into subdirectories |
23 |
DIR => [], |
24 |
DIR => [], |
24 |
XSPROTOARG => '-noprototypes', |
25 |
XSPROTOARG => '-noprototypes', |
|
|
26 |
CCFLAGS => '-I../src', |
25 |
PREREQ_PM => { |
27 |
PREREQ_PM => { |
26 |
'File::Spec' => '0.8', |
28 |
'File::Spec' => '0.8', |
27 |
}, |
29 |
}, |
Lines 81-88
Link Here
|
81 |
EOF |
83 |
EOF |
82 |
|
84 |
|
83 |
$SIG{__DIE__} = sub { |
85 |
$SIG{__DIE__} = sub { |
84 |
print STDERR "\n ** ERROR: ", @_; |
86 |
Carp::cluck("** ERROR: ", @_ , "\n Run perl Makefile.PL SWISHHELP for options\n\n"); |
85 |
print STDERR " Run perl Makefile.PL SWISHHELP for options\n\n"; |
|
|
86 |
exit 1; |
87 |
exit 1; |
87 |
}; |
88 |
}; |
88 |
|
89 |
|
Lines 107-113
Link Here
|
107 |
|
108 |
|
108 |
|
109 |
|
109 |
test_version( $swish_config{VERSION}, $MIN_VERSION ) |
110 |
test_version( $swish_config{VERSION}, $MIN_VERSION ) |
110 |
or die "Swish version $swish_config{VERSION} is older than required version $MIN_VERSION\n"; |
111 |
or Carp::croak("Swish version $swish_config{VERSION} is older than required version $MIN_VERSION\n"); |
111 |
|
112 |
|
112 |
|
113 |
|
113 |
|
114 |
|
Lines 123-132
Link Here
|
123 |
$config{test}{TESTS} = 't/dummy.t'; |
124 |
$config{test}{TESTS} = 't/dummy.t'; |
124 |
} |
125 |
} |
125 |
|
126 |
|
126 |
|
127 |
{ |
127 |
|
128 |
# MakeMaker uses "Eval" for type-checking of sorts |
128 |
|
129 |
# Hooking __DIE__ for it will result in the tests dying |
129 |
WriteMakefile( %make_maker_opts, %config ); |
130 |
# When there is really nothing wrong, and this causes |
|
|
131 |
# Build to Exit! D: |
132 |
# see perldoc -f eval for details |
133 |
eval { |
134 |
local $SIG{__DIE__} = 'DEFAULT'; |
135 |
WriteMakefile( %make_maker_opts, %config ); |
136 |
undef $@; |
137 |
}; |
138 |
die $@ if $@; |
139 |
} |
130 |
|
140 |
|
131 |
|
141 |
|
132 |
#---------------------------------------------------------------------------------- |
142 |
#---------------------------------------------------------------------------------- |