? config.log ? config.status ? set_soenv ? warn Index: bootstrap.2 =================================================================== RCS file: /cvs/tools/config_office/bootstrap.2,v retrieving revision 1.12 diff -u -r1.12 bootstrap.2 --- bootstrap.2 11 Jan 2002 16:53:46 -0000 1.12 +++ bootstrap.2 6 Sep 2002 03:20:25 -0000 @@ -28,7 +28,12 @@ # setup ENVCDEFS, SOLARINC and SOLARLIB for bootstrap -setenv ENVCDEFS -DBOOTSTRAPPER +if ($platform == "Darwin") then + setenv ENVCDEFS "-DBOOTSTRAPPER $ENVCDEFS" +else + setenv ENVCDEFS -DBOOTSTRAPPER +endif + setenv SOLARINC "-I. -I$SRC_ROOT/sal/inc -I$SRC_ROOT/vos/inc ${SOLARINC}" setenv SOLARLIB "-L$SRC_ROOT/external/$INPATH/lib -L$SRC_ROOT/sal/$INPATH/lib -L$SRC_ROOT/vos/$INPATH/lib ${SOLARLIB}" Index: set_soenv.1 =================================================================== RCS file: /cvs/tools/config_office/set_soenv.1,v retrieving revision 1.61.2.9.2.2 diff -u -r1.61.2.9.2.2 set_soenv.1 --- set_soenv.1 14 Aug 2002 05:54:39 -0000 1.61.2.9.2.2 +++ set_soenv.1 6 Sep 2002 03:20:50 -0000 @@ -1447,8 +1447,155 @@ # There may be a better way to do this, like splitting unxmacxp into two, but # hopefully this hack will work for now... -if ( $GUIBASE eq "aqua" ) { -ToFile( "ENVCDEFS", "-DQUARTZ", "e" ); +if ($platform eq "$Macosx") +{ + my $macosxCdefs="\""; + + if( ! -e "/usr/bin/osascript" ) { + # no command line applescript. Chances are we're on a Darwin system + + $macosxCdefs.=" -DBUILD_OS_DARWIN"; + open DARVER, "/usr/bin/uname -v |"; + my $s=; + chomp $s; + if ( $s =~ /(\d+?)\.(\d+?)(.*?)/) + { + $macosxCdefs.=" -DBUILD_OS_MAJOR=" . $1; + $macosxCdefs.=" -DBUILD_OS_MINOR=" . $2; + + $s=$3; + if ( $s =~ /(\d+?)/) { + $macosxCdefs.=" -DBUILD_OS_REV=" . $1; + } else { + $macosxCdefs.=" -DBUILD_OS_REV=0"; + } + } + close DARVER; + } + else + { + $macosxCdefs.=" -DBUILD_OS_APPLEOSX"; + + my $majorScript = <= bas then + set mult to ((num - (num mod bas)) / bas) as integer + set out to out & character mult of "123456789ABCDEF" + set num to (num - bas * mult) + else + set out to out & "0" + end if + end repeat + return out +end Num32ToHex + +tell application "Finder" + system attribute "sysv" +end tell + +Num32ToHex(result) +return (text 5 through 6 of result) +EOF + open BLECH, ">/tmp/os$$"; + print BLECH $majorScript; + close BLECH; + + open OSXMAJ, "/usr/bin/osascript ; + chomp $tmp; + $macosxCdefs.=" -DBUILD_OS_MAJOR=" . $tmp; + close OSXMAJ; + unlink "/tmp/os$$"; + + my $minorScript = <= bas then + set mult to ((num - (num mod bas)) / bas) as integer + set out to out & character mult of "123456789ABCDEF" + set num to (num - bas * mult) + else + set out to out & "0" + end if + end repeat + return out +end Num32ToHex + +tell application "Finder" + system attribute "sysv" +end tell + +Num32ToHex(result) +return (text 7 through 7 of result) +EOF + + open BLECH, ">/tmp/os$$"; + print BLECH $minorScript; + close BLECH; + + open OSXMIN, "/usr/bin/osascript ; + chomp $tmp; + $macosxCdefs.=" -DBUILD_OS_MINOR=" . $tmp; + close OSXMIN; + unlink "/tmp/os$$"; + + my $revScript = <= bas then + set mult to ((num - (num mod bas)) / bas) as integer + set out to out & character mult of "123456789ABCDEF" + set num to (num - bas * mult) + else + set out to out & "0" + end if + end repeat + return out +end Num32ToHex + +tell application "Finder" + system attribute "sysv" +end tell + +Num32ToHex(result) +return (text 8 through 8 of result) +EOF + open BLECH, ">/tmp/os$$"; + print BLECH $revScript; + close BLECH; + + open OSXREV, "/usr/bin/osascript ; + chomp $tmp; + $macosxCdefs.=" -DBUILD_OS_REV=" . $tmp; + close OSXREV; + unlink "/tmp/os$$"; + } + + if ( $GUIBASE eq "aqua" ) { + $macosxCdefs.=" -DQUARTZ"; + } + + $macosxCdefs .= "\""; + ToFile( "ENVCDEFS", $macosxCdefs, "e"); } ToFile( "MKDEPENDSOLVER", "TRUE", "e" );