--- a/NewSystemBrowser.st Thu Sep 27 19:51:31 2001 +0200
+++ b/NewSystemBrowser.st Fri Sep 28 13:13:28 2001 +0200
@@ -18837,47 +18837,15 @@
self
projectMenuWithAllClassesLoadedDo:[:module :package :classesInProject |
- |moduleAndPackage classesInLoadOrder mgr outStream|
+ |moduleAndPackage classesInLoadOrder mgr outStream hasExtensions|
moduleAndPackage := module , ':' , package.
self busyLabel:'Generating loadAll file for ' , moduleAndPackage , '...'.
"/ now, generate the loadAll file
- classesInLoadOrder := OrderedCollection new:(classesInProject size).
- [classesInProject size > 0] whileTrue:[
- |thoseWithOtherSuperclasses thoseWhichCanBeLoadedNow|
-
- "/ all those, which have superclasses NOT in the package
- thoseWithOtherSuperclasses := classesInProject select:[:eachClass | (classesInProject includesIdentical:eachClass superclass) not].
-
- "/ all those with privateClasses, which have superclasses NOT in the package
- thoseWhichCanBeLoadedNow := thoseWithOtherSuperclasses select:[:eachClass |
- |anyPrivateClassWithSuperClassInPackage|
- anyPrivateClassWithSuperClassInPackage := false.
- eachClass privateClasses do:[:eachPrivateClass |
- (classesInProject includesIdentical:eachPrivateClass superclass) ifTrue:[
- anyPrivateClassWithSuperClassInPackage := true
- ]
- ].
- anyPrivateClassWithSuperClassInPackage ifTrue:[
- Transcript showCR:('later load of ' , eachClass name , ' due to a private classes superclass').
- ].
- anyPrivateClassWithSuperClassInPackage not.
- ].
-
- thoseWhichCanBeLoadedNow size == 0 ifTrue:[
- self error:'load order is cyclic (care for private classes)' mayProceed:true.
- thoseWhichCanBeLoadedNow := thoseWithOtherSuperclasses.
- thoseWhichCanBeLoadedNow size == 0 ifTrue:[
- self error:'load order is cyclic'.
- ]
- ].
- thoseWhichCanBeLoadedNow := thoseWhichCanBeLoadedNow asOrderedCollection.
- thoseWhichCanBeLoadedNow sort:[:a :b | a name < b name].
- classesInLoadOrder addAll:thoseWhichCanBeLoadedNow.
- classesInProject removeAllFoundIn:thoseWhichCanBeLoadedNow.
- ].
+ classesInLoadOrder := self projectsClassesInLoadOrder:classesInProject.
+ hasExtensions := Smalltalk allClasses contains:[:cls | (cls hasExtensionsFrom:moduleAndPackage)].
mgr := classesInLoadOrder first sourceCodeManager.
mgr isNil ifTrue:[
@@ -18935,6 +18903,9 @@
outStream nextPutLine:' ''' , classFilename asFilename baseName, ''''.
].
+ hasExtensions ifTrue:[
+ outStream nextPutLine:' ''extensions.st'''.
+ ].
outStream nextPutAll:'
) asOrderedCollection.
@@ -18989,8 +18960,172 @@
].
!
+projectMenuGenerateMakeProtoFile
+ "/ intermediate - this will move into a commonly used utility class
+ "/ (where all the project code support will be collected).
+
+ self
+ projectMenuWithAllClassesLoadedDo:[:module :package :classesInProject |
+ |moduleAndPackage classesInLoadOrder mgr outStream hasExtensions libName|
+
+ libName := package copyFrom:(package lastIndexOf:$/)+1.
+
+ moduleAndPackage := module , ':' , package.
+ self busyLabel:'Generating Make.proto file for ' , moduleAndPackage , '...'.
+
+ "/ now, generate the Make.proto file
+
+ classesInLoadOrder := self projectsClassesInLoadOrder:classesInProject.
+ hasExtensions := Smalltalk allClasses contains:[:cls | (cls hasExtensionsFrom:moduleAndPackage)].
+
+ mgr := classesInLoadOrder first sourceCodeManager.
+ mgr isNil ifTrue:[
+ self warn:'No sourceCode manager - cannot checkin\(will generate a Make.proto-file in the current directory).' withCRs.
+ 'Make.proto' asFilename exists ifTrue:[
+ (self confirm:'A Make.proto file exists in the current directory\\Overwrite ?' withCRs) ifFalse:[
+ ^ self.
+ ]
+ ].
+ outStream := 'Make.proto' asFilename writeStream.
+ ] ifFalse:[
+ (mgr checkForExistingContainerInModule:module package:package container:'Make.proto') ifFalse:[
+ (mgr createContainerForText:'' inModule:module package:package container:'Make.proto') ifFalse:[
+ self warn:(resources string:'cannot create new container: ''Make.proto'' (in %1:%2)'
+ with:module with:package).
+ ^ self.
+ ].
+ ].
+ outStream := '' writeStream.
+ ].
+
+ outStream nextPutAll:'#
+# $' , 'Header' , '$
+#
+# --- Make.proto automatically created by the browsers generate-MakeProto function
+
+#
+# position in directory hierarchy:
+TOP=../..
+
+# subdirectories where targets are to be made:
+SUBDIRS=
+
+# subdirectories where Makefiles are to be made:
+# (only to be defined if different from SUBDIRS)
+# ALLSUBDIRS=
+
+
+# ***************************** you may have to modify the next line ***
+MODULE=' , module , '
+MODULE_DIR=' , package , '
+LIBNAME=' , libName , '
+PACKAGE=$(MODULE):$(MODULE_DIR)
+
+
+# -H. : create header files locally
+# -Pxxx : defines the package
+# -Zxxx : a prefix for variables within the classLib
+# +optspace : optimized for space
+# +optspace2 : optimized more for space
+# +optspace3 : optimized even more for space
+# +optinline : generate optimized inline code
+# +inlineNew : additionally inline new
+#
+# ***************************** you may have to modify the following lines ***
+# STCLOCALOPTIMIZATIONS=+optinline +inlineNew
+# STCLOCALOPTIMIZATIONS=+optspace2
+
+#
+# sorry: must prevent stc from inlining #not - sigh
+#
+STCLOCALOPTIMIZATIONS=+optspace2 -inlinenot
+#
+# for a class-library package, you can uncomment the following:
+# (it does not hurt much, if you leave it as is - but you may NOT
+# uncomment it if object files are to be loaded individually later).
+# INITCODESEPFLAG=$(SEPINITCODE)
+#
+# the following MAY ONLY be uncommented for classes/classLibs,
+# which are ALWAYS statically included in the executable.
+# (i.e. not for those which are subject to dynamic loading).
+# COMMONSYMFLAG=$(COMMONSYMBOLS)
+#
+# SUPERCLASSINCL=-I$(TOP)/libbasic -I$(TOP)/libwidg2
+STCLOCALOPT=$(SUPERCLASSINCL) $(STCLOCALOPTIMIZATIONS) -H. ''-P$(PACKAGE)'' -Z' ,libName,' $(COMMONSYMFLAG) $(INITCODESEPFLAG)
+
+
+# if you use RCS, there are rules in the Makefile for ci/co
+RCSSOURCES=*.st Make.proto
+
+# additional C targets or libraries should be added below
+LOCAL_EXTRA_TARGTES=
+
+all:: classLibRule
+
+OBJS= \
+'.
+ classesInLoadOrder
+ do:[:eachClass |
+ |sourceInfo classFilename|
+
+ sourceInfo := eachClass sourceCodeManager sourceInfoOfClass:eachClass.
+ sourceInfo notNil ifTrue:[
+ classFilename := eachClass sourceCodeManager containerFromSourceInfo:sourceInfo.
+ ] ifFalse:[
+ classFilename := eachClass classFilename ? (eachClass nameWithoutPrefix).
+ ].
+ classFilename := classFilename asFilename withoutSuffix baseName.
+ outStream nextPutAll:' ' , classFilename , '.$(O)'.
+ ]
+ separatedBy:[ outStream nextPutLine:' \' ].
+
+ hasExtensions ifTrue:[
+ outStream nextPutLine:' \'.
+ outStream nextPutAll:' extensions.$(O)'
+ ].
+
+ outStream nextPutAll:'
+
+cleanjunk::
+
+clean::
+' , Character tab , '@-rm -f *.c *.H *.o
+
+clobber::
+' , Character tab , '@-rm -f *.c *.H *.o
+
+# BEGINMAKEDEPEND --- do not remove this line; make depend needs it
+# ENDMAKEDEPEND --- do not remove this line
+'.
+ outStream close.
+
+ mgr notNil ifTrue:[
+ self activityNotification:(resources string:'checking in...').
+
+ InformationSignal handle:[:ex |
+ Transcript showCR:ex errorString
+ ] do:[
+ (mgr
+ checkin:'Make.proto'
+ text:(outStream contents)
+ directory:package
+ module:module
+ logMessage:'automatically generated by browser'
+ force:false)
+ ifFalse:[
+ Transcript showCR:'checkin of Make.proto failed'.
+ self warn:'checkin failed'.
+ ].
+ ].
+ ].
+ ].
+!
+
projectMenuGenerateMakefiles
- self information:'Sorry - this functionality is not yet implemented'
+ "/ intermediate - this will move into a commonly used utility class
+ "/ (where all the project code support will be collected).
+
+ self projectMenuGenerateMakeProtoFile
!
projectMenuImport
@@ -19503,6 +19638,46 @@
self normalLabel
!
+projectsClassesInLoadOrder:classesInProject
+ |classesInLoadOrder|
+
+ classesInLoadOrder := OrderedCollection new:(classesInProject size).
+ [classesInProject size > 0] whileTrue:[
+ |thoseWithOtherSuperclasses thoseWhichCanBeLoadedNow|
+
+ "/ all those, which have superclasses NOT in the package
+ thoseWithOtherSuperclasses := classesInProject select:[:eachClass | (classesInProject includesIdentical:eachClass superclass) not].
+
+ "/ all those with privateClasses, which have superclasses NOT in the package
+ thoseWhichCanBeLoadedNow := thoseWithOtherSuperclasses select:[:eachClass |
+ |anyPrivateClassWithSuperClassInPackage|
+ anyPrivateClassWithSuperClassInPackage := false.
+ eachClass privateClasses do:[:eachPrivateClass |
+ (classesInProject includesIdentical:eachPrivateClass superclass) ifTrue:[
+ anyPrivateClassWithSuperClassInPackage := true
+ ]
+ ].
+ anyPrivateClassWithSuperClassInPackage ifTrue:[
+ Transcript showCR:('later load of ' , eachClass name , ' due to a private classes superclass').
+ ].
+ anyPrivateClassWithSuperClassInPackage not.
+ ].
+
+ thoseWhichCanBeLoadedNow size == 0 ifTrue:[
+ self error:'load order is cyclic (care for private classes)' mayProceed:true.
+ thoseWhichCanBeLoadedNow := thoseWithOtherSuperclasses.
+ thoseWhichCanBeLoadedNow size == 0 ifTrue:[
+ self error:'load order is cyclic'.
+ ]
+ ].
+ thoseWhichCanBeLoadedNow := thoseWhichCanBeLoadedNow asOrderedCollection.
+ thoseWhichCanBeLoadedNow sort:[:a :b | a name < b name].
+ classesInLoadOrder addAll:thoseWhichCanBeLoadedNow.
+ classesInProject removeAllFoundIn:thoseWhichCanBeLoadedNow.
+ ].
+ ^ classesInLoadOrder
+!
+
selectedProjectsDo:aBlock
|selectedProjects allProjects|
@@ -49577,6 +49752,6 @@
!NewSystemBrowser class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/Attic/NewSystemBrowser.st,v 1.177 2001-09-27 17:51:31 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Attic/NewSystemBrowser.st,v 1.178 2001-09-28 11:13:28 cg Exp $'
! !
NewSystemBrowser initialize!
--- a/Tools__NewSystemBrowser.st Thu Sep 27 19:51:31 2001 +0200
+++ b/Tools__NewSystemBrowser.st Fri Sep 28 13:13:28 2001 +0200
@@ -18837,47 +18837,15 @@
self
projectMenuWithAllClassesLoadedDo:[:module :package :classesInProject |
- |moduleAndPackage classesInLoadOrder mgr outStream|
+ |moduleAndPackage classesInLoadOrder mgr outStream hasExtensions|
moduleAndPackage := module , ':' , package.
self busyLabel:'Generating loadAll file for ' , moduleAndPackage , '...'.
"/ now, generate the loadAll file
- classesInLoadOrder := OrderedCollection new:(classesInProject size).
- [classesInProject size > 0] whileTrue:[
- |thoseWithOtherSuperclasses thoseWhichCanBeLoadedNow|
-
- "/ all those, which have superclasses NOT in the package
- thoseWithOtherSuperclasses := classesInProject select:[:eachClass | (classesInProject includesIdentical:eachClass superclass) not].
-
- "/ all those with privateClasses, which have superclasses NOT in the package
- thoseWhichCanBeLoadedNow := thoseWithOtherSuperclasses select:[:eachClass |
- |anyPrivateClassWithSuperClassInPackage|
- anyPrivateClassWithSuperClassInPackage := false.
- eachClass privateClasses do:[:eachPrivateClass |
- (classesInProject includesIdentical:eachPrivateClass superclass) ifTrue:[
- anyPrivateClassWithSuperClassInPackage := true
- ]
- ].
- anyPrivateClassWithSuperClassInPackage ifTrue:[
- Transcript showCR:('later load of ' , eachClass name , ' due to a private classes superclass').
- ].
- anyPrivateClassWithSuperClassInPackage not.
- ].
-
- thoseWhichCanBeLoadedNow size == 0 ifTrue:[
- self error:'load order is cyclic (care for private classes)' mayProceed:true.
- thoseWhichCanBeLoadedNow := thoseWithOtherSuperclasses.
- thoseWhichCanBeLoadedNow size == 0 ifTrue:[
- self error:'load order is cyclic'.
- ]
- ].
- thoseWhichCanBeLoadedNow := thoseWhichCanBeLoadedNow asOrderedCollection.
- thoseWhichCanBeLoadedNow sort:[:a :b | a name < b name].
- classesInLoadOrder addAll:thoseWhichCanBeLoadedNow.
- classesInProject removeAllFoundIn:thoseWhichCanBeLoadedNow.
- ].
+ classesInLoadOrder := self projectsClassesInLoadOrder:classesInProject.
+ hasExtensions := Smalltalk allClasses contains:[:cls | (cls hasExtensionsFrom:moduleAndPackage)].
mgr := classesInLoadOrder first sourceCodeManager.
mgr isNil ifTrue:[
@@ -18935,6 +18903,9 @@
outStream nextPutLine:' ''' , classFilename asFilename baseName, ''''.
].
+ hasExtensions ifTrue:[
+ outStream nextPutLine:' ''extensions.st'''.
+ ].
outStream nextPutAll:'
) asOrderedCollection.
@@ -18989,8 +18960,172 @@
].
!
+projectMenuGenerateMakeProtoFile
+ "/ intermediate - this will move into a commonly used utility class
+ "/ (where all the project code support will be collected).
+
+ self
+ projectMenuWithAllClassesLoadedDo:[:module :package :classesInProject |
+ |moduleAndPackage classesInLoadOrder mgr outStream hasExtensions libName|
+
+ libName := package copyFrom:(package lastIndexOf:$/)+1.
+
+ moduleAndPackage := module , ':' , package.
+ self busyLabel:'Generating Make.proto file for ' , moduleAndPackage , '...'.
+
+ "/ now, generate the Make.proto file
+
+ classesInLoadOrder := self projectsClassesInLoadOrder:classesInProject.
+ hasExtensions := Smalltalk allClasses contains:[:cls | (cls hasExtensionsFrom:moduleAndPackage)].
+
+ mgr := classesInLoadOrder first sourceCodeManager.
+ mgr isNil ifTrue:[
+ self warn:'No sourceCode manager - cannot checkin\(will generate a Make.proto-file in the current directory).' withCRs.
+ 'Make.proto' asFilename exists ifTrue:[
+ (self confirm:'A Make.proto file exists in the current directory\\Overwrite ?' withCRs) ifFalse:[
+ ^ self.
+ ]
+ ].
+ outStream := 'Make.proto' asFilename writeStream.
+ ] ifFalse:[
+ (mgr checkForExistingContainerInModule:module package:package container:'Make.proto') ifFalse:[
+ (mgr createContainerForText:'' inModule:module package:package container:'Make.proto') ifFalse:[
+ self warn:(resources string:'cannot create new container: ''Make.proto'' (in %1:%2)'
+ with:module with:package).
+ ^ self.
+ ].
+ ].
+ outStream := '' writeStream.
+ ].
+
+ outStream nextPutAll:'#
+# $' , 'Header' , '$
+#
+# --- Make.proto automatically created by the browsers generate-MakeProto function
+
+#
+# position in directory hierarchy:
+TOP=../..
+
+# subdirectories where targets are to be made:
+SUBDIRS=
+
+# subdirectories where Makefiles are to be made:
+# (only to be defined if different from SUBDIRS)
+# ALLSUBDIRS=
+
+
+# ***************************** you may have to modify the next line ***
+MODULE=' , module , '
+MODULE_DIR=' , package , '
+LIBNAME=' , libName , '
+PACKAGE=$(MODULE):$(MODULE_DIR)
+
+
+# -H. : create header files locally
+# -Pxxx : defines the package
+# -Zxxx : a prefix for variables within the classLib
+# +optspace : optimized for space
+# +optspace2 : optimized more for space
+# +optspace3 : optimized even more for space
+# +optinline : generate optimized inline code
+# +inlineNew : additionally inline new
+#
+# ***************************** you may have to modify the following lines ***
+# STCLOCALOPTIMIZATIONS=+optinline +inlineNew
+# STCLOCALOPTIMIZATIONS=+optspace2
+
+#
+# sorry: must prevent stc from inlining #not - sigh
+#
+STCLOCALOPTIMIZATIONS=+optspace2 -inlinenot
+#
+# for a class-library package, you can uncomment the following:
+# (it does not hurt much, if you leave it as is - but you may NOT
+# uncomment it if object files are to be loaded individually later).
+# INITCODESEPFLAG=$(SEPINITCODE)
+#
+# the following MAY ONLY be uncommented for classes/classLibs,
+# which are ALWAYS statically included in the executable.
+# (i.e. not for those which are subject to dynamic loading).
+# COMMONSYMFLAG=$(COMMONSYMBOLS)
+#
+# SUPERCLASSINCL=-I$(TOP)/libbasic -I$(TOP)/libwidg2
+STCLOCALOPT=$(SUPERCLASSINCL) $(STCLOCALOPTIMIZATIONS) -H. ''-P$(PACKAGE)'' -Z' ,libName,' $(COMMONSYMFLAG) $(INITCODESEPFLAG)
+
+
+# if you use RCS, there are rules in the Makefile for ci/co
+RCSSOURCES=*.st Make.proto
+
+# additional C targets or libraries should be added below
+LOCAL_EXTRA_TARGTES=
+
+all:: classLibRule
+
+OBJS= \
+'.
+ classesInLoadOrder
+ do:[:eachClass |
+ |sourceInfo classFilename|
+
+ sourceInfo := eachClass sourceCodeManager sourceInfoOfClass:eachClass.
+ sourceInfo notNil ifTrue:[
+ classFilename := eachClass sourceCodeManager containerFromSourceInfo:sourceInfo.
+ ] ifFalse:[
+ classFilename := eachClass classFilename ? (eachClass nameWithoutPrefix).
+ ].
+ classFilename := classFilename asFilename withoutSuffix baseName.
+ outStream nextPutAll:' ' , classFilename , '.$(O)'.
+ ]
+ separatedBy:[ outStream nextPutLine:' \' ].
+
+ hasExtensions ifTrue:[
+ outStream nextPutLine:' \'.
+ outStream nextPutAll:' extensions.$(O)'
+ ].
+
+ outStream nextPutAll:'
+
+cleanjunk::
+
+clean::
+' , Character tab , '@-rm -f *.c *.H *.o
+
+clobber::
+' , Character tab , '@-rm -f *.c *.H *.o
+
+# BEGINMAKEDEPEND --- do not remove this line; make depend needs it
+# ENDMAKEDEPEND --- do not remove this line
+'.
+ outStream close.
+
+ mgr notNil ifTrue:[
+ self activityNotification:(resources string:'checking in...').
+
+ InformationSignal handle:[:ex |
+ Transcript showCR:ex errorString
+ ] do:[
+ (mgr
+ checkin:'Make.proto'
+ text:(outStream contents)
+ directory:package
+ module:module
+ logMessage:'automatically generated by browser'
+ force:false)
+ ifFalse:[
+ Transcript showCR:'checkin of Make.proto failed'.
+ self warn:'checkin failed'.
+ ].
+ ].
+ ].
+ ].
+!
+
projectMenuGenerateMakefiles
- self information:'Sorry - this functionality is not yet implemented'
+ "/ intermediate - this will move into a commonly used utility class
+ "/ (where all the project code support will be collected).
+
+ self projectMenuGenerateMakeProtoFile
!
projectMenuImport
@@ -19503,6 +19638,46 @@
self normalLabel
!
+projectsClassesInLoadOrder:classesInProject
+ |classesInLoadOrder|
+
+ classesInLoadOrder := OrderedCollection new:(classesInProject size).
+ [classesInProject size > 0] whileTrue:[
+ |thoseWithOtherSuperclasses thoseWhichCanBeLoadedNow|
+
+ "/ all those, which have superclasses NOT in the package
+ thoseWithOtherSuperclasses := classesInProject select:[:eachClass | (classesInProject includesIdentical:eachClass superclass) not].
+
+ "/ all those with privateClasses, which have superclasses NOT in the package
+ thoseWhichCanBeLoadedNow := thoseWithOtherSuperclasses select:[:eachClass |
+ |anyPrivateClassWithSuperClassInPackage|
+ anyPrivateClassWithSuperClassInPackage := false.
+ eachClass privateClasses do:[:eachPrivateClass |
+ (classesInProject includesIdentical:eachPrivateClass superclass) ifTrue:[
+ anyPrivateClassWithSuperClassInPackage := true
+ ]
+ ].
+ anyPrivateClassWithSuperClassInPackage ifTrue:[
+ Transcript showCR:('later load of ' , eachClass name , ' due to a private classes superclass').
+ ].
+ anyPrivateClassWithSuperClassInPackage not.
+ ].
+
+ thoseWhichCanBeLoadedNow size == 0 ifTrue:[
+ self error:'load order is cyclic (care for private classes)' mayProceed:true.
+ thoseWhichCanBeLoadedNow := thoseWithOtherSuperclasses.
+ thoseWhichCanBeLoadedNow size == 0 ifTrue:[
+ self error:'load order is cyclic'.
+ ]
+ ].
+ thoseWhichCanBeLoadedNow := thoseWhichCanBeLoadedNow asOrderedCollection.
+ thoseWhichCanBeLoadedNow sort:[:a :b | a name < b name].
+ classesInLoadOrder addAll:thoseWhichCanBeLoadedNow.
+ classesInProject removeAllFoundIn:thoseWhichCanBeLoadedNow.
+ ].
+ ^ classesInLoadOrder
+!
+
selectedProjectsDo:aBlock
|selectedProjects allProjects|
@@ -49577,6 +49752,6 @@
!NewSystemBrowser class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/Tools__NewSystemBrowser.st,v 1.177 2001-09-27 17:51:31 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools__NewSystemBrowser.st,v 1.178 2001-09-28 11:13:28 cg Exp $'
! !
NewSystemBrowser initialize!