← 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:51 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
{
3912µs my ($environment) = @_;
40
4112µs my %variables = ();
42
43 # The following variables are needed in the path file list
44 # solarpath, solarenvpath, solarcommonpath, os, osdef, pmiscpath
45
4617µs my $solarpath = $environment->{'SOLARVERSION'} . $installer::globals::separator . $installer::globals::compiler . $installer::globals::productextension;
4712µs $variables{'solarpath'} = $solarpath;
48
4913µs my $solarcommonpath = $environment->{'SOLARVERSION'} . $installer::globals::separator . "common" . $installer::globals::productextension;
5012µs $variables{'solarcommonpath'} = $solarcommonpath;
51
5213µs my $osdef = lc($environment->{'GUI'});
5312µs $variables{'osdef'} = $osdef;
54
5512µs $variables{'os'} = $installer::globals::compiler;
56
5711µs my $solarenvpath = "";
58
5912µs if ( $ENV{'SO_PACK'} ) { $solarenvpath = $ENV{'SO_PACK'}; }
60 # overriding with STAR_INSTPATH, if set
6112µs if ( $ENV{'STAR_INSTPATH'} ) { $solarenvpath = $ENV{'STAR_INSTPATH'}; }
62
6312µs $variables{'solarenvpath'} = $solarenvpath;
64
6512µs my $localpath = $environment->{'LOCAL_OUT'};
6612µs $variables{'localpath'} = $localpath;
67
6812µs my $localcommonpath = $environment->{'LOCAL_COMMON_OUT'};
6912µs $variables{'localcommonpath'} = $localcommonpath;
70
7112µs my $platformname = $environment->{'OUTPATH'};
7212µs $variables{'platformname'} = $platformname;
73
74110µs 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
{
10912µs my ( $environment ) = @_;
110
11112µs $installer::globals::build = $environment->{'WORK_STAMP'};
11212µs $installer::globals::compiler = $environment->{'OUTPATH'};
113
11422µs if ( $ENV{'LAST_MINOR'} ) { $installer::globals::lastminor = $ENV{'LAST_MINOR'}; }
115
11622µs if ( $ENV{'PROEXT'} ) { $installer::globals::pro = 1; }
117
11812µs if ( $ENV{'VERBOSE'} && ( (lc $ENV{'VERBOSE'}) eq "false" ) ) { $installer::globals::quiet = 1; }
11911µs if ( $ENV{'PREPARE_WINPATCH'} ) { $installer::globals::prepare_winpatch = 1; }
12012µs if ( $ENV{'PREVIOUS_IDT_DIR'} ) { $installer::globals::previous_idt_dir = $ENV{'PREVIOUS_IDT_DIR'}; }
12111µs if ( $ENV{'LOCALINSTALLDIR'} ) { $installer::globals::localinstalldir = $ENV{'LOCALINSTALLDIR'}; }
1221600ns if ( $ENV{'LOCALUNPACKDIR'} ) { $installer::globals::localunpackdir = $ENV{'LOCALUNPACKDIR'}; }
12312µs if ( $ENV{'MAX_LANG_LENGTH'} ) { $installer::globals::max_lang_length = $ENV{'MAX_LANG_LENGTH'}; }
124
12511µs if ( $ENV{'RPM'} ) { $installer::globals::rpm = $ENV{'RPM'}; }
1261500ns if ( $ENV{'DONTCOMPRESS'} ) { $installer::globals::solarisdontcompress = 1; }
12711µs if ( $ENV{'IGNORE_ERROR_IN_LOGFILE'} ) { $installer::globals::ignore_error_in_logfile = 1; }
12812µs if (( $ENV{'DISABLE_STRIP'} ) && ( $ENV{'DISABLE_STRIP'} ne '' )) { $installer::globals::strip = 0; }
129
13011µs if ( $installer::globals::localinstalldir ) { $installer::globals::localinstalldirset = 1; }
131 # Special handling, if LOCALINSTALLDIR contains "~" in the path
132117µs12µ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