10Sstevel@tonic-gate# 2*12388SJohn.Sonnenschein@Sun.COM# Copyright (c) 2002, 2008, Oracle and/or its affiliates. All rights reserved. 30Sstevel@tonic-gate# 4*12388SJohn.Sonnenschein@Sun.COM 50Sstevel@tonic-gate# 60Sstevel@tonic-gate# Makefile.PL for ::Task 70Sstevel@tonic-gate# 80Sstevel@tonic-gate 98287SJohn.Sonnenschein@Sun.COMrequire 5.8.4; 100Sstevel@tonic-gateuse strict; 110Sstevel@tonic-gateuse warnings; 120Sstevel@tonic-gateuse ExtUtils::MakeMaker; 130Sstevel@tonic-gate 140Sstevel@tonic-gate# #defines. 150Sstevel@tonic-gatemy @defines = ( DEFINE => exists($ENV{RELEASE_BUILD}) ? '-DNDEBUG' : '' ); 160Sstevel@tonic-gate 170Sstevel@tonic-gate# List of POD pages to install. 180Sstevel@tonic-gatemy @man3pods = ( MAN3PODS => {} ); 190Sstevel@tonic-gate 200Sstevel@tonic-gate# 210Sstevel@tonic-gate# If not building as part of ON. 220Sstevel@tonic-gate# 230Sstevel@tonic-gateif (! exists($ENV{CODEMGR_WS})) { 240Sstevel@tonic-gate 250Sstevel@tonic-gate # 260Sstevel@tonic-gate # Suppress the setting of LD_RUN_PATH. The ON build environment 270Sstevel@tonic-gate # contains a modified MakeMaker that does this automatically, so we 280Sstevel@tonic-gate # only need to do this if we are building outside of ON. 290Sstevel@tonic-gate # 300Sstevel@tonic-gate package MY; 310Sstevel@tonic-gate no warnings qw(once); 320Sstevel@tonic-gate 330Sstevel@tonic-gate # Override const_loadlibs to remove LD_RUN_PATH cruft. 340Sstevel@tonic-gate *const_loadlibs = sub 350Sstevel@tonic-gate { 360Sstevel@tonic-gate my $self = shift(@_); 370Sstevel@tonic-gate delete($self->{LD_RUN_PATH}); 380Sstevel@tonic-gate return($self->SUPER::const_loadlibs(@_)); 390Sstevel@tonic-gate }; 400Sstevel@tonic-gate 410Sstevel@tonic-gate # Override dynamic_lib to get rid of LD_RUN_PATH cruft. 420Sstevel@tonic-gate *dynamic_lib = sub 430Sstevel@tonic-gate { 440Sstevel@tonic-gate my $self = shift(@_); 450Sstevel@tonic-gate my $txt = $self->SUPER::dynamic_lib(@_); 460Sstevel@tonic-gate $txt =~ s/LD_RUN_PATH=\S*\s*//; 470Sstevel@tonic-gate return($txt); 480Sstevel@tonic-gate }; 490Sstevel@tonic-gate 500Sstevel@tonic-gate # Turn off debugging. 510Sstevel@tonic-gate @defines = (); 520Sstevel@tonic-gate 530Sstevel@tonic-gate # 540Sstevel@tonic-gate # Install the POD documentation for non-ON builds. 550Sstevel@tonic-gate # 560Sstevel@tonic-gate my $man3pfx = '$(INST_MAN3DIR)/Sun::Solaris::Task'; 570Sstevel@tonic-gate @man3pods = ( 580Sstevel@tonic-gate MAN3PODS => { 'pod/Task.pod' => $man3pfx . '.$(MAN3EXT)' } 590Sstevel@tonic-gate ); 600Sstevel@tonic-gate} 610Sstevel@tonic-gate 620Sstevel@tonic-gateWriteMakefile( 630Sstevel@tonic-gate NAME => 'Sun::Solaris::Task', 640Sstevel@tonic-gate VERSION_FROM => 'Task.pm', 650Sstevel@tonic-gate @defines, 660Sstevel@tonic-gate @man3pods, 670Sstevel@tonic-gate); 68