|
Packit |
074f87 |
use ExtUtils::MakeMaker;
|
|
Packit |
074f87 |
|
|
Packit |
074f87 |
use strict;
|
|
Packit |
074f87 |
require 5.008001;
|
|
Packit |
074f87 |
|
|
Packit |
074f87 |
# Remember (like I didn't) that WriteMakefile looks at @ARGV,
|
|
Packit |
074f87 |
# so an alternative way to configure a debugging build is:
|
|
Packit |
074f87 |
# perl Makefile.PL DEFINE=-DPADWALKER_DEBUGGING.
|
|
Packit |
074f87 |
my $DEBUGGING = '';
|
|
Packit |
074f87 |
if (@ARGV && $ARGV[0] eq '-d') {
|
|
Packit |
074f87 |
warn "Configuring a debugging build of PadWalker\n";
|
|
Packit |
074f87 |
print STDERR <
|
|
Packit |
074f87 |
************************************************************************
|
|
Packit |
074f87 |
* WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! *
|
|
Packit |
074f87 |
************************************************************************
|
|
Packit |
074f87 |
You are building PadWalker in debugging mode, which causes it to
|
|
Packit |
074f87 |
print a lot of gnomic information about its internal operation.
|
|
Packit |
074f87 |
The test suite will fail, because this information will confuse
|
|
Packit |
074f87 |
the test harness. You almost certainly do *not* want to do this
|
|
Packit |
074f87 |
unless you're the author of PadWalker (or perhaps just irrepressibly
|
|
Packit |
074f87 |
curious about its internal operation).
|
|
Packit |
074f87 |
|
|
Packit |
074f87 |
END
|
|
Packit |
074f87 |
|
|
Packit |
074f87 |
$DEBUGGING = '-DPADWALKER_DEBUGGING';
|
|
Packit |
074f87 |
shift;
|
|
Packit |
074f87 |
}
|
|
Packit |
074f87 |
|
|
Packit |
074f87 |
WriteMakefile(
|
|
Packit |
074f87 |
'NAME' => 'PadWalker',
|
|
Packit |
074f87 |
'VERSION_FROM' => 'PadWalker.pm', # finds $VERSION
|
|
Packit |
074f87 |
'LIBS' => [''], # e.g., '-lm'
|
|
Packit |
074f87 |
'DEFINE' => $DEBUGGING,
|
|
Packit |
074f87 |
'INC' => '', # e.g., '-I/usr/include/other',
|
|
Packit |
074f87 |
($DEBUGGING ? (CCFLAGS => '-Wall -ansi') : ()),
|
|
Packit |
074f87 |
dist => {TAR => 'env COPYFILE_DISABLE=true tar'},
|
|
Packit |
074f87 |
MIN_PERL_VERSION => "5.008001",
|
|
Packit |
074f87 |
);
|