#
#
#
# Makefile.PL for ::Exacct::File
#
# See ../Makefile.PL for an explanation of the linker flag manipulations.
require 5.8.4;
use Config;
use strict;
use warnings;
#
# Some later versions of ExtUtils::MakeMaker are broken,
# and complain about function redefinitions in the child Makefile.PLs.
# Stop the warnings.
#
no warnings qw(redefine);
#
# MakeMaker overrides.
#
package MY;
no warnings qw(once);
#
# Overrides that are common to both the ON and non-ON build environments.
#
#
# Suppress the setting of LD_RUN_PATH, as it isn't necessary.
#
sub const_loadlibs
{
my $self = shift(@_);
delete($self->{LD_RUN_PATH});
}
sub dynamic_lib
{
my $self = shift(@_);
$txt =~ s/LD_RUN_PATH=\S*\s*//;
return($txt);
}
#
# ON-specific overrides.
#
#
# Override postamble and replace it with one that explicitly records
# the dependency between File.c (generated from File.xs by xsubpp)
# and the FileDefs.xi file (generated from sys/exacct_catalog.h by
# extract_defines). Note we have to mimic the -I processing done by cc
# to find the correct version of the file, as we want the copy from the
# values exported by the perl module stay up-to date with the
# corresponding #defines.
#
*postamble = sub {
return <<'EOF';
done;
};
if (! exists($ENV{RELEASE_BUILD}));
# Don't install POD pages for ON.
#
# Non-ON overrides.
#
} else {
#
# Override postamble and replace it with one that explicitly records
# the dependency between File.c (generated from File.xs by xsubpp)
# extract_defines). This ensures # that the constant values exported
# by the perl module stay up-to date with the corresponding #defines.
#
*postamble = sub {
return <<'EOF';
};
# Install the POD documentation for non-ON builds.
my $man3pfx = '$(INST_MAN3DIR)/Sun::Solaris::Exacct';
$man3pfx . '::File.$(MAN3EXT)' }
);
}
#
# Having set everything up, write the Makefile.
#
package main;
NAME => 'Sun::Solaris::Exacct::File',
VERSION_FROM => 'File.pm',
H => [ '../exacct_common.xh' ],
TYPEMAPS => [ '../typemap' ],
@defines,
@man3pods,
dynamic_lib => { OTHERLDFLAGS =>
'-h $(DLBASE).$(DLEXT) ' .
'-R\$$ORIGIN/.. $(INST_ARCHAUTODIR)/../Exacct.so'
},
);