# HG changeset patch # User Claus Gittinger # Date 1135171443 -3600 # Node ID 222fd88429a3cb6e05900f543d5649507eff32be # Parent 98a21f90890a7fa37dd835a55d517cd26f966ce1 *** empty log message *** diff -r 98a21f90890a -r 222fd88429a3 host.rc --- a/host.rc Wed Dec 21 13:30:17 2005 +0100 +++ b/host.rc Wed Dec 21 14:24:03 2005 +0100 @@ -149,29 +149,21 @@ Compiler ccCompilationOptions:'-O'. includes := ''. - ('../../include' asFilename exists) ifTrue:[ - "/ running in a development environment ... - includes := includes , '-I../../include '. - ]. incDir := Smalltalk getSystemFileName:'include'. incDir notNil ifTrue:[ includes := includes , '-I' , incDir asFilename pathName , ' ' ] ifFalse:[ - "/ running in a shared environment ... - ('/usr/local/lib/smalltalk/include' asFilename exists) ifTrue:[ - includes := includes , '-I/usr/local/lib/smalltalk/include '. + ('../../../stx/include' asFilename exists) ifTrue:[ + "/ running in a development environment ... + includes := includes , '-I../../../stx/include '. ] ifFalse:[ - ('/opt/smalltalk/include' asFilename exists) ifTrue:[ - includes := includes , '-I/opt/smalltalk/include '. - ] ifFalse:[ - "/ if this is a production program, dont care for a warning - (Smalltalk isStandAloneApp or:[Smalltalk isHeadless]) - ifFalse:[ - 'host.rc [warning]: no >>include<< directory found along your path.' infoPrintCR. - 'host.rc [warning]: this will affect stc-compilation from within the browser.' infoPrintCR. - ] + "/ if this is a production program, dont care for a warning + (Smalltalk isStandAloneApp or:[Smalltalk isHeadless]) + ifFalse:[ + 'host.rc [warning]: no >>include<< directory found along your path.' infoPrintCR. + 'host.rc [warning]: this might affect stc-compilation from within the browser.' infoPrintCR. ] - ]. + ] ]. Compiler stcCompilationIncludes:includes. diff -r 98a21f90890a -r 222fd88429a3 smalltalk.rc --- a/smalltalk.rc Wed Dec 21 13:30:17 2005 +0100 +++ b/smalltalk.rc Wed Dec 21 14:24:03 2005 +0100 @@ -97,10 +97,9 @@ "/ funny viewStyles, colors and stupid strings if wrong. "/ -|path| +|path pathOfSTXExecutable| -'systemPath before: ' print. -Smalltalk systemPath printCR. +'systemPath before: ' print. Smalltalk systemPath printCR. (path := OperatingSystem getEnvironment:'STX_SYSTEMPATH') notNil ifTrue:[ Smalltalk systemPath:(path asCollectionOfSubstringsSeparatedBy:$:) @@ -113,27 +112,22 @@ ('smalltalk.rc [info]: found gnu-smalltalk sources in ' , path , '; removed from systemPath.') infoPrintCR. Smalltalk systemPath:(Smalltalk systemPath remove:path; yourself). ]. -]. -(Smalltalk systemPath includes:(OperatingSystem pathOfSTXExecutable asFilename directoryName)) ifFalse:[ - Smalltalk systemPath addFirst:(OperatingSystem pathOfSTXExecutable asFilename directoryName). -]. + pathOfSTXExecutable := OperatingSystem pathOfSTXExecutable asFilename directoryName. + (Smalltalk systemPath includes:pathOfSTXExecutable) ifFalse:[ + Smalltalk systemPath addFirst:pathOfSTXExecutable. + ]. -'../../../stx/libbasic' asFilename exists ifTrue:[ - (Smalltalk systemPath includes:'../../../stx' asFilename pathName) ifFalse:[ - Smalltalk systemPath addFirst:'../../../stx' asFilename pathName. - ] + "/ the current directory should always be first... + (Smalltalk systemPath includes:'.') ifTrue:[ + Smalltalk systemPath remove:'.'. + ]. + (Smalltalk systemPath includes:'.' asFilename pathName) ifTrue:[ + Smalltalk systemPath remove:'.' asFilename pathName. + ]. + Smalltalk systemPath addFirst:'.' asFilename pathName. ]. -"/ the current directory should always be first... -(Smalltalk systemPath includes:'.') ifTrue:[ - Smalltalk systemPath remove:'.'. -]. -(Smalltalk systemPath includes:'.' asFilename pathName) ifTrue:[ - Smalltalk systemPath remove:'.' asFilename pathName. -]. -Smalltalk systemPath addFirst:'.' asFilename pathName. - (path := OperatingSystem getEnvironment:'STX_PACKAGEPATH') notNil ifTrue:[ Smalltalk packagePath:(path asCollectionOfSubstringsSeparatedBy:$:). 'smalltalk.rc [info]: setting packagePath from STX_PACKAGEPATH' printCR. @@ -143,7 +137,7 @@ "/ only use the local packages. "/ '../../../stx/projects/smalltalk' asFilename exists ifTrue:[ - Smalltalk packagePath removeAll; add:'../../..'. + Smalltalk packagePath removeAll; add:'../../..' asFilename pathName. 'smalltalk.rc [info]: setting packagePath for local operation' printCR. ]. @@ -151,10 +145,10 @@ "/ any additional local packages ?. "/ 'packages' asFilename exists ifTrue:[ - Smalltalk packagePath addFirst:'./packages'. - "/ 'additional local packages' printCR. + (Smalltalk packagePath includes:'packages' asFilename pathName) ifFalse:[ + Smalltalk packagePath addFirst:'packages' asFilename pathName. + ]. ]. - "/ 'packagePath: ' print. Smalltalk packagePath printCR. ]. 'systemPath: ' errorPrint. Smalltalk systemPath errorPrintCR.