← Index
NYTProf Performance Profile   « block view • line view • sub view »
For C:/lo/libo-master/solenv/bin/make_installer.pl
  Run on Mon Sep 24 00:52:54 2012
Reported on Mon Sep 24 07:34:32 2012

Filename/cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer/environment.pm
StatementsExecuted 44 statements in 1.32ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
111352µs354µsinstaller::environment::::BEGIN@30installer::environment::BEGIN@30
11146µs46µsinstaller::environment::::create_pathvariablesinstaller::environment::create_pathvariables
11133µs35µsinstaller::environment::::set_global_environment_variablesinstaller::environment::set_global_environment_variables
11117µs19µsinstaller::environment::::BEGIN@31installer::environment::BEGIN@31
1112µs2µsinstaller::environment::::CORE:matchinstaller::environment::CORE:match (opcode)
0000s0sinstaller::environment::::check_tilde_in_directoryinstaller::environment::check_tilde_in_directory
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1#*************************************************************************
2#
3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4#
5# Copyright 2000, 2010 Oracle and/or its affiliates.
6#
7# OpenOffice.org - a multi-platform office productivity suite
8#
9# This file is part of OpenOffice.org.
10#
11# OpenOffice.org is free software: you can redistribute it and/or modify
12# it under the terms of the GNU Lesser General Public License version 3
13# only, as published by the Free Software Foundation.
14#
15# OpenOffice.org is distributed in the hope that it will be useful,
16# but WITHOUT ANY WARRANTY; without even the implied warranty of
17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18# GNU Lesser General Public License version 3 for more details
19# (a copy is included in the LICENSE file that accompanied this code).
20#
21# You should have received a copy of the GNU Lesser General Public License
22# version 3 along with OpenOffice.org. If not, see
23# <http://www.openoffice.org/license.html>
24# for a copy of the LGPLv3 License.
25#
26#*************************************************************************
27
28package installer::environment;
29
30264µs2357µs
# spent 354µs (352+3) within installer::environment::BEGIN@30 which was called: # once (352µs+3µs) by installer::BEGIN@40 at line 30
use installer::exiter;
# spent 354µs making 1 call to installer::environment::BEGIN@30 # spent 2µs making 1 call to UNIVERSAL::import
3121.16ms221µs
# spent 19µs (17+2) within installer::environment::BEGIN@31 which was called: # once (17µs+2µs) by installer::BEGIN@40 at line 31
use installer::globals;
# spent 19µs making 1 call to installer::environment::BEGIN@31 # spent 2µs making 1 call to UNIVERSAL::import
32
33######################################################
34# Create path variables from environment variables
35######################################################
36
37sub create_pathvariables
38
# spent 46µs within installer::environment::create_pathvariables which was called: # once (46µs+0s) by installer::run at line 149 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
392050µs my ($environment) = @_;
40
41 my %variables = ();
42
43 # The following variables are needed in the path file list
44 # solarpath, solarenvpath, solarcommonpath, os, osdef, pmiscpath
45
46 my $solarpath = $environment->{'SOLARVERSION'} . $installer::globals::separator . $installer::globals::compiler . $installer::globals::productextension;
47 $variables{'solarpath'} = $solarpath;
48
49 my $solarcommonpath = $environment->{'SOLARVERSION'} . $installer::globals::separator . "common" . $installer::globals::productextension;
50 $variables{'solarcommonpath'} = $solarcommonpath;
51
52 my $osdef = lc($environment->{'GUI'});
53 $variables{'osdef'} = $osdef;
54
55 $variables{'os'} = $installer::globals::compiler;
56
57 my $solarenvpath = "";
58
59 if ( $ENV{'SO_PACK'} ) { $solarenvpath = $ENV{'SO_PACK'}; }
60 # overriding with STAR_INSTPATH, if set
61 if ( $ENV{'STAR_INSTPATH'} ) { $solarenvpath = $ENV{'STAR_INSTPATH'}; }
62
63 $variables{'solarenvpath'} = $solarenvpath;
64
65 my $localpath = $environment->{'LOCAL_OUT'};
66 $variables{'localpath'} = $localpath;
67
68 my $localcommonpath = $environment->{'LOCAL_COMMON_OUT'};
69 $variables{'localcommonpath'} = $localcommonpath;
70
71 my $platformname = $environment->{'OUTPATH'};
72 $variables{'platformname'} = $platformname;
73
74 return \%variables;
75}
76
77##################################################
78# Replacing tilde in paths, because of
79# problem with deep recursion (task 104830)
80##################################################
81
82sub check_tilde_in_directory
83{
84 if ( $ENV{'HOME'} )
85 {
86 my $home = $ENV{'HOME'};
87 $home =~ s/\Q$installer::globals::separator\E\s*$//;
88 $installer::globals::localinstalldir =~ s/~/$home/;
89 my $infoline = "Info: Changing LOCALINSTALLDIR to $installer::globals::localinstalldir\n";
90 push(@installer::globals::logfileinfo, $infoline);
91 }
92 else
93 {
94 # exit, because "~" is not allowed, if HOME is not set
95 my $infoline = "ERROR: If \"~\" is used in \"LOCALINSTALLDIR\", environment variable \"HOME\" needs to be defined!\n";
96 push(@installer::globals::logfileinfo, $infoline);
97 installer::exiter::exit_program("ERROR: If \"~\" is used in \"LOCALINSTALLDIR\", environment variable \"HOME\" needs to be defined!", "check_tilde_in_directory");
98 }
99}
100
101##################################################
102# Setting some fundamental global variables.
103# All these variables can be overwritten
104# by parameters.
105##################################################
106
107sub set_global_environment_variables
108
# spent 35µs (33+2) within installer::environment::set_global_environment_variables which was called: # once (33µs+2µs) by installer::run at line 111 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
1091938µs my ( $environment ) = @_;
110
111 $installer::globals::build = $environment->{'WORK_STAMP'};
112 $installer::globals::compiler = $environment->{'OUTPATH'};
113
114 if ( $ENV{'LAST_MINOR'} ) { $installer::globals::lastminor = $ENV{'LAST_MINOR'}; }
115
116 if ( $ENV{'PROEXT'} ) { $installer::globals::pro = 1; }
117
118 if ( $ENV{'VERBOSE'} && ( (lc $ENV{'VERBOSE'}) eq "false" ) ) { $installer::globals::quiet = 1; }
119 if ( $ENV{'PREPARE_WINPATCH'} ) { $installer::globals::prepare_winpatch = 1; }
120 if ( $ENV{'PREVIOUS_IDT_DIR'} ) { $installer::globals::previous_idt_dir = $ENV{'PREVIOUS_IDT_DIR'}; }
121 if ( $ENV{'LOCALINSTALLDIR'} ) { $installer::globals::localinstalldir = $ENV{'LOCALINSTALLDIR'}; }
122 if ( $ENV{'LOCALUNPACKDIR'} ) { $installer::globals::localunpackdir = $ENV{'LOCALUNPACKDIR'}; }
123 if ( $ENV{'MAX_LANG_LENGTH'} ) { $installer::globals::max_lang_length = $ENV{'MAX_LANG_LENGTH'}; }
124
125 if ( $ENV{'RPM'} ) { $installer::globals::rpm = $ENV{'RPM'}; }
126 if ( $ENV{'DONTCOMPRESS'} ) { $installer::globals::solarisdontcompress = 1; }
127 if ( $ENV{'IGNORE_ERROR_IN_LOGFILE'} ) { $installer::globals::ignore_error_in_logfile = 1; }
128 if (( $ENV{'DISABLE_STRIP'} ) && ( $ENV{'DISABLE_STRIP'} ne '' )) { $installer::globals::strip = 0; }
129
130 if ( $installer::globals::localinstalldir ) { $installer::globals::localinstalldirset = 1; }
131 # Special handling, if LOCALINSTALLDIR contains "~" in the path
13212µs if ( $installer::globals::localinstalldir =~ /^\s*\~/ ) { check_tilde_in_directory(); }
# spent 2µs making 1 call to installer::environment::CORE:match
133}
134
13517µs1;
 
# spent 2µs within installer::environment::CORE:match which was called: # once (2µs+0s) by installer::environment::set_global_environment_variables at line 132
sub installer::environment::CORE:match; # opcode