View | Details | Raw Unified | Return to issue 12442
Collapse All | Expand All

(-)set_soenv.in (-31 / +24 lines)
Lines 43-49 Link Here
43
#--------------------------------------------------------
43
#--------------------------------------------------------
44
#
44
#
45
my ( $outfile, $outfile_sh, $bootfile, $newline, $comment, $compiler, $unsetenv, $setenv, $unset, $set, $ds, $ps, $cur_dir, 
45
my ( $outfile, $outfile_sh, $bootfile, $newline, $comment, $compiler, $unsetenv, $setenv, $unset, $set, $ds, $ps, $cur_dir, 
46
     $par_dir, $I, $L, $D, $buildenv, $answer, $tmp, $Solaris, $Linux, $FreeBSD, $NetBSD, $Tru64, $Irix, $Irix64, $Winnt, $Macosx, $MINGWIN32, $USE_SHELL,
46
     $par_dir, $I, $L, $D, $buildenv, $answer, $tmp, $Solaris, $Linux, $FreeBSD, $NetBSD, $Tru64, $Irix, $Irix64, $Winnt, $Macosx, $MINGWIN32,
47
     $WScomp, $GNUcomp, $platform, $cygwinver, $machine_type, $empty, $no_jdk, $no_ant, $no_stl, $no_tcsh, $no_cl, $no_gcc, $no_gcc_home, $no_gcc_include, 
47
     $WScomp, $GNUcomp, $platform, $cygwinver, $machine_type, $empty, $no_jdk, $no_ant, $no_stl, $no_tcsh, $no_cl, $no_gcc, $no_gcc_home, $no_gcc_include, 
48
     $no_gxx_include, $warnfile, $Warning, $result, $unsetvars, $unsetvarssh, $exportvars, $win_format_var, $perl_os);
48
     $no_gxx_include, $warnfile, $Warning, $result, $unsetvars, $unsetvarssh, $exportvars, $win_format_var, $perl_os);
49
#
49
#
Lines 135-147 Link Here
135
$Warning        = "";               # container for warning messages
135
$Warning        = "";               # container for warning messages
136
$STLPORT4	= '@STLPORT4@';     # Location of STLport4
136
$STLPORT4	= '@STLPORT4@';     # Location of STLport4
137
$MINGWIN32	= '@WITH_MINGWIN@'; # use MINGWIN32
137
$MINGWIN32	= '@WITH_MINGWIN@'; # use MINGWIN32
138
$USE_SHELL	= '@USE_SHELL@';    # preferred shell
139
$USE_GCC3	= '@USE_GCC3@';     # use gcc3 (only for unxlngi4 and unxfbsd5i at the moment)
138
$USE_GCC3	= '@USE_GCC3@';     # use gcc3 (only for unxlngi4 and unxfbsd5i at the moment)
140
$CC			= '@CC@';           # C compiler
139
$CC			= '@CC@';           # C compiler
141
$CXX		= '@CXX@';          # C++ compiler
140
$CXX		= '@CXX@';          # C++ compiler
142
$EXCEPTIONS	= '@EXCEPTIONS@';   # Exception handling type
141
$EXCEPTIONS	= '@EXCEPTIONS@';   # Exception handling type
143
$ENABLE_DEBUG	= '@ENABLE_DEBUG@';  # Enable a debug build
142
$ENABLE_DEBUG	= '@ENABLE_DEBUG@';  # Enable a debug build
144
$WRAPCMD	= "";				# Wrapper (only for winnt)
143
$WRAPCMD	= "";				# Wrapper (only for Winnt)
145
144
146
#
145
#
147
#---------------------------------------------------------------
146
#---------------------------------------------------------------
Lines 236-241 Link Here
236
$ENABLEUNICODE        = "TRUE";
235
$ENABLEUNICODE        = "TRUE";
237
$NEW_JAR_PACK         = "TRUE";
236
$NEW_JAR_PACK         = "TRUE";
238
$NO_BSYMBOLIC         = "TRUE";
237
$NO_BSYMBOLIC         = "TRUE";
238
$comment              = "#";           # UNIX script comment character
239
239
240
# Setting platform dependent constant values.
240
# Setting platform dependent constant values.
241
if ( $platform eq "$Solaris" ) 
241
if ( $platform eq "$Solaris" ) 
Lines 534-540 Link Here
534
      $GVERDIR        = $INPATH;
534
      $GVERDIR        = $INPATH;
535
      $PATH_SEPERATOR = ':';
535
      $PATH_SEPERATOR = ':';
536
  }
536
  }
537
  elsif ( $USE_SHELL ne "4nt" )
537
  elsif ( '@USE_SHELL@' ne "4nt" )
538
  {   print "Setting Windows NT cygwin without 4NT specific values... ";
538
  {   print "Setting Windows NT cygwin without 4NT specific values... ";
539
      $outfile        = "winenv.set"; 
539
      $outfile        = "winenv.set"; 
540
      $COM            = "MSC";
540
      $COM            = "MSC";
Lines 565-570 Link Here
565
      $GVERDIR        = $INPATH;
565
      $GVERDIR        = $INPATH;
566
      $PATH_SEPERATOR = ';';
566
      $PATH_SEPERATOR = ';';
567
      $COMEX          = 7;
567
      $COMEX          = 7;
568
      $comment        = "rem";         # Windows script comment character
568
  }
569
  }
569
}
570
}
570
elsif ( $platform eq "$Macosx" ) 
571
elsif ( $platform eq "$Macosx" ) 
Lines 588-604 Link Here
588
      $PROSWITCH      = "-DPRODUCT";
589
      $PROSWITCH      = "-DPRODUCT";
589
      # GUIBASE is set below; may be "aqua" or "unx".
590
      # GUIBASE is set below; may be "aqua" or "unx".
590
}
591
}
591
if ($platform eq $Winnt)
592
else {
592
{  
593
	print "set_soenv:  Cannot figure out what platform you are running";
593
   if ( $USE_SHELL eq "4nt" ) {     # USE_SHELL equal 4nt means: use 4NT
594
	exit 1;
594
	$comment        = "rem";         # Windows script comment character
595
   }
596
   else {
597
        $comment	= "#";
598
   }
599
}
600
else
601
{  $comment        = "#";           # UNIX script comment character
602
}
595
}
603
print "done\n";
596
print "done\n";
604
597
Lines 639-652 Link Here
639
}
632
}
640
# 3. Tcsh path.
633
# 3. Tcsh path.
641
# Check whether autoconf found the Tcsh path.
634
# Check whether autoconf found the Tcsh path.
642
if ( '@TCSH@' eq $no_tcsh and $USE_SHELL eq "tcsh" ) 
635
if ( '@TCSH@' eq $no_tcsh and '@USE_SHELL@' eq "tcsh" ) 
643
{  AddWarning( "set_soenv", "Autoconf did not find tcsh, prompted for value" );
636
{  AddWarning( "set_soenv", "Autoconf did not find tcsh, prompted for value" );
644
   $SHELL = GetValue( "Please enter the path where tcsh is located: " );
637
   $SHELL = GetValue( "Please enter the path where tcsh is located: " );
645
   CheckPathExist( $SHELL );
638
   CheckPathExist( $SHELL );
646
   $TCSH_PATH = $SHELL;
639
   $TCSH_PATH = $SHELL;
647
   $SHELL = $SHELL."\/tcsh";
640
   $SHELL = $SHELL."\/tcsh";
648
}
641
}
649
elsif ($USE_SHELL eq "tcsh") 
642
elsif ('@USE_SHELL@' eq "tcsh") 
650
{  # SHELL as argument from autoconf.
643
{  # SHELL as argument from autoconf.
651
   $SHELL = '@TCSH@'."\/tcsh";
644
   $SHELL = '@TCSH@'."\/tcsh";
652
   $TCSH_PATH = '@TCSH@';
645
   $TCSH_PATH = '@TCSH@';
Lines 756-762 Link Here
756
$COMMON_BUILD_TOOLS   = '$SRC_ROOT'.$ds."external".$ds."common";
749
$COMMON_BUILD_TOOLS   = '$SRC_ROOT'.$ds."external".$ds."common";
757
750
758
# Generate alternate output file for sh?
751
# Generate alternate output file for sh?
759
if ($USE_SHELL eq "tcsh")
752
if ('@USE_SHELL@' eq "tcsh")
760
{  $outfile_sh = $outfile.".sh";
753
{  $outfile_sh = $outfile.".sh";
761
}
754
}
762
else
755
else
Lines 1123-1129 Link Here
1123
	$PATH          .= $ps.'${PERL_PATH}';
1116
	$PATH          .= $ps.'${PERL_PATH}';
1124
   }
1117
   }
1125
   # Check if $TCSH_PATH is already set in PATH
1118
   # Check if $TCSH_PATH is already set in PATH
1126
   if ( ( "$USE_SHELL" eq "tcsh" ) && ( ! $noldPATH =~ /(?:[:]|\A)(?:$TCSH_PATH)(?:[:]|\Z)/ ) )
1119
   if ( ( "'@USE_SHELL@'" eq "tcsh" ) && ( ! $noldPATH =~ /(?:[:]|\A)(?:$TCSH_PATH)(?:[:]|\Z)/ ) )
1127
   {   $PATH          .= $ps.$TCSH_PATH;
1120
   {   $PATH          .= $ps.$TCSH_PATH;
1128
   }
1121
   }
1129
   if ($ASM_PATH ne "ASM_IN_PATH")
1122
   if ($ASM_PATH ne "ASM_IN_PATH")
Lines 1320-1326 Link Here
1320
#
1313
#
1321
print "Setting the aliases... ";
1314
print "Setting the aliases... ";
1322
# 1. alias for a full product make. 
1315
# 1. alias for a full product make. 
1323
if (( $platform eq "$Winnt" ) and ( $USE_SHELL eq "4nt" ))
1316
if (( $platform eq "$Winnt" ) and ( '@USE_SHELL@' eq "4nt" ))
1324
{  $dmake           = '`*dmake`';
1317
{  $dmake           = '`*dmake`';
1325
$mkout           = '`perl %SOLARENV\bin\mkout.pl`';
1318
$mkout           = '`perl %SOLARENV\bin\mkout.pl`';
1326
$deliver         = '`perl %SOLARENV\bin\deliver.pl`';
1319
$deliver         = '`perl %SOLARENV\bin\deliver.pl`';
Lines 1696-1702 Link Here
1696
{  ToFile( "TEMP",              $TEMP,              "e" );
1689
{  ToFile( "TEMP",              $TEMP,              "e" );
1697
   ToFile( "TMP",               $TEMP,              "e" );
1690
   ToFile( "TMP",               $TEMP,              "e" );
1698
}
1691
}
1699
if (( $platform eq "$Winnt" ) and ( $USE_SHELL ne "4nt" )) {
1692
if (( $platform eq "$Winnt" ) and ( '@USE_SHELL@' ne "4nt" )) {
1700
   ToFile( "SOLARSRC",          $SOLARSRC   ,       "j" );
1693
   ToFile( "SOLARSRC",          $SOLARSRC   ,       "j" );
1701
} else {
1694
} else {
1702
   ToFile( "SOLARSRC",          $SOLARSRC,          "e" );
1695
   ToFile( "SOLARSRC",          $SOLARSRC,          "e" );
Lines 1718-1724 Link Here
1718
elsif ($platform eq "$Macosx" )
1711
elsif ($platform eq "$Macosx" )
1719
{  ToFile( "LIB",               $MAC_LIB,           "e" );
1712
{  ToFile( "LIB",               $MAC_LIB,           "e" );
1720
}
1713
}
1721
if (( $platform eq "$Winnt" ) and ( $USE_SHELL eq "4nt" )) {
1714
if (( $platform eq "$Winnt" ) and ( '@USE_SHELL@' eq "4nt" )) {
1722
  my ($tempstring);
1715
  my ($tempstring);
1723
  $tempstring="perl ".WinFormat(${SOLARENV}.${BIN}.${ds}."deliver.pl");
1716
  $tempstring="perl ".WinFormat(${SOLARENV}.${BIN}.${ds}."deliver.pl");
1724
  if ( $perl_os =~ /cygwin/ ) { $tempstring =~ s#\\#\\\\#g; }
1717
  if ( $perl_os =~ /cygwin/ ) { $tempstring =~ s#\\#\\\\#g; }
Lines 1737-1748 Link Here
1737
  ToFile( "ZIPDEP",            "zipdep.pl",         "e" );
1730
  ToFile( "ZIPDEP",            "zipdep.pl",         "e" );
1738
  ToFile( "GCCINSTLIB",        "gccinstlib.pl",    "e" );
1731
  ToFile( "GCCINSTLIB",        "gccinstlib.pl",    "e" );
1739
}
1732
}
1740
ToFile( "USE_SHELL",         $USE_SHELL,         "e" );
1733
ToFile( "USE_SHELL",         '@USE_SHELL@',         "e" );
1741
#
1734
#
1742
# Writing the aliases to file.
1735
# Writing the aliases to file.
1743
# (c = comment, e = environment variable, a = alias )
1736
# (c = comment, e = environment variable, a = alias )
1744
ToFile( "Aliases.",          $empty,             "c" );
1737
ToFile( "Aliases.",          $empty,             "c" );
1745
if (( $platform eq "$Winnt" ) and ( $USE_SHELL eq "4nt" ))
1738
if (( $platform eq "$Winnt" ) and ( '@USE_SHELL@' eq "4nt" ))
1746
{ ToFile( "alias dmake",       $dmake,             "a" );
1739
{ ToFile( "alias dmake",       $dmake,             "a" );
1747
}
1740
}
1748
ToFile( "alias mkout",       $mkout,             "a" );
1741
ToFile( "alias mkout",       $mkout,             "a" );
Lines 1755-1761 Link Here
1755
# write make command for dmake for windows
1748
# write make command for dmake for windows
1756
# (x = write as is)
1749
# (x = write as is)
1757
1750
1758
if ( $platform eq "$Winnt" and $USE_SHELL eq "4nt" )
1751
if ( $platform eq "$Winnt" and '@USE_SHELL@' eq "4nt" )
1759
{
1752
{
1760
  ToFile( "build the dmake executable.", $empty, "c");
1753
  ToFile( "build the dmake executable.", $empty, "c");
1761
  ToFile( "if not exist \%SRC_ROOT\\dmake\\dmake.exe (cd \%SRC_ROOT\\dmake \^ call make.bat win95-vpp40 \^ cd \%SRC_ROOT)", $empty, "x");
1754
  ToFile( "if not exist \%SRC_ROOT\\dmake\\dmake.exe (cd \%SRC_ROOT\\dmake \^ call make.bat win95-vpp40 \^ cd \%SRC_ROOT)", $empty, "x");
Lines 1865-1871 Link Here
1865
$bootfile = "bootstrap";
1858
$bootfile = "bootstrap";
1866
open( OUT, ">$bootfile" ) ||
1859
open( OUT, ">$bootfile" ) ||
1867
die "Cannot open $bootfile: $!\n";
1860
die "Cannot open $bootfile: $!\n";
1868
if (( $platform ne "$Winnt" ) or ( $USE_SHELL ne "4nt" ))
1861
if (( $platform ne "$Winnt" ) or ( '@USE_SHELL@' ne "4nt" ))
1869
{  print OUT "#!$SHELL\n";
1862
{  print OUT "#!$SHELL\n";
1870
}
1863
}
1871
close( OUT ) || print "Can't close $bootfile: $!";
1864
close( OUT ) || print "Can't close $bootfile: $!";
Lines 1920-1926 Link Here
1920
#-------------------------------------------------------------
1913
#-------------------------------------------------------------
1921
sub CheckPathName 
1914
sub CheckPathName 
1922
{  my $retrn = $_[ 0 ];
1915
{  my $retrn = $_[ 0 ];
1923
   if (($platform ne "$Winnt") or ( $USE_SHELL ne "4nt" ))
1916
   if (($platform ne "$Winnt") or ( '@USE_SHELL@' ne "4nt" ))
1924
   {  # Check if the first character is not a '/'.
1917
   {  # Check if the first character is not a '/'.
1925
      if ( !( $_[ 0 ] =~ /^\// ) ) 
1918
      if ( !( $_[ 0 ] =~ /^\// ) ) 
1926
      {  $retrn = $ds.$_[ 0 ];
1919
      {  $retrn = $ds.$_[ 0 ];
Lines 1999-2005 Link Here
1999
   {  # Write an environment variable to file.
1992
   {  # Write an environment variable to file.
2000
      if (defined $_[ 1 ])
1993
      if (defined $_[ 1 ])
2001
      {  printf("%-12s %-17s %-10s %-39s\n", "The variable", $_[ 0 ], "is set to:", $_[ 1 ]) ; # to stdout
1994
      {  printf("%-12s %-17s %-10s %-39s\n", "The variable", $_[ 0 ], "is set to:", $_[ 1 ]) ; # to stdout
2002
         if (( $platform ne "$Winnt" ) or ( $USE_SHELL ne "4nt" ))
1995
         if (( $platform ne "$Winnt" ) or ( '@USE_SHELL@' ne "4nt" ))
2003
         {   
1996
         {   
2004
             print OUT "$setenv $_[ 0 ] \"$_[ 1 ]\"$newline";          # to tcsh file
1997
             print OUT "$setenv $_[ 0 ] \"$_[ 1 ]\"$newline";          # to tcsh file
2005
             if(defined($outfile_sh))
1998
             if(defined($outfile_sh))
Lines 2015-2021 Link Here
2015
      }
2008
      }
2016
      else
2009
      else
2017
      {  printf("%-12s %-17s %-10s %-39s\n", "The variable", $_[ 0 ], "is set to:", "unset") ; # to stdout
2010
      {  printf("%-12s %-17s %-10s %-39s\n", "The variable", $_[ 0 ], "is set to:", "unset") ; # to stdout
2018
         if (( $platform ne "$Winnt" ) or ( $USE_SHELL ne "4nt" ))
2011
         if (( $platform ne "$Winnt" ) or ( '@USE_SHELL@' ne "4nt" ))
2019
         {  
2012
         {  
2020
            $unsetvars .= "$unsetenv $_[ 0 ] >& /dev/null$newline";            # for tcsh file
2013
            $unsetvars .= "$unsetenv $_[ 0 ] >& /dev/null$newline";            # for tcsh file
2021
            $unsetvarssh .= " $_[ 0 ]";                                        # for sh file
2014
            $unsetvarssh .= " $_[ 0 ]";                                        # for sh file
Lines 2028-2034 Link Here
2028
   elsif ( $_[ 2 ] eq "a" ) 
2021
   elsif ( $_[ 2 ] eq "a" ) 
2029
   {  # Write an alias to file.
2022
   {  # Write an alias to file.
2030
      print "The $_[ 0 ] is set to: $_[ 1 ]\n";     # to stdout
2023
      print "The $_[ 0 ] is set to: $_[ 1 ]\n";     # to stdout
2031
      if (( $platform ne "$Winnt" ) or ( $USE_SHELL ne "4nt" ))
2024
      if (( $platform ne "$Winnt" ) or ( '@USE_SHELL@' ne "4nt" ))
2032
      {  
2025
      {  
2033
         print OUT "$_[ 0 ] $_[ 1 ] $newline";                            # to tcsh file
2026
         print OUT "$_[ 0 ] $_[ 1 ] $newline";                            # to tcsh file
2034
         print OUT_SH "$_[ 0 ]=$_[ 1 ] $newline" if defined($outfile_sh); # to sh file
2027
         print OUT_SH "$_[ 0 ]=$_[ 1 ] $newline" if defined($outfile_sh); # to sh file
Lines 2070-2076 Link Here
2070
   {
2063
   {
2071
      if ((defined $_[ 1 ]) and ( $platform eq "$Winnt" )) 
2064
      if ((defined $_[ 1 ]) and ( $platform eq "$Winnt" )) 
2072
      {  printf("%-12s %-17s %-10s %-39s\n", "The variable", $_[ 0 ], "is set to:", $_[ 1 ]) ; # to stdout
2065
      {  printf("%-12s %-17s %-10s %-39s\n", "The variable", $_[ 0 ], "is set to:", $_[ 1 ]) ; # to stdout
2073
         if ( $USE_SHELL ne "4nt" )
2066
         if ( '@USE_SHELL@' ne "4nt" )
2074
         {
2067
         {
2075
             $win_format_var = WinFormat( $_[ 1 ] );  #Filter for Windows
2068
             $win_format_var = WinFormat( $_[ 1 ] );  #Filter for Windows
2076
             $win_format_var =~ s/\\/\\\\/g;
2069
             $win_format_var =~ s/\\/\\\\/g;

Return to issue 12442