1 # 2 # Copyright (c) 1999, 2008 Oracle and/or its affiliates. All rights reserved. 3 # 4 5 # 6 # Makefile.PL for ::Project 7 # 8 9 require 5.8.4; 10 use strict; 11 use warnings; 12 use ExtUtils::MakeMaker; 13 14 # #defines. 15 my @defines = ( DEFINE => exists($ENV{RELEASE_BUILD}) ? '-DNDEBUG' : '' ); 16 17 # List of POD pages to install. 18 my @man3pods = ( MAN3PODS => {} ); 19 20 # 21 # If not building as part of ON. 22 # 23 if (! exists($ENV{CODEMGR_WS})) { 24 25 # 26 # Suppress the setting of LD_RUN_PATH. The ON build environment 27 # contains a modified MakeMaker that does this automatically, so we 28 # only need to do this if we are building outside of ON. 29 # 30 package MY; 31 no warnings qw(once); 32 33 # Override const_loadlibs to remove LD_RUN_PATH cruft. 34 *const_loadlibs = sub 35 { 36 my $self = shift(@_); 37 delete($self->{LD_RUN_PATH}); 38 return($self->SUPER::const_loadlibs(@_)); 39 }; 40 41 # Override dynamic_lib to get rid of LD_RUN_PATH cruft. 42 *dynamic_lib = sub 43 { 44 my $self = shift(@_); 45 my $txt = $self->SUPER::dynamic_lib(@_); 46 $txt =~ s/LD_RUN_PATH=\S*\s*//; 47 return($txt); 48 }; 49 50 # Turn off debugging. 51 @defines = (); 52 53 # 54 # Install the POD documentation for non-ON builds. 55 # 56 my $man3pfx = '$(INST_MAN3DIR)/Sun::Solaris::Project'; 57 @man3pods = ( 58 MAN3PODS => { 'pod/Project.pod' => $man3pfx . '.$(MAN3EXT)' } 59 ); 60 } 61 62 WriteMakefile( 63 NAME => 'Sun::Solaris::Project', 64 VERSION_FROM => 'Project.pm', 65 LIBS => '-lproject -lgen', 66 @defines, 67 @man3pods, 68 );