Index: set_soenv.in =================================================================== RCS file: /cvs/tools/config_office/set_soenv.in,v retrieving revision 1.4.2.2.4.1 diff -u -r1.4.2.2.4.1 set_soenv.in --- set_soenv.in 27 Feb 2003 14:12:36 -0000 1.4.2.2.4.1 +++ set_soenv.in 19 Apr 2003 07:54:42 -0000 @@ -43,7 +43,7 @@ #-------------------------------------------------------- # my ( $outfile, $outfile_sh, $bootfile, $newline, $comment, $compiler, $unsetenv, $setenv, $unset, $set, $ds, $ps, $cur_dir, - $par_dir, $I, $L, $D, $buildenv, $answer, $tmp, $Solaris, $Linux, $FreeBSD, $NetBSD, $Tru64, $Irix, $Irix64, $Winnt, $Macosx, $MINGWIN32, $USE_SHELL, + $par_dir, $I, $L, $D, $buildenv, $answer, $tmp, $Solaris, $Linux, $FreeBSD, $NetBSD, $Tru64, $Irix, $Irix64, $Winnt, $Macosx, $MINGWIN32, $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, $no_gxx_include, $warnfile, $Warning, $result, $unsetvars, $unsetvarssh, $exportvars, $win_format_var, $perl_os); # @@ -135,13 +135,12 @@ $Warning = ""; # container for warning messages $STLPORT4 = '@STLPORT4@'; # Location of STLport4 $MINGWIN32 = '@WITH_MINGWIN@'; # use MINGWIN32 -$USE_SHELL = '@USE_SHELL@'; # preferred shell $USE_GCC3 = '@USE_GCC3@'; # use gcc3 (only for unxlngi4 and unxfbsd5i at the moment) $CC = '@CC@'; # C compiler $CXX = '@CXX@'; # C++ compiler $EXCEPTIONS = '@EXCEPTIONS@'; # Exception handling type $ENABLE_DEBUG = '@ENABLE_DEBUG@'; # Enable a debug build -$WRAPCMD = ""; # Wrapper (only for winnt) +$WRAPCMD = ""; # Wrapper (only for Winnt) # #--------------------------------------------------------------- @@ -236,6 +235,7 @@ $ENABLEUNICODE = "TRUE"; $NEW_JAR_PACK = "TRUE"; $NO_BSYMBOLIC = "TRUE"; +$comment = "#"; # UNIX script comment character # Setting platform dependent constant values. if ( $platform eq "$Solaris" ) @@ -534,7 +534,7 @@ $GVERDIR = $INPATH; $PATH_SEPERATOR = ':'; } - elsif ( $USE_SHELL ne "4nt" ) + elsif ( '@USE_SHELL@' ne "4nt" ) { print "Setting Windows NT cygwin without 4NT specific values... "; $outfile = "winenv.set"; $COM = "MSC"; @@ -565,6 +565,7 @@ $GVERDIR = $INPATH; $PATH_SEPERATOR = ';'; $COMEX = 7; + $comment = "rem"; # Windows script comment character } } elsif ( $platform eq "$Macosx" ) @@ -588,17 +589,9 @@ $PROSWITCH = "-DPRODUCT"; # GUIBASE is set below; may be "aqua" or "unx". } -if ($platform eq $Winnt) -{ - if ( $USE_SHELL eq "4nt" ) { # USE_SHELL equal 4nt means: use 4NT - $comment = "rem"; # Windows script comment character - } - else { - $comment = "#"; - } -} -else -{ $comment = "#"; # UNIX script comment character +else { + print "set_soenv: Cannot figure out what platform you are running"; + exit 1; } print "done\n"; @@ -639,14 +632,14 @@ } # 3. Tcsh path. # Check whether autoconf found the Tcsh path. -if ( '@TCSH@' eq $no_tcsh and $USE_SHELL eq "tcsh" ) +if ( '@TCSH@' eq $no_tcsh and '@USE_SHELL@' eq "tcsh" ) { AddWarning( "set_soenv", "Autoconf did not find tcsh, prompted for value" ); $SHELL = GetValue( "Please enter the path where tcsh is located: " ); CheckPathExist( $SHELL ); $TCSH_PATH = $SHELL; $SHELL = $SHELL."\/tcsh"; } -elsif ($USE_SHELL eq "tcsh") +elsif ('@USE_SHELL@' eq "tcsh") { # SHELL as argument from autoconf. $SHELL = '@TCSH@'."\/tcsh"; $TCSH_PATH = '@TCSH@'; @@ -756,7 +749,7 @@ $COMMON_BUILD_TOOLS = '$SRC_ROOT'.$ds."external".$ds."common"; # Generate alternate output file for sh? -if ($USE_SHELL eq "tcsh") +if ('@USE_SHELL@' eq "tcsh") { $outfile_sh = $outfile.".sh"; } else @@ -1123,7 +1116,7 @@ $PATH .= $ps.'${PERL_PATH}'; } # Check if $TCSH_PATH is already set in PATH - if ( ( "$USE_SHELL" eq "tcsh" ) && ( ! $noldPATH =~ /(?:[:]|\A)(?:$TCSH_PATH)(?:[:]|\Z)/ ) ) + if ( ( "'@USE_SHELL@'" eq "tcsh" ) && ( ! $noldPATH =~ /(?:[:]|\A)(?:$TCSH_PATH)(?:[:]|\Z)/ ) ) { $PATH .= $ps.$TCSH_PATH; } if ($ASM_PATH ne "ASM_IN_PATH") @@ -1320,7 +1313,7 @@ # print "Setting the aliases... "; # 1. alias for a full product make. -if (( $platform eq "$Winnt" ) and ( $USE_SHELL eq "4nt" )) +if (( $platform eq "$Winnt" ) and ( '@USE_SHELL@' eq "4nt" )) { $dmake = '`*dmake`'; $mkout = '`perl %SOLARENV\bin\mkout.pl`'; $deliver = '`perl %SOLARENV\bin\deliver.pl`'; @@ -1696,7 +1689,7 @@ { ToFile( "TEMP", $TEMP, "e" ); ToFile( "TMP", $TEMP, "e" ); } -if (( $platform eq "$Winnt" ) and ( $USE_SHELL ne "4nt" )) { +if (( $platform eq "$Winnt" ) and ( '@USE_SHELL@' ne "4nt" )) { ToFile( "SOLARSRC", $SOLARSRC , "j" ); } else { ToFile( "SOLARSRC", $SOLARSRC, "e" ); @@ -1718,7 +1711,7 @@ elsif ($platform eq "$Macosx" ) { ToFile( "LIB", $MAC_LIB, "e" ); } -if (( $platform eq "$Winnt" ) and ( $USE_SHELL eq "4nt" )) { +if (( $platform eq "$Winnt" ) and ( '@USE_SHELL@' eq "4nt" )) { my ($tempstring); $tempstring="perl ".WinFormat(${SOLARENV}.${BIN}.${ds}."deliver.pl"); if ( $perl_os =~ /cygwin/ ) { $tempstring =~ s#\\#\\\\#g; } @@ -1737,12 +1730,12 @@ ToFile( "ZIPDEP", "zipdep.pl", "e" ); ToFile( "GCCINSTLIB", "gccinstlib.pl", "e" ); } -ToFile( "USE_SHELL", $USE_SHELL, "e" ); +ToFile( "USE_SHELL", '@USE_SHELL@', "e" ); # # Writing the aliases to file. # (c = comment, e = environment variable, a = alias ) ToFile( "Aliases.", $empty, "c" ); -if (( $platform eq "$Winnt" ) and ( $USE_SHELL eq "4nt" )) +if (( $platform eq "$Winnt" ) and ( '@USE_SHELL@' eq "4nt" )) { ToFile( "alias dmake", $dmake, "a" ); } ToFile( "alias mkout", $mkout, "a" ); @@ -1755,7 +1748,7 @@ # write make command for dmake for windows # (x = write as is) -if ( $platform eq "$Winnt" and $USE_SHELL eq "4nt" ) +if ( $platform eq "$Winnt" and '@USE_SHELL@' eq "4nt" ) { ToFile( "build the dmake executable.", $empty, "c"); ToFile( "if not exist \%SRC_ROOT\\dmake\\dmake.exe (cd \%SRC_ROOT\\dmake \^ call make.bat win95-vpp40 \^ cd \%SRC_ROOT)", $empty, "x"); @@ -1865,7 +1858,7 @@ $bootfile = "bootstrap"; open( OUT, ">$bootfile" ) || die "Cannot open $bootfile: $!\n"; -if (( $platform ne "$Winnt" ) or ( $USE_SHELL ne "4nt" )) +if (( $platform ne "$Winnt" ) or ( '@USE_SHELL@' ne "4nt" )) { print OUT "#!$SHELL\n"; } close( OUT ) || print "Can't close $bootfile: $!"; @@ -1920,7 +1913,7 @@ #------------------------------------------------------------- sub CheckPathName { my $retrn = $_[ 0 ]; - if (($platform ne "$Winnt") or ( $USE_SHELL ne "4nt" )) + if (($platform ne "$Winnt") or ( '@USE_SHELL@' ne "4nt" )) { # Check if the first character is not a '/'. if ( !( $_[ 0 ] =~ /^\// ) ) { $retrn = $ds.$_[ 0 ]; @@ -1999,7 +1992,7 @@ { # Write an environment variable to file. if (defined $_[ 1 ]) { printf("%-12s %-17s %-10s %-39s\n", "The variable", $_[ 0 ], "is set to:", $_[ 1 ]) ; # to stdout - if (( $platform ne "$Winnt" ) or ( $USE_SHELL ne "4nt" )) + if (( $platform ne "$Winnt" ) or ( '@USE_SHELL@' ne "4nt" )) { print OUT "$setenv $_[ 0 ] \"$_[ 1 ]\"$newline"; # to tcsh file if(defined($outfile_sh)) @@ -2015,7 +2008,7 @@ } else { printf("%-12s %-17s %-10s %-39s\n", "The variable", $_[ 0 ], "is set to:", "unset") ; # to stdout - if (( $platform ne "$Winnt" ) or ( $USE_SHELL ne "4nt" )) + if (( $platform ne "$Winnt" ) or ( '@USE_SHELL@' ne "4nt" )) { $unsetvars .= "$unsetenv $_[ 0 ] >& /dev/null$newline"; # for tcsh file $unsetvarssh .= " $_[ 0 ]"; # for sh file @@ -2028,7 +2021,7 @@ elsif ( $_[ 2 ] eq "a" ) { # Write an alias to file. print "The $_[ 0 ] is set to: $_[ 1 ]\n"; # to stdout - if (( $platform ne "$Winnt" ) or ( $USE_SHELL ne "4nt" )) + if (( $platform ne "$Winnt" ) or ( '@USE_SHELL@' ne "4nt" )) { print OUT "$_[ 0 ] $_[ 1 ] $newline"; # to tcsh file print OUT_SH "$_[ 0 ]=$_[ 1 ] $newline" if defined($outfile_sh); # to sh file @@ -2070,7 +2063,7 @@ { if ((defined $_[ 1 ]) and ( $platform eq "$Winnt" )) { printf("%-12s %-17s %-10s %-39s\n", "The variable", $_[ 0 ], "is set to:", $_[ 1 ]) ; # to stdout - if ( $USE_SHELL ne "4nt" ) + if ( '@USE_SHELL@' ne "4nt" ) { $win_format_var = WinFormat( $_[ 1 ] ); #Filter for Windows $win_format_var =~ s/\\/\\\\/g;