9493
|
1 |
"{ Package: 'stx:libbasic3' }"
|
|
2 |
|
|
3 |
Object subclass:#ProjectDefinition
|
9517
|
4 |
instanceVariableNames:''
|
|
5 |
classVariableNames:''
|
|
6 |
poolDictionaries:''
|
|
7 |
category:'System-Support-Projects'
|
9493
|
8 |
!
|
|
9 |
|
|
10 |
|
|
11 |
!ProjectDefinition class methodsFor:'instance creation'!
|
|
12 |
|
|
13 |
definitionClassForPackage:aPackageID
|
|
14 |
|classes|
|
|
15 |
|
|
16 |
classes := OrderedCollection new.
|
|
17 |
Smalltalk allClassesInPackage:aPackageID
|
|
18 |
do:[:eachClass |
|
9503
|
19 |
eachClass isLoaded ifFalse:[
|
|
20 |
eachClass autoload
|
|
21 |
].
|
9493
|
22 |
(eachClass isSubclassOf:ProjectDefinition) ifTrue:[
|
|
23 |
classes add:eachClass
|
|
24 |
]
|
|
25 |
].
|
|
26 |
|
|
27 |
classes isEmpty ifTrue:[
|
|
28 |
^ nil
|
|
29 |
].
|
|
30 |
classes size > 1 ifTrue:[
|
|
31 |
self error:'OOPS - multiple projectDefinitions' mayProceed:true.
|
|
32 |
^ classes first.
|
|
33 |
].
|
|
34 |
^ classes first
|
|
35 |
|
|
36 |
"Created: / 09-08-2006 / 17:27:32 / fm"
|
|
37 |
!
|
|
38 |
|
|
39 |
newNamed:newName package:packageID
|
|
40 |
|newClass|
|
|
41 |
|
|
42 |
newClass := self
|
|
43 |
subclass:(newName asSymbol)
|
|
44 |
instanceVariableNames:''
|
|
45 |
classVariableNames:''
|
|
46 |
poolDictionaries:''
|
|
47 |
category:'* Projects *'.
|
|
48 |
|
|
49 |
newClass package:packageID asSymbol.
|
|
50 |
^ newClass
|
|
51 |
|
|
52 |
"Created: / 09-08-2006 / 17:57:37 / fm"
|
|
53 |
"Modified: / 09-08-2006 / 19:27:53 / fm"
|
|
54 |
! !
|
|
55 |
|
|
56 |
!ProjectDefinition class methodsFor:'accessing'!
|
|
57 |
|
|
58 |
initialClassNameForDefinitionOf:aPackageId
|
9513
|
59 |
|s|
|
|
60 |
|
|
61 |
s := aPackageId asString copy replaceAny:':/' by:$_.
|
|
62 |
(s endsWith:$_) ifTrue:[
|
|
63 |
s := s copyWithoutLast:1
|
|
64 |
].
|
|
65 |
^ s , '_Definition'
|
9493
|
66 |
|
|
67 |
"
|
|
68 |
DapasXProject initialClassNameForDefinitionOf:'bosch:dapasx/interactiver_editor'
|
|
69 |
DapasXProject initialClassNameForDefinitionOf:'stx:libbasic'
|
|
70 |
DapasXProject initialClassNameForDefinitionOf:'stx:goodies/xml'
|
|
71 |
"
|
|
72 |
|
|
73 |
"Created: / 09-08-2006 / 17:44:47 / fm"
|
9513
|
74 |
"Modified: / 10-08-2006 / 13:33:14 / cg"
|
9493
|
75 |
!
|
|
76 |
|
|
77 |
libraryName
|
|
78 |
^ self package asString copy replaceAny:':/' by:$_
|
|
79 |
|
|
80 |
"
|
9516
|
81 |
bosch_dapasx_datenbasis_Definition libraryName
|
9493
|
82 |
"
|
|
83 |
|
|
84 |
"Modified: / 09-08-2006 / 18:20:29 / fm"
|
|
85 |
!
|
|
86 |
|
|
87 |
module
|
|
88 |
|
|
89 |
^self moduleOfClass: self
|
|
90 |
|
|
91 |
"
|
|
92 |
DapasXProject module
|
|
93 |
DapasX_Datenbasis module
|
|
94 |
"
|
|
95 |
|
|
96 |
"Created: / 08-08-2006 / 20:24:53 / fm"
|
|
97 |
"Modified: / 09-08-2006 / 16:16:37 / fm"
|
|
98 |
!
|
|
99 |
|
|
100 |
moduleDirectory
|
|
101 |
|
|
102 |
^(self package subStrings: $:) last
|
|
103 |
|
|
104 |
"
|
|
105 |
DapasXProject moduleDirectory
|
|
106 |
DapasX_Datenbasis moduleDirectory
|
|
107 |
"
|
|
108 |
|
|
109 |
"Created: / 08-08-2006 / 20:25:39 / fm"
|
|
110 |
!
|
|
111 |
|
|
112 |
moduleOfClass: aClass
|
|
113 |
|
|
114 |
^(aClass package subStrings: $:) first
|
|
115 |
|
|
116 |
"
|
|
117 |
DapasXProject module
|
|
118 |
DapasX_Datenbasis module
|
|
119 |
"
|
|
120 |
|
|
121 |
"Created: / 09-08-2006 / 16:16:16 / fm"
|
|
122 |
!
|
|
123 |
|
9503
|
124 |
msdosPathToPackage:aPackageID
|
|
125 |
"Returns the path to stx counting the number of $/ and $: in the package name and adding for each one '../' to get the ST/X top directory"
|
|
126 |
|
|
127 |
^ self msdosPathToTop , '\..\' , (aPackageID asString copy replaceAll:$: by:$/)
|
|
128 |
|
|
129 |
"
|
|
130 |
DapasX_Datenbasis pathToPackage:'bosch:dapasx/kernel'
|
|
131 |
"
|
|
132 |
|
|
133 |
"Created: / 09-08-2006 / 16:35:22 / fm"
|
|
134 |
!
|
|
135 |
|
|
136 |
msdosPathToTop
|
|
137 |
"Returns the path to stx counting the number of $/ and $: in the package name and adding for each one '../' to get the ST/X top directory"
|
|
138 |
|
|
139 |
|
|
140 |
^ (((1 to:(self package asCollectionOfSubstringsSeparatedByAny:':/') size)
|
|
141 |
collect:[:n | '..\']) asStringWith:'') , 'stx'
|
|
142 |
|
|
143 |
"
|
|
144 |
DapasXProject pathToTop
|
|
145 |
DapasX_Datenbasis pathToTop
|
|
146 |
"
|
|
147 |
|
|
148 |
"Created: / 09-08-2006 / 15:45:54 / fm"
|
|
149 |
!
|
|
150 |
|
9516
|
151 |
packageName
|
|
152 |
|
9517
|
153 |
^((self package asString copy replaceAny:'/' by:$:) subStrings: $:) last
|
9516
|
154 |
|
|
155 |
|
|
156 |
"
|
|
157 |
bosch_dapasx_hw_schnittstellen_Definition packageName
|
|
158 |
bosch_dapasx_datenbasis_Definition packageName
|
9517
|
159 |
bosch_dapasx_parameter_system_Definition packageName
|
9516
|
160 |
"
|
|
161 |
|
|
162 |
"Created: / 08-08-2006 / 20:24:53 / fm"
|
|
163 |
"Modified: / 09-08-2006 / 16:16:37 / fm"
|
|
164 |
!
|
|
165 |
|
9493
|
166 |
parentProject
|
|
167 |
|
|
168 |
^(self package asString subStrings: $/) first
|
|
169 |
|
|
170 |
"
|
9516
|
171 |
bosch_dapasx_hw_schnittstellen_Definition parentProject
|
9493
|
172 |
DapasX_Datenbasis parentProject
|
|
173 |
"
|
|
174 |
|
|
175 |
"Created: / 07-08-2006 / 20:18:27 / fm"
|
|
176 |
"Modified: / 08-08-2006 / 10:47:37 / fm"
|
|
177 |
!
|
|
178 |
|
9503
|
179 |
unixPathToPackage:aPackageID
|
9493
|
180 |
"Returns the path to stx counting the number of $/ and $: in the package name and adding for each one '../' to get the ST/X top directory"
|
|
181 |
|
9503
|
182 |
^ self unixPathToTop , '/../' , (aPackageID asString copy replaceAll:$: by:$/)
|
9493
|
183 |
|
|
184 |
"
|
|
185 |
DapasX_Datenbasis pathToPackage:'bosch:dapasx/kernel'
|
|
186 |
"
|
|
187 |
|
|
188 |
"Created: / 09-08-2006 / 16:35:22 / fm"
|
|
189 |
!
|
|
190 |
|
9503
|
191 |
unixPathToTop
|
9493
|
192 |
"Returns the path to stx counting the number of $/ and $: in the package name and adding for each one '../' to get the ST/X top directory"
|
|
193 |
|
9503
|
194 |
|
9493
|
195 |
^ (((1 to:(self package asCollectionOfSubstringsSeparatedByAny:':/') size)
|
|
196 |
collect:[:n | '../']) asStringWith:'') , 'stx'
|
|
197 |
|
|
198 |
"
|
|
199 |
DapasXProject pathToTop
|
|
200 |
DapasX_Datenbasis pathToTop
|
|
201 |
"
|
|
202 |
|
|
203 |
"Created: / 09-08-2006 / 15:45:54 / fm"
|
|
204 |
! !
|
|
205 |
|
|
206 |
!ProjectDefinition class methodsFor:'file generation'!
|
|
207 |
|
9495
|
208 |
allClassNames
|
|
209 |
^ (self compiled_classNames , self autoloaded_classNames , self excluded_classNames)
|
|
210 |
!
|
|
211 |
|
9501
|
212 |
generate_abbrev_dot_stc
|
9495
|
213 |
^ String
|
|
214 |
streamContents:[:s |
|
|
215 |
self allClassNames do:[:eachClassName |
|
9503
|
216 |
|cls fn|
|
9495
|
217 |
|
|
218 |
cls := Smalltalk classNamed:eachClassName.
|
|
219 |
cls autoload.
|
|
220 |
s nextPutAll:eachClassName.
|
|
221 |
s nextPutAll:' '.
|
9503
|
222 |
fn := cls classFilename asFilename withoutSuffix baseName.
|
|
223 |
(fn includes:Character space) ifTrue:[
|
|
224 |
s nextPutAll:fn storeString.
|
|
225 |
] ifFalse:[
|
|
226 |
s nextPutAll:fn.
|
|
227 |
].
|
9495
|
228 |
s nextPutAll:' '.
|
|
229 |
s nextPutAll:cls package.
|
|
230 |
s nextPutAll:' '.
|
9502
|
231 |
s nextPutAll:cls category asString storeString.
|
9495
|
232 |
s nextPutAll:' '.
|
9500
|
233 |
s nextPutAll:(cls theMetaclass instVarNames size) printString.
|
9495
|
234 |
s cr.
|
|
235 |
]
|
|
236 |
]
|
|
237 |
|
|
238 |
"
|
9501
|
239 |
DapasXProject generate_abbrev_dot_stc
|
|
240 |
DapasX_Datenbasis generate_abbrev_dot_stc
|
|
241 |
bosch_dapasx_interactiver_editor_Definition generate_abbrev_dot_stc
|
9495
|
242 |
"
|
|
243 |
"Created: / 09-08-2006 / 11:24:39 / fm"
|
|
244 |
!
|
|
245 |
|
9493
|
246 |
generate_bc_dot_def
|
|
247 |
|
|
248 |
^self replaceMappings: self bc_dot_def_mappings
|
|
249 |
in: self bc_dot_def
|
|
250 |
|
|
251 |
"
|
|
252 |
DapasXProject generate_bc_dot_def
|
|
253 |
DapasX_Datenbasis generate_bc_dot_def
|
|
254 |
|
|
255 |
"
|
|
256 |
|
|
257 |
"Modified: / 09-08-2006 / 11:30:42 / fm"
|
|
258 |
!
|
|
259 |
|
|
260 |
generate_libInit_dot_cc
|
|
261 |
|
|
262 |
^self replaceMappings: self libInit_dot_cc_mappings
|
|
263 |
in: self libInit_dot_cc
|
|
264 |
|
|
265 |
"
|
|
266 |
DapasXProject generate_libInit_dot_cc
|
|
267 |
DapasX_Datenbasis generate_libInit_dot_cc
|
|
268 |
|
|
269 |
"
|
|
270 |
|
|
271 |
"Created: / 08-08-2006 / 12:47:16 / fm"
|
|
272 |
"Modified: / 09-08-2006 / 11:30:52 / fm"
|
|
273 |
!
|
|
274 |
|
|
275 |
generate_make_dot_proto
|
|
276 |
|
|
277 |
^self replaceMappings: self make_dot_proto_mappings
|
|
278 |
in: self make_dot_proto
|
|
279 |
|
|
280 |
"
|
|
281 |
DapasXProject generate_make_dot_proto
|
|
282 |
DapasX_Datenbasis generate_make_dot_proto
|
|
283 |
|
|
284 |
"
|
|
285 |
|
|
286 |
"Modified: / 09-08-2006 / 11:31:01 / fm"
|
|
287 |
!
|
|
288 |
|
|
289 |
generate_make_dot_spec
|
|
290 |
|
|
291 |
^self replaceMappings: self make_dot_spec_mappings
|
|
292 |
in: self make_dot_spec
|
|
293 |
|
|
294 |
"
|
|
295 |
DapasXProject generate_make_dot_spec
|
|
296 |
DapasX_Datenbasis generate_make_dot_spec
|
|
297 |
|
|
298 |
"
|
|
299 |
|
|
300 |
"Modified: / 09-08-2006 / 11:31:09 / fm"
|
|
301 |
!
|
|
302 |
|
|
303 |
generate_nt_dot_def
|
|
304 |
|
|
305 |
^self replaceMappings: self nt_dot_def_mappings
|
|
306 |
in: self nt_dot_def
|
|
307 |
|
|
308 |
"
|
|
309 |
DapasXProject generate_nt_dot_def
|
|
310 |
DapasX_Datenbasis generate_nt_dot_def
|
|
311 |
|
|
312 |
"
|
|
313 |
|
|
314 |
"Modified: / 09-08-2006 / 11:31:21 / fm"
|
|
315 |
!
|
|
316 |
|
|
317 |
generate_nt_dot_mak
|
|
318 |
|
|
319 |
^self replaceMappings: self nt_dot_mak_mappings
|
|
320 |
in: self nt_dot_mak
|
|
321 |
|
|
322 |
"
|
|
323 |
DapasXProject generate_nt_dot_mak
|
|
324 |
DapasX_Datenbasis generate_nt_dot_mak
|
|
325 |
|
|
326 |
"
|
|
327 |
|
|
328 |
"Modified: / 09-08-2006 / 11:46:14 / fm"
|
9516
|
329 |
!
|
|
330 |
|
|
331 |
generate_packageName_dot_rc
|
|
332 |
|
|
333 |
^self replaceMappings: self packageName_dot_rc_mappings
|
|
334 |
in: self packageName_dot_rc
|
|
335 |
|
|
336 |
"
|
|
337 |
bosch_dapasx_datenbasis_Definition generate_packageName_dot_rc
|
|
338 |
bosch_dapasx_hw_schnittstellen_Definition generate_packageName_dot_rc
|
|
339 |
|
|
340 |
"
|
|
341 |
|
|
342 |
"Modified: / 09-08-2006 / 11:31:09 / fm"
|
9493
|
343 |
! !
|
|
344 |
|
|
345 |
!ProjectDefinition class methodsFor:'file templates'!
|
|
346 |
|
|
347 |
bc_dot_def
|
|
348 |
|
|
349 |
^
|
|
350 |
'LIBRARY %(LIBRARY_NAME)
|
|
351 |
DESCRIPTION %(DESCRIPTION)
|
|
352 |
CODE PRELOAD MOVEABLE DISCARDABLE
|
|
353 |
SEGMENTS
|
|
354 |
INITCODE PRELOAD DISCARDABLE
|
|
355 |
EXPORTS
|
9504
|
356 |
__%(LIBRARY_NAME)_Init @1
|
|
357 |
'
|
9493
|
358 |
|
|
359 |
"Created: / 08-08-2006 / 12:26:58 / fm"
|
|
360 |
"Modified: / 08-08-2006 / 19:32:27 / fm"
|
|
361 |
!
|
|
362 |
|
|
363 |
classLine_libInit_dot_cc
|
|
364 |
|
|
365 |
^'_%(CLASS)_Init(pass,__pRT__,snd);'
|
|
366 |
|
|
367 |
"Created: / 08-08-2006 / 12:51:44 / fm"
|
|
368 |
"Modified: / 08-08-2006 / 15:46:05 / fm"
|
|
369 |
!
|
|
370 |
|
|
371 |
extensionLine_libInit_dot_cc
|
|
372 |
|
|
373 |
^'_%(LIBRARY_NAME)_extensions_Init(pass,__pRT__,snd);'
|
|
374 |
|
|
375 |
"Created: / 08-08-2006 / 15:48:56 / fm"
|
|
376 |
"Modified: / 08-08-2006 / 19:32:33 / fm"
|
|
377 |
!
|
|
378 |
|
|
379 |
libInit_dot_cc
|
|
380 |
|
|
381 |
^
|
|
382 |
'/*
|
|
383 |
* DO NOT EDIT
|
|
384 |
* automagically generated from Make.proto (by make libInit.cc)
|
|
385 |
*/
|
|
386 |
#define __INDIRECTVMINITCALLS__
|
|
387 |
#include <stc.h>
|
|
388 |
#define INIT_TEXT_SECT /* as nothing */
|
|
389 |
#ifdef WIN32
|
|
390 |
# pragma codeseg INITCODE "INITCODE"
|
|
391 |
#else /* not WIN32 */
|
|
392 |
# if defined(__GNUC__) && !!defined(NO_SECTION_ATTRIBUTES)
|
|
393 |
# if (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) || __GNUC__ > 2
|
|
394 |
# undef INIT_TEXT_SECT
|
|
395 |
# define INIT_TEXT_SECT __attribute__((section(".stxitext")))
|
|
396 |
# endif
|
|
397 |
# endif /* not GNUC */
|
|
398 |
#endif /* not WIN32 */
|
|
399 |
#ifdef INIT_TEXT_SECT
|
|
400 |
extern void _%(LIBRARY_NAME)_Init() INIT_TEXT_SECT;
|
|
401 |
#endif
|
|
402 |
void _%(LIBRARY_NAME)_Init(pass, __pRT__, snd)
|
|
403 |
OBJ snd; struct __vmData__ *__pRT__; {
|
|
404 |
__BEGIN_PACKAGE2__("%(LIBRARY_NAME)", _%(LIBRARY_NAME)_Init, "%(PACKAGE)");
|
|
405 |
%(CLASSES)
|
|
406 |
%(EXTENSION)
|
|
407 |
__END_PACKAGE__();
|
|
408 |
}'
|
|
409 |
|
|
410 |
"Created: / 08-08-2006 / 12:40:45 / fm"
|
|
411 |
"Modified: / 08-08-2006 / 19:33:01 / fm"
|
|
412 |
!
|
|
413 |
|
|
414 |
make_dot_proto
|
|
415 |
|
|
416 |
^
|
|
417 |
'#
|
|
418 |
# Warning: once you modify this file, do not rerun
|
|
419 |
# stmkmp again - otherwise, your changes are lost.
|
|
420 |
#
|
|
421 |
# The Makefile as generated by this Make.proto supports the following targets:
|
|
422 |
# make - compile all st-files to a classLib
|
|
423 |
# make install - install the classLib in /opt/smalltalk/...
|
|
424 |
# make clean - clean all temp files
|
|
425 |
# make clobber - clean all
|
|
426 |
|
|
427 |
#
|
|
428 |
# position (of this package) in directory hierarchy:
|
|
429 |
# (must point to ST/X top directory, for tools and includes)
|
|
430 |
TOP=%(TOP)
|
|
431 |
|
|
432 |
|
|
433 |
# subdirectories where targets are to be made:
|
|
434 |
SUBDIRS=%(SUBDIRECTORIES)
|
|
435 |
|
|
436 |
|
|
437 |
# subdirectories where Makefiles are to be made:
|
|
438 |
# (only define if different from SUBDIRS)
|
|
439 |
# ALLSUBDIRS=
|
|
440 |
|
|
441 |
|
|
442 |
# if your embedded C code requires any system includes,
|
|
443 |
# add the path(es) here:,
|
|
444 |
# ********** OPTIONAL: MODIFY the next lines ***
|
|
445 |
# LOCALINCLUDES=-Ifoo -Ibar
|
|
446 |
LOCALINCLUDES=%(LOCAL_INCLUDES)
|
|
447 |
|
|
448 |
|
|
449 |
# if you need any additional defines for embedded C code,
|
|
450 |
# add them here:,
|
|
451 |
# ********** OPTIONAL: MODIFY the next lines ***
|
|
452 |
# LOCALDEFINES=-Dfoo -Dbar -DDEBUG
|
|
453 |
LOCALDEFINES=%(LOCAL_DEFINES)
|
|
454 |
|
|
455 |
|
|
456 |
#
|
|
457 |
# The next 2 defines should be left as-is
|
|
458 |
# for a class-library package, you can uncomment the following:
|
|
459 |
# (it does not hurt much, if you leave it as is - but you may NOT
|
|
460 |
# uncomment it if object files are to be loaded individually later).
|
|
461 |
# INITCODESEPFLAG=$(SEPINITCODE)
|
|
462 |
#
|
|
463 |
# the following MAY ONLY be uncommented for classes/classLibs,
|
|
464 |
# which are ALWAYS statically included in the executable.
|
|
465 |
# (i.e. NEVER for those which are subject to dynamic loading).
|
|
466 |
# COMMONSYMFLAG=$(COMMONSYMBOLS)
|
|
467 |
#
|
|
468 |
STCLOCALOPT=-I. $(LOCALINCLUDES) $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES) -H. ''-P$(PACKAGE)'' ''-Z$(LIBNAME)'' $(COMMONSYMFLAG) $(INITCODESEPFLAG)
|
|
469 |
|
|
470 |
|
|
471 |
# ********** OPTIONAL: MODIFY the next line ***
|
|
472 |
# additional C-libraries that should be pre-linked with the class-objects
|
|
473 |
LD_OBJ_LIBS=
|
|
474 |
|
|
475 |
|
|
476 |
# ********** OPTIONAL: MODIFY the next line ***
|
|
477 |
# additional C targets or libraries should be added below
|
|
478 |
LOCAL_EXTRA_TARGETS=
|
|
479 |
|
|
480 |
all:: preMake classLibRule postMake
|
|
481 |
|
|
482 |
|
|
483 |
# add more install actions here
|
|
484 |
install::
|
|
485 |
|
|
486 |
# add more install actions for aux-files (resources) here
|
|
487 |
installAux::
|
|
488 |
|
|
489 |
# add more preMake actions here
|
|
490 |
preMake::
|
|
491 |
|
|
492 |
# add more postMake actions here
|
|
493 |
postMake:: cleanjunk
|
|
494 |
|
|
495 |
cleanjunk::
|
|
496 |
|
|
497 |
clean::
|
|
498 |
-rm -f *.o *.H
|
|
499 |
|
|
500 |
clobber::
|
|
501 |
-rm -f *.so *.dll
|
|
502 |
|
|
503 |
',
|
|
504 |
"
|
|
505 |
$(INSTALLBASE)::
|
|
506 |
@test -d $@ || mkdir $@
|
|
507 |
|
|
508 |
$(INSTALLBASE)/packages:: $(INSTALLBASE)
|
|
509 |
@test -d $@ || mkdir $@
|
|
510 |
|
|
511 |
$(INSTALLBASE)/packages/$(MODULE):: $(INSTALLBASE)/packages
|
|
512 |
@test -d $@ || mkdir $@
|
|
513 |
|
|
514 |
$(INSTALLBASE)/packages/$(MODULE)/dapasx:: $(INSTALLBASE)/packages/$(MODULE)
|
|
515 |
@test -d $@ || mkdir $@
|
|
516 |
|
|
517 |
$(INSTALLBASE)/packages/$(MODULE)/dapasx/interactiver_editor:: $(INSTALLBASE)/packages/$(MODULE)/dapasx
|
|
518 |
@test -d $@ || mkdir $@
|
|
519 |
|
|
520 |
$(INSTALLBASE)/packages/$(MODULE)/$(MODULE_DIR):: $(INSTALLBASE)/packages/$(MODULE)
|
|
521 |
@test -d $@ || mkdir $@
|
|
522 |
"
|
|
523 |
'
|
|
524 |
# if other things are to be compiled,
|
|
525 |
# add target definitions here,
|
|
526 |
# and list them in LOCAL_EXTRA_TARGETS above.
|
|
527 |
# (care for make syntax - TABS are required in the actions)
|
|
528 |
# foo: foo.o
|
|
529 |
# $(CC) -o foo foo.o
|
|
530 |
|
|
531 |
# ''make depend'' will add dependency info between
|
|
532 |
# BEGIN...END below
|
|
533 |
#
|
|
534 |
# BEGINMAKEDEPEND --- do not remove this line; make depend needs it
|
|
535 |
# ENDMAKEDEPEND --- do not remove this line
|
|
536 |
|
|
537 |
'
|
|
538 |
|
|
539 |
"Created: / 08-08-2006 / 20:45:36 / fm"
|
|
540 |
"Modified: / 09-08-2006 / 16:50:23 / fm"
|
|
541 |
!
|
|
542 |
|
|
543 |
make_dot_spec
|
|
544 |
|
|
545 |
^
|
|
546 |
'#
|
|
547 |
# This file contains specifications which are common to all platforms.
|
|
548 |
#
|
|
549 |
# Warning: once you modify this file, do not rerun
|
|
550 |
# stmkmp again - otherwise, your changes are lost.
|
|
551 |
#
|
|
552 |
# This file contains definitions for Unix based platforms.
|
|
553 |
#
|
|
554 |
|
|
555 |
|
|
556 |
|
|
557 |
|
|
558 |
# module and directory-in-module;
|
|
559 |
# these should correspond to the directory hierarchy
|
|
560 |
# location (otherwise, ST/X will have a hard time to
|
|
561 |
# find out the packages location from its packageID)
|
|
562 |
MODULE=%(MODULE)
|
|
563 |
MODULE_DIR=%(MODULE_DIRECTORY)
|
|
564 |
|
|
565 |
|
|
566 |
# the name of your classLibrary:
|
|
567 |
# ********** REQUIRED: CHECK the next line ***
|
|
568 |
LIBNAME=%(LIBRARY_NAME)
|
|
569 |
|
|
570 |
|
|
571 |
# the package is stored as an ID in classes and methods
|
|
572 |
# to identify code belonging to this project.
|
|
573 |
# It also specifies the position in the source repository
|
|
574 |
# and directory tree, when packages are loaded by packageID.
|
|
575 |
# ********** REQUIRED: CHECK the next line ***
|
|
576 |
PACKAGE=$(MODULE):$(MODULE_DIR)
|
|
577 |
|
|
578 |
|
|
579 |
# Argument(s) to the stc compiler.
|
|
580 |
# -H. : create header files locally
|
|
581 |
# (if removed, they will be created as common
|
|
582 |
# -Pxxx : defines the package
|
|
583 |
# -Zxxx : a prefix for variables within the classLib
|
|
584 |
# -Dxxx : defines passed to to CC for inline C-code
|
|
585 |
# -Ixxx : include path passed to CC for inline C-code
|
|
586 |
# +optspace : optimized for space
|
|
587 |
# +optspace2 : optimized more for space
|
|
588 |
# +optspace3 : optimized even more for space
|
|
589 |
# +optinline : generate inline code for some ST constructs
|
|
590 |
# +inlineNew : additionally inline new
|
|
591 |
# +inlineMath : additionally inline some floatPnt math stuff
|
|
592 |
#
|
|
593 |
# ********** OPTIONAL: MODIFY the next line(s) ***
|
|
594 |
# STCLOCALOPTIMIZATIONS=+optinline +inlineNew
|
|
595 |
# STCLOCALOPTIMIZATIONS=+optspace3
|
|
596 |
STCLOCALOPTIMIZATIONS=+optspace3
|
|
597 |
|
|
598 |
|
|
599 |
# Argument(s) to the stc compiler.
|
|
600 |
# -warn : no warnings
|
|
601 |
# -warnNonStandard : no warnings about ST/X extensions
|
|
602 |
# -warnEOLComments : no warnings about EOL comment extension
|
|
603 |
# -warnPrivacy : no warnings about privateClass extension
|
|
604 |
#
|
|
605 |
# ********** OPTIONAL: MODIFY the next line(s) ***
|
|
606 |
# STCWARNINGS=-warn
|
|
607 |
# STCWARNINGS=-warnNonStandard
|
|
608 |
# STCWARNINGS=-warnEOLComments
|
|
609 |
STCWARNINGS=
|
|
610 |
|
|
611 |
OBJS= \
|
|
612 |
%(OBJECTS)
|
|
613 |
'
|
|
614 |
|
|
615 |
"Created: / 08-08-2006 / 19:31:29 / fm"
|
|
616 |
"Modified: / 09-08-2006 / 15:10:57 / fm"
|
|
617 |
!
|
|
618 |
|
|
619 |
nt_dot_def
|
|
620 |
|
|
621 |
^
|
|
622 |
'LIBRARY %(LIBRARY_NAME)
|
|
623 |
DESCRIPTION %(DESCRIPTION)
|
|
624 |
VERSION %(VERSION_NUMBER)
|
|
625 |
CODE EXECUTE READ
|
|
626 |
DATA READ WRITE
|
|
627 |
SECTIONS
|
|
628 |
INITCODE READ EXECUTE
|
|
629 |
INITDATA READ WRITE
|
|
630 |
EXPORTS
|
|
631 |
_%(LIBRARY_NAME)_Init @1
|
|
632 |
IMPORTS'
|
|
633 |
|
|
634 |
"Modified: / 08-08-2006 / 19:33:14 / fm"
|
|
635 |
!
|
|
636 |
|
|
637 |
nt_dot_mak
|
|
638 |
|
|
639 |
^
|
|
640 |
'#
|
|
641 |
# This file contains make rules for the win32 platform (using borland-bcc).
|
|
642 |
#
|
|
643 |
# Warning: once you modify this file, do not rerun
|
|
644 |
# stmkmp again - otherwise, your changes are lost.
|
|
645 |
#
|
|
646 |
TOP=%(TOP)
|
|
647 |
|
|
648 |
!!INCLUDE $(TOP)\rules\stdHeader_nt
|
|
649 |
|
|
650 |
!!INCLUDE Make.spec
|
|
651 |
|
|
652 |
LOCALINCLUDES=%(LOCAL_INCLUDES)
|
|
653 |
|
|
654 |
STCLOCALOPT=-I. $(LOCALINCLUDES) -H. $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES) ''-P$(PACKAGE)'' ''-Z$(LIBNAME)'' $(COMMONSYMFLAG) $(INITCODESEPFLAG)
|
|
655 |
|
|
656 |
ALL:: $(LIBJPEG) $(LIBDIR)\$(LIBNAME).lib $(BINDIR)\$(LIBNAME).dll
|
|
657 |
|
|
658 |
!!INCLUDE $(TOP)\rules\stdRules_nt
|
|
659 |
|
|
660 |
# BEGINMAKEDEPEND --- do not remove this line; make depend needs it
|
|
661 |
# ENDMAKEDEPEND --- do not remove this line
|
|
662 |
'
|
|
663 |
|
|
664 |
"Created: / 09-08-2006 / 11:44:20 / fm"
|
|
665 |
"Modified: / 09-08-2006 / 19:59:32 / fm"
|
|
666 |
!
|
|
667 |
|
|
668 |
objectLine_make_dot_spec
|
|
669 |
|
|
670 |
^' %(CLASS).$(O) \'
|
|
671 |
|
|
672 |
"Created: / 08-08-2006 / 20:16:46 / fm"
|
9516
|
673 |
!
|
|
674 |
|
|
675 |
packageName_dot_rc
|
|
676 |
|
|
677 |
^
|
|
678 |
'VS_VERSION_INFO VERSIONINFO
|
|
679 |
FILEVERSION 0,1,1,1
|
|
680 |
PRODUCTVERSION 0,1,1,1
|
|
681 |
FILEFLAGSMASK VS_FF_DEBUG | VS_FF_PRERELEASE
|
|
682 |
FILEFLAGS VS_FF_PRERELEASE | VS_FF_SPECIALBUILD
|
|
683 |
FILEOS VOS_NT_WINDOWS32
|
|
684 |
FILETYPE VFT_DLL
|
|
685 |
FILESUBTYPE VS_USER_DEFINED
|
|
686 |
|
|
687 |
BEGIN
|
|
688 |
BLOCK "StringFileInfo"
|
|
689 |
BEGIN
|
|
690 |
BLOCK "040904E4"
|
|
691 |
BEGIN
|
|
692 |
VALUE "CompanyName", "%(COMPANY_NAME)\0"
|
|
693 |
VALUE "FileDescription", "%(FILE_DESCRIPTION)\0"
|
|
694 |
VALUE "FileVersion", "%(FILE_VERSION)\0"
|
|
695 |
VALUE "InternalName", "%(INTERNAL_NAME)\0"
|
|
696 |
VALUE "LegalCopyright", "%(LEGAL_COPYRIGHT)\0"
|
|
697 |
VALUE "ProductName", "%(PRODUCT_NAME)\0"
|
|
698 |
VALUE "ProductVersion", "%(PRODUCT_VERSION)\0"
|
|
699 |
END
|
|
700 |
|
|
701 |
END
|
|
702 |
|
|
703 |
BLOCK "VarFileInfo"
|
|
704 |
BEGIN // Language | Translation
|
|
705 |
VALUE "Translation", 0x409, 0x4E4 // U.S. English, Windows Multilingual
|
|
706 |
END
|
|
707 |
END
|
|
708 |
'
|
|
709 |
|
|
710 |
|
|
711 |
"Created: / 08-08-2006 / 19:31:29 / fm"
|
|
712 |
"Modified: / 09-08-2006 / 15:10:57 / fm"
|
9493
|
713 |
! !
|
|
714 |
|
|
715 |
!ProjectDefinition class methodsFor:'mappings'!
|
|
716 |
|
|
717 |
bc_dot_def_mappings
|
9504
|
718 |
^ (Dictionary new)
|
|
719 |
at:#'LIBRARY_NAME' put:[ self libraryName ];
|
|
720 |
at:#'DESCRIPTION'
|
|
721 |
put:[
|
|
722 |
|d|
|
9493
|
723 |
|
9504
|
724 |
d := self description.
|
|
725 |
(d isEmptyOrNil ifTrue:[ 'test' ] ifFalse:[ d ]) storeString.
|
|
726 |
];
|
|
727 |
yourself
|
9493
|
728 |
|
|
729 |
"Created: / 09-08-2006 / 11:17:59 / fm"
|
|
730 |
!
|
|
731 |
|
|
732 |
classLine_libInit_dot_cc_mappings: aClassName
|
|
733 |
|
|
734 |
^Dictionary new
|
|
735 |
at: #'CLASS' put: [aClassName asString copy replaceAny:':' by:$_];
|
|
736 |
yourself
|
|
737 |
|
|
738 |
"Created: / 08-08-2006 / 14:04:00 / fm"
|
|
739 |
"Modified: / 09-08-2006 / 18:27:07 / fm"
|
|
740 |
!
|
|
741 |
|
|
742 |
extensionLine_libInit_dot_cc_mappings
|
|
743 |
|
|
744 |
^Dictionary new
|
|
745 |
at: #'LIBRARY_NAME' put: [self libraryName];
|
|
746 |
yourself
|
|
747 |
|
|
748 |
"Created: / 09-08-2006 / 11:19:59 / fm"
|
|
749 |
!
|
|
750 |
|
|
751 |
libInit_dot_cc_mappings
|
|
752 |
|
|
753 |
^Dictionary new
|
|
754 |
at: #'LIBRARY_NAME' put: [self libraryName];
|
|
755 |
at: #'PACKAGE' put: [self package];
|
|
756 |
at: #'CLASSES' put: [self generateClassLines_libInit_dot_cc];
|
|
757 |
at: #'EXTENSION' put: [self generateExtensionLine_libInit_dot_cc];
|
|
758 |
|
|
759 |
yourself
|
|
760 |
|
|
761 |
"Created: / 09-08-2006 / 11:20:24 / fm"
|
|
762 |
!
|
|
763 |
|
|
764 |
make_dot_proto_mappings
|
|
765 |
|
|
766 |
^Dictionary new
|
9503
|
767 |
at: #'TOP' put: [self unixPathToTop];
|
9493
|
768 |
at: #'SUBDIRECTORIES' put: [self generateSubDirectories];
|
9503
|
769 |
at: #'LOCAL_INCLUDES' put: [self generateUnixLocalIncludes];
|
9493
|
770 |
at: #'LOCAL_DEFINES' put: [''];
|
|
771 |
yourself
|
|
772 |
|
|
773 |
"Created: / 09-08-2006 / 11:20:45 / fm"
|
|
774 |
"Modified: / 09-08-2006 / 16:44:48 / fm"
|
|
775 |
!
|
|
776 |
|
|
777 |
make_dot_spec_mappings
|
|
778 |
|
|
779 |
^Dictionary new
|
|
780 |
at: #'MODULE' put: [self module];
|
|
781 |
at: #'MODULE_DIRECTORY' put: [self moduleDirectory];
|
|
782 |
at: #'LIBRARY_NAME' put: [self libraryName];
|
|
783 |
at: #'OBJECTS' put: [self generateObjects_make_dot_spec];
|
|
784 |
yourself
|
|
785 |
|
|
786 |
"Created: / 09-08-2006 / 11:21:06 / fm"
|
|
787 |
!
|
|
788 |
|
|
789 |
nt_dot_def_mappings
|
|
790 |
|
|
791 |
^Dictionary new
|
|
792 |
at: #'LIBRARY_NAME' put: [self libraryName];
|
9504
|
793 |
at: #'DESCRIPTION' put: [self description storeString];
|
9493
|
794 |
at: #'VERSION_NUMBER' put: [self versionNumber];
|
|
795 |
yourself
|
|
796 |
|
|
797 |
"Created: / 09-08-2006 / 11:21:21 / fm"
|
|
798 |
!
|
|
799 |
|
|
800 |
nt_dot_mak_mappings
|
|
801 |
|
|
802 |
^Dictionary new
|
9503
|
803 |
at: #'TOP' put: [self msdosPathToTop];
|
|
804 |
at: #'LOCAL_INCLUDES' put: [self generateMsdosLocalIncludes];
|
9493
|
805 |
yourself
|
|
806 |
|
|
807 |
"Created: / 09-08-2006 / 11:44:36 / fm"
|
|
808 |
"Modified: / 09-08-2006 / 20:00:01 / fm"
|
|
809 |
!
|
|
810 |
|
|
811 |
objectLine_make_dot_spec_mappings: aClassName
|
|
812 |
|
|
813 |
^Dictionary new
|
9503
|
814 |
at: #'CLASS' put: [(Smalltalk classNamed:aClassName) classFilename asFilename withoutSuffix baseName];
|
9493
|
815 |
yourself
|
|
816 |
|
|
817 |
"Created: / 08-08-2006 / 20:17:28 / fm"
|
|
818 |
"Modified: / 09-08-2006 / 18:26:52 / fm"
|
|
819 |
!
|
|
820 |
|
9516
|
821 |
packageName_dot_rc_mappings
|
|
822 |
|
|
823 |
^Dictionary new
|
|
824 |
at: #'COMPANY_NAME' put: [self companyName];
|
|
825 |
at: #'FILE_DESCRIPTION' put: [self fileDescription];
|
|
826 |
at: #'FILE_VERSION' put: [self fileVersion];
|
|
827 |
at: #'INTERNAL_NAME' put: [self internalName];
|
|
828 |
at: #'LEGAL_COPYRIGHT' put: [self legalCopyright];
|
|
829 |
at: #'PRODUCT_NAME' put: [self productName];
|
|
830 |
at: #'PRODUCT_VERSION' put: [self productVersion];
|
|
831 |
yourself
|
|
832 |
|
|
833 |
"Created: / 09-08-2006 / 11:21:21 / fm"
|
|
834 |
!
|
|
835 |
|
9493
|
836 |
replaceMappings: mappings in: fileTemplate
|
|
837 |
"Replaces the defined variable mappings found in a file template with the corresponding information"
|
|
838 |
|
|
839 |
^ fileTemplate bindWithArguments:mappings.
|
|
840 |
|
|
841 |
"
|
|
842 |
self replaceMappings: (self nt_dot_def_mappingsFor: self) in: self nt_dot_def
|
|
843 |
"
|
|
844 |
|
|
845 |
"Created: / 08-08-2006 / 11:44:27 / fm"
|
|
846 |
"Modified: / 08-08-2006 / 12:46:13 / fm"
|
|
847 |
! !
|
|
848 |
|
|
849 |
!ProjectDefinition class methodsFor:'mappings support'!
|
|
850 |
|
|
851 |
generateClassLines_libInit_dot_cc
|
|
852 |
|
9495
|
853 |
^self compiled_classNames
|
9493
|
854 |
inject: ''
|
|
855 |
into:[:classLines :className |
|
|
856 |
|newClassLine mappings|
|
|
857 |
mappings := self classLine_libInit_dot_cc_mappings: className.
|
|
858 |
newClassLine := self replaceMappings: mappings
|
|
859 |
in: self classLine_libInit_dot_cc.
|
|
860 |
classLines concatenate: newClassLine
|
|
861 |
and: String lf
|
|
862 |
]
|
|
863 |
|
|
864 |
"
|
|
865 |
DapasXProject generateClassLines_libInit_dot_cc
|
|
866 |
DapasX_Datenbasis generateClassLines_libInit_dot_cc
|
|
867 |
|
|
868 |
"
|
|
869 |
|
|
870 |
"Created: / 09-08-2006 / 11:21:48 / fm"
|
|
871 |
!
|
|
872 |
|
|
873 |
generateExtensionLine_libInit_dot_cc
|
|
874 |
|mappings|
|
|
875 |
^self extensionMethodNames isEmpty
|
|
876 |
ifTrue:['']
|
|
877 |
ifFalse:[ mappings := self extensionLine_libInit_dot_cc_mappings.
|
|
878 |
self replaceMappings: mappings
|
|
879 |
in: self extensionLine_libInit_dot_cc.]
|
|
880 |
"
|
|
881 |
DapasXProject generateExtensionLine_libInit_dot_cc
|
|
882 |
DapasX_Datenbasis generateExtensionLine_libInit_dot_cc
|
|
883 |
|
|
884 |
"
|
|
885 |
|
|
886 |
"Created: / 09-08-2006 / 11:23:34 / fm"
|
|
887 |
!
|
|
888 |
|
9503
|
889 |
generateMsdosLocalIncludes
|
9493
|
890 |
|
|
891 |
^self searchForProjectsWhichProvideHeaderFiles
|
|
892 |
inject: ''
|
|
893 |
into:[:objectLines :includeProjectName |
|
9503
|
894 |
objectLines , ' -I',(self msdosPathToPackage: includeProjectName)
|
9493
|
895 |
]
|
|
896 |
|
|
897 |
"
|
|
898 |
DapasXProject generateLocalIncludes
|
|
899 |
DapasX_Datenbasis generateLocalIncludes
|
|
900 |
|
|
901 |
"
|
|
902 |
|
|
903 |
"Created: / 09-08-2006 / 16:46:49 / fm"
|
|
904 |
!
|
|
905 |
|
|
906 |
generateObjects_make_dot_spec
|
9504
|
907 |
|pivateClassesOf classes|
|
9493
|
908 |
|
9504
|
909 |
classes := self compiled_classes.
|
|
910 |
pivateClassesOf := IdentityDictionary new.
|
|
911 |
classes do:[:each | pivateClassesOf at:each put:(each allPrivateClasses)].
|
|
912 |
|
|
913 |
classes topologicalSort:[:a :b |
|
|
914 |
"/ a must come before b iff:
|
|
915 |
"/ b is a subclass of a
|
|
916 |
"/ b has a private class which is a subclass of a
|
|
917 |
|
|
918 |
|mustComeBefore pivateClassesOfB|
|
|
919 |
mustComeBefore := b isSubclassOf:a.
|
|
920 |
pivateClassesOfB := pivateClassesOf at:b.
|
|
921 |
pivateClassesOfB do:[:eachClassInB |
|
|
922 |
mustComeBefore := mustComeBefore or:[eachClassInB isSubclassOf:a]
|
|
923 |
].
|
|
924 |
mustComeBefore
|
|
925 |
].
|
|
926 |
|
|
927 |
^ String streamContents:[:s |
|
|
928 |
classes do:[:eachClass |
|
|
929 |
|mappings newObjectLine|
|
|
930 |
|
|
931 |
mappings := self objectLine_make_dot_spec_mappings: eachClass name.
|
|
932 |
newObjectLine := self replaceMappings: mappings in: self objectLine_make_dot_spec.
|
|
933 |
s nextPutAll:newObjectLine.
|
|
934 |
s cr.
|
|
935 |
]
|
9493
|
936 |
]
|
|
937 |
"
|
|
938 |
DapasXProject generateObjects_make_dot_spec
|
|
939 |
DapasX_Datenbasis generateObjects_make_dot_spec
|
|
940 |
|
|
941 |
"
|
|
942 |
|
|
943 |
"Created: / 09-08-2006 / 11:24:39 / fm"
|
|
944 |
!
|
|
945 |
|
|
946 |
generatePrerequisiteProjectsPaths
|
|
947 |
|
|
948 |
^self prerequisiteProjects
|
|
949 |
inject: ''
|
|
950 |
into:[:objectLines :subProjectName |
|
|
951 |
objectLines
|
|
952 |
concatenate: String lf
|
|
953 |
and: ' -I'
|
|
954 |
and: subProjectName
|
|
955 |
]
|
|
956 |
|
|
957 |
"
|
|
958 |
DapasXProject generatePrerequisiteProjectsPaths
|
|
959 |
DapasX_Datenbasis generatePrerequisiteProjectsPaths
|
|
960 |
|
|
961 |
"
|
|
962 |
|
|
963 |
"Created: / 09-08-2006 / 12:34:20 / fm"
|
|
964 |
!
|
|
965 |
|
|
966 |
generateSubDirectories
|
|
967 |
|
|
968 |
^self subProjects
|
|
969 |
inject: ''
|
|
970 |
into:[:objectLines :subProjectName |
|
|
971 |
objectLines
|
|
972 |
concatenate: ' '
|
|
973 |
and: subProjectName
|
|
974 |
]
|
|
975 |
|
|
976 |
"
|
|
977 |
DapasXProject generateSubDirectories
|
|
978 |
DapasX_Datenbasis generateSubDirectories
|
|
979 |
|
|
980 |
"
|
|
981 |
|
|
982 |
"Created: / 09-08-2006 / 11:26:59 / fm"
|
|
983 |
!
|
|
984 |
|
9503
|
985 |
generateUnixLocalIncludes
|
|
986 |
|
|
987 |
^self searchForProjectsWhichProvideHeaderFiles
|
|
988 |
inject: ''
|
|
989 |
into:[:objectLines :includeProjectName |
|
|
990 |
objectLines , ' -I',(self unixPathToPackage: includeProjectName)
|
|
991 |
]
|
|
992 |
|
|
993 |
"
|
|
994 |
DapasXProject generateLocalIncludes
|
|
995 |
DapasX_Datenbasis generateLocalIncludes
|
|
996 |
|
|
997 |
"
|
|
998 |
|
|
999 |
"Created: / 09-08-2006 / 16:46:49 / fm"
|
|
1000 |
!
|
|
1001 |
|
9493
|
1002 |
prerequisiteProjectsOrdered
|
|
1003 |
|
|
1004 |
^self prerequisiteProjects asSortedCollection:[:a :b | ]
|
|
1005 |
|
|
1006 |
"
|
|
1007 |
DapasXProject generatePrerequisiteProjectsPaths
|
|
1008 |
DapasX_Datenbasis generatePrerequisiteProjectsPaths
|
|
1009 |
|
|
1010 |
"
|
|
1011 |
|
|
1012 |
"Created: / 09-08-2006 / 13:12:01 / fm"
|
|
1013 |
! !
|
|
1014 |
|
|
1015 |
!ProjectDefinition class methodsFor:'project description'!
|
|
1016 |
|
9495
|
1017 |
autoloaded_classNames
|
|
1018 |
"classes listed here will NOT be compiled, but remain autoloaded.
|
|
1019 |
to be excluded from the build process can be user-defined in my subclasses"
|
9493
|
1020 |
|
|
1021 |
^#()
|
|
1022 |
|
|
1023 |
"Created: / 07-08-2006 / 19:02:57 / fm"
|
|
1024 |
"Modified: / 07-08-2006 / 21:25:25 / fm"
|
|
1025 |
!
|
|
1026 |
|
9495
|
1027 |
classNames
|
|
1028 |
"this is a stupid default, a correponding method with real names
|
|
1029 |
is generated in my subclasses"
|
|
1030 |
|
|
1031 |
^#()
|
|
1032 |
|
|
1033 |
"Created: / 07-08-2006 / 19:02:57 / fm"
|
|
1034 |
"Modified: / 07-08-2006 / 21:25:25 / fm"
|
|
1035 |
!
|
|
1036 |
|
|
1037 |
compiled_classNames
|
|
1038 |
"this is a stupid default, a correponding method with real names
|
|
1039 |
is generated in my subclasses"
|
|
1040 |
|
|
1041 |
^#()
|
|
1042 |
|
|
1043 |
"Created: / 07-08-2006 / 19:02:57 / fm"
|
|
1044 |
"Modified: / 07-08-2006 / 21:25:25 / fm"
|
|
1045 |
!
|
|
1046 |
|
9504
|
1047 |
compiled_classes
|
|
1048 |
^ self compiled_classNames collect:[:eachName| (Smalltalk at:eachName asSymbol)]
|
|
1049 |
|
|
1050 |
"Created: / 09-08-2006 / 16:28:15 / fm"
|
|
1051 |
"Modified: / 09-08-2006 / 18:02:28 / fm"
|
|
1052 |
!
|
|
1053 |
|
9495
|
1054 |
compiled_classesDo:aBlock
|
9504
|
1055 |
self compiled_classes do:aBlock.
|
9493
|
1056 |
|
|
1057 |
"Created: / 09-08-2006 / 16:28:15 / fm"
|
|
1058 |
"Modified: / 09-08-2006 / 18:02:28 / fm"
|
|
1059 |
!
|
|
1060 |
|
|
1061 |
description
|
|
1062 |
"Returns a description string which will appear in nt.def and in the files info inside it's properties "
|
|
1063 |
|
|
1064 |
^''
|
|
1065 |
|
|
1066 |
"Created: / 08-08-2006 / 11:15:01 / fm"
|
|
1067 |
!
|
|
1068 |
|
9495
|
1069 |
excluded_classNames
|
|
1070 |
"this is a stupid default, a correponding method with real names
|
|
1071 |
to be excluded from the build process can be user-defined in my subclasses"
|
|
1072 |
|
|
1073 |
^#()
|
|
1074 |
|
|
1075 |
"Created: / 07-08-2006 / 19:02:57 / fm"
|
|
1076 |
"Modified: / 07-08-2006 / 21:25:25 / fm"
|
|
1077 |
!
|
|
1078 |
|
9493
|
1079 |
extensionMethodNames
|
|
1080 |
|
|
1081 |
^#()
|
|
1082 |
|
|
1083 |
"Created: / 08-08-2006 / 11:07:08 / fm"
|
|
1084 |
!
|
|
1085 |
|
|
1086 |
postLoadAction
|
|
1087 |
"raise an error: must be redefined in concrete subclass(es)"
|
|
1088 |
|
|
1089 |
^ self subclassResponsibility
|
|
1090 |
|
|
1091 |
"Created: / 08-08-2006 / 11:07:40 / fm"
|
|
1092 |
!
|
|
1093 |
|
|
1094 |
preUnloadAction
|
|
1095 |
"raise an error: must be redefined in concrete subclass(es)"
|
|
1096 |
|
|
1097 |
^ self subclassResponsibility
|
|
1098 |
|
|
1099 |
"Created: / 08-08-2006 / 11:07:40 / fm"
|
|
1100 |
!
|
|
1101 |
|
|
1102 |
prerequisiteProjects
|
|
1103 |
|
|
1104 |
^#()
|
|
1105 |
|
|
1106 |
"Created: / 08-08-2006 / 21:17:34 / fm"
|
|
1107 |
!
|
|
1108 |
|
|
1109 |
subProjects
|
|
1110 |
|
|
1111 |
^#()
|
|
1112 |
|
|
1113 |
"Created: / 08-08-2006 / 11:08:23 / fm"
|
|
1114 |
!
|
|
1115 |
|
|
1116 |
versionNumber
|
|
1117 |
"Returns a version string which will appear in nt.def and in the files info inside it's properties "
|
|
1118 |
|
|
1119 |
^''
|
|
1120 |
|
|
1121 |
"Created: / 08-08-2006 / 11:35:52 / fm"
|
|
1122 |
! !
|
|
1123 |
|
9516
|
1124 |
!ProjectDefinition class methodsFor:'project information'!
|
|
1125 |
|
|
1126 |
companyName
|
|
1127 |
^'eXept Software AG'
|
|
1128 |
!
|
|
1129 |
|
|
1130 |
fileDescription
|
|
1131 |
^self productName,' ', self packageName
|
|
1132 |
!
|
|
1133 |
|
|
1134 |
fileVersion
|
9517
|
1135 |
^self revision ? '0.1.1.1'
|
9516
|
1136 |
!
|
|
1137 |
|
|
1138 |
internalName
|
|
1139 |
^self packageName
|
|
1140 |
!
|
|
1141 |
|
|
1142 |
legalCopyright
|
|
1143 |
^'Copyright eXept Software AG 2006 (until payment)'
|
|
1144 |
!
|
|
1145 |
|
|
1146 |
productName
|
|
1147 |
^'Product Name'
|
|
1148 |
!
|
|
1149 |
|
|
1150 |
productVersion
|
|
1151 |
^'0.1.1.1'
|
|
1152 |
! !
|
|
1153 |
|
9493
|
1154 |
!ProjectDefinition class methodsFor:'public update description'!
|
|
1155 |
|
|
1156 |
compileDescriptionMethods
|
9514
|
1157 |
self forEachMethodsCodeToCompileDo:[:code :category |
|
|
1158 |
self theMetaclass
|
|
1159 |
compile: code
|
|
1160 |
classified: category.
|
|
1161 |
].
|
9493
|
1162 |
|
|
1163 |
"
|
|
1164 |
DapasXProject compileDescriptionMethods
|
|
1165 |
DapasX_Datenbasis compileDescriptionMethods
|
9495
|
1166 |
bosch_dapasx_interactiver_editor_Definition compileDescriptionMethods
|
9493
|
1167 |
"
|
|
1168 |
|
|
1169 |
"Created: / 09-08-2006 / 18:00:31 / fm"
|
9514
|
1170 |
"Modified: / 10-08-2006 / 16:37:57 / cg"
|
9517
|
1171 |
!
|
|
1172 |
|
|
1173 |
forEachFileNameAndGeneratorMethodDo:aTwoArgBlock
|
|
1174 |
|fileNamesAndSelectors|
|
|
1175 |
|
|
1176 |
fileNamesAndSelectors := #(
|
|
1177 |
#('Make.proto' #'generate_make_dot_proto')
|
|
1178 |
#('Make.spec' #'generate_make_dot_spec')
|
|
1179 |
#('libInit.cc' #'generate_libInit_dot_cc')
|
|
1180 |
#('bc.def' #'generate_bc_dot_def')
|
|
1181 |
#('nt.mak' #'generate_nt_dot_mak')
|
|
1182 |
#('nt.def' #'generate_nt_dot_def')
|
|
1183 |
#('abbrev.stc' #'generate_abbrev_dot_stc')
|
|
1184 |
) asOrderedCollection.
|
|
1185 |
|
|
1186 |
fileNamesAndSelectors
|
|
1187 |
add: (Array with: self packageName, '.rc'
|
|
1188 |
with: #'generate_packageName_dot_rc').
|
|
1189 |
fileNamesAndSelectors pairsDo:aTwoArgBlock
|
9493
|
1190 |
! !
|
|
1191 |
|
|
1192 |
!ProjectDefinition class methodsFor:'sanity checks'!
|
|
1193 |
|
|
1194 |
searchForInconsistencies
|
|
1195 |
self searchForNeverCompiledSuperclasses.
|
|
1196 |
|
|
1197 |
"
|
|
1198 |
self searchForInconsistencies
|
|
1199 |
DapasX_Datenbasis searchForInconsistencies
|
|
1200 |
"
|
|
1201 |
|
|
1202 |
"Created: / 09-08-2006 / 16:30:46 / fm"
|
|
1203 |
!
|
|
1204 |
|
|
1205 |
searchForNeverCompiledSuperclasses
|
9495
|
1206 |
self compiled_classesDo:[:includedClass |
|
9493
|
1207 |
includedClass allSuperclassesDo:[:eachSuperClass |
|
|
1208 |
eachSuperClass package == Project noProjectID ifTrue:[
|
|
1209 |
self inconsistency:'uncompiled superclass: ' , eachSuperClass name
|
|
1210 |
].
|
|
1211 |
]
|
|
1212 |
].
|
|
1213 |
|
|
1214 |
"
|
|
1215 |
self searchForNeverCompiledSuperclasses
|
|
1216 |
DapasX_Datenbasis searchForNeverCompiledSuperclasses
|
|
1217 |
"
|
|
1218 |
|
|
1219 |
"Created: / 09-08-2006 / 16:31:54 / fm"
|
|
1220 |
! !
|
|
1221 |
|
9514
|
1222 |
!ProjectDefinition class methodsFor:'testing'!
|
|
1223 |
|
|
1224 |
isProjectDefinition
|
|
1225 |
^ self ~~ ProjectDefinition
|
|
1226 |
|
|
1227 |
"Created: / 10-08-2006 / 16:24:02 / cg"
|
|
1228 |
! !
|
|
1229 |
|
9493
|
1230 |
!ProjectDefinition class methodsFor:'update description'!
|
|
1231 |
|
9495
|
1232 |
autoloadedClassNamesGeneratedCodeToCompile
|
|
1233 |
|classNamesCode|
|
|
1234 |
|
|
1235 |
classNamesCode := 'autoloaded_classNames', String lf, '"This method has been automatically generated"'.
|
|
1236 |
classNamesCode := classNamesCode, String lf, self autoloadedClassNamesGeneratedString.
|
|
1237 |
^classNamesCode
|
|
1238 |
|
|
1239 |
"
|
|
1240 |
DapasXProject autoloadedClassNamesGeneratedCodeToCompile
|
|
1241 |
DapasX_Datenbasis autoloadedClassNamesGeneratedCodeToCompile
|
|
1242 |
|
|
1243 |
"
|
|
1244 |
|
|
1245 |
"Created: / 08-08-2006 / 15:07:06 / fm"
|
|
1246 |
!
|
|
1247 |
|
|
1248 |
autoloadedClassNamesGeneratedString
|
|
1249 |
| |
|
|
1250 |
|
|
1251 |
^ String streamContents:[:s |
|
|
1252 |
s nextPutAll:'^#('.
|
|
1253 |
self searchForClassesWithProject do:[:eachClass |
|
|
1254 |
(eachClass wasAutoloaded or:[ eachClass isLoaded not ]) ifTrue:[
|
|
1255 |
(self compiled_classNames includes:eachClass name) ifFalse:[
|
|
1256 |
(self excluded_classNames includes:eachClass name) ifFalse:[
|
|
1257 |
s cr; nextPutAll:eachClass name asString storeString
|
|
1258 |
]
|
|
1259 |
]
|
|
1260 |
]
|
|
1261 |
].
|
|
1262 |
s cr; nextPutAll:')'
|
|
1263 |
].
|
|
1264 |
|
|
1265 |
"
|
|
1266 |
bosch_dapasx_interactiver_editor_Definition autoloadedClassNamesGeneratedString
|
|
1267 |
"
|
|
1268 |
|
|
1269 |
"Created: / 08-08-2006 / 15:00:17 / fm"
|
|
1270 |
"Modified: / 08-08-2006 / 19:24:34 / fm"
|
|
1271 |
!
|
|
1272 |
|
9493
|
1273 |
classNamesGeneratedCodeToCompile
|
|
1274 |
|classNamesCode|
|
|
1275 |
|
9495
|
1276 |
classNamesCode := 'compiled_classNames', String lf, '"This method has been automatically generated"'.
|
9493
|
1277 |
classNamesCode := classNamesCode, String lf, self classNamesGeneratedString.
|
|
1278 |
^classNamesCode
|
|
1279 |
|
|
1280 |
"
|
9495
|
1281 |
DapasXProject Datenbasis
|
|
1282 |
DapasX_Datenbasis Datenbasis
|
9493
|
1283 |
|
|
1284 |
"
|
|
1285 |
|
|
1286 |
"Created: / 08-08-2006 / 15:07:06 / fm"
|
|
1287 |
!
|
|
1288 |
|
|
1289 |
classNamesGeneratedString
|
9495
|
1290 |
| |
|
9493
|
1291 |
|
9495
|
1292 |
^ String streamContents:[:s |
|
|
1293 |
s nextPutAll:'^#('.
|
|
1294 |
self searchForClassesWithProject do:[:eachClass |
|
|
1295 |
(self autoloaded_classNames includes:eachClass name) ifFalse:[
|
|
1296 |
(self excluded_classNames includes:eachClass name) ifFalse:[
|
|
1297 |
s cr; nextPutAll:eachClass name asString storeString
|
|
1298 |
]
|
|
1299 |
]
|
|
1300 |
].
|
|
1301 |
s cr; nextPutAll:')'
|
|
1302 |
].
|
9493
|
1303 |
|
|
1304 |
"
|
9495
|
1305 |
bosch_dapasx_interactiver_editor_Definition classNamesGeneratedString
|
9493
|
1306 |
"
|
|
1307 |
|
|
1308 |
"Created: / 08-08-2006 / 15:00:17 / fm"
|
|
1309 |
"Modified: / 08-08-2006 / 19:24:34 / fm"
|
|
1310 |
!
|
|
1311 |
|
|
1312 |
extensionMethodNamesGeneratedCodeToCompile
|
|
1313 |
|extensionMethodNamesCode|
|
|
1314 |
|
|
1315 |
extensionMethodNamesCode := 'extensionMethodNames', String lf, '"This method has been automatically generated"'.
|
|
1316 |
extensionMethodNamesCode := extensionMethodNamesCode, String lf, self extensionMethodNamesGeneratedString.
|
|
1317 |
^extensionMethodNamesCode
|
|
1318 |
|
|
1319 |
"
|
|
1320 |
DapasXProject extensionMethodNamesGeneratedCodeToCompile
|
|
1321 |
DapasX_Datenbasis extensionMethodNamesGeneratedCodeToCompile
|
|
1322 |
|
|
1323 |
"
|
|
1324 |
|
|
1325 |
"Created: / 08-08-2006 / 18:54:42 / fm"
|
|
1326 |
!
|
|
1327 |
|
|
1328 |
extensionMethodNamesGeneratedString
|
|
1329 |
|generatedString |
|
|
1330 |
|
|
1331 |
generatedString := self searchForExtensionsWithProject
|
|
1332 |
inject: '^#('
|
|
1333 |
into:[:string :each |
|
|
1334 |
string, String lf, each mclass name asString storeString, ' #', each name ].
|
|
1335 |
^generatedString, String lf, ')'
|
|
1336 |
|
|
1337 |
"
|
|
1338 |
self extensionMethodNamesGeneratedString
|
|
1339 |
"
|
|
1340 |
|
|
1341 |
"Created: / 08-08-2006 / 18:55:04 / fm"
|
|
1342 |
!
|
|
1343 |
|
9514
|
1344 |
forEachMethodsCodeToCompileDo:aTwoArgBlock
|
|
1345 |
aTwoArgBlock
|
|
1346 |
value:self autoloadedClassNamesGeneratedCodeToCompile
|
|
1347 |
value:'project description'.
|
|
1348 |
|
|
1349 |
aTwoArgBlock
|
|
1350 |
value: self classNamesGeneratedCodeToCompile
|
|
1351 |
value: 'project description'.
|
|
1352 |
|
|
1353 |
(self theMetaclass includesSelector:#excluded_classNames) ifFalse:[
|
|
1354 |
aTwoArgBlock
|
|
1355 |
value: 'excluded_classNames\^ #()' withCRs
|
|
1356 |
value: 'project description'.
|
|
1357 |
].
|
|
1358 |
|
|
1359 |
aTwoArgBlock
|
|
1360 |
value: self extensionMethodNamesGeneratedCodeToCompile
|
|
1361 |
value: 'project description'.
|
|
1362 |
|
|
1363 |
"/ aTwoArgBlock
|
|
1364 |
"/ value: 'description ^''bla bla'''
|
|
1365 |
"/ value: 'project description'
|
|
1366 |
|
|
1367 |
"Created: / 10-08-2006 / 16:35:47 / cg"
|
|
1368 |
!
|
|
1369 |
|
9493
|
1370 |
inconsistency:message
|
|
1371 |
Dialog warn:message
|
|
1372 |
|
|
1373 |
"
|
|
1374 |
self searchForNeverCompiledSuperclasses
|
|
1375 |
DapasX_Datenbasis searchForNeverCompiledSuperclasses
|
|
1376 |
"
|
|
1377 |
|
|
1378 |
"Created: / 09-08-2006 / 16:32:31 / fm"
|
|
1379 |
!
|
|
1380 |
|
|
1381 |
searchForClassesNamesWithProject
|
|
1382 |
|
|
1383 |
^self searchForClassesWithProject collect:[:each | each name].
|
|
1384 |
|
|
1385 |
"
|
|
1386 |
self searchForClassesNamesWithProject
|
|
1387 |
"
|
|
1388 |
|
|
1389 |
"Created: / 07-08-2006 / 21:37:06 / fm"
|
|
1390 |
!
|
|
1391 |
|
|
1392 |
searchForClassesWithProject
|
|
1393 |
|
|
1394 |
^ Smalltalk allClasses select:[:cls | cls package == self package].
|
|
1395 |
|
|
1396 |
"
|
|
1397 |
self searchForClassesWithProject
|
|
1398 |
"
|
|
1399 |
|
|
1400 |
"Created: / 07-08-2006 / 20:42:39 / fm"
|
|
1401 |
"Modified: / 07-08-2006 / 21:56:25 / fm"
|
|
1402 |
!
|
|
1403 |
|
|
1404 |
searchForExtensionsForProject:aProjectID
|
|
1405 |
|methods|
|
|
1406 |
|
|
1407 |
methods := IdentitySet new.
|
|
1408 |
Smalltalk allClassesDo:[:eachClass |
|
|
1409 |
|classPackage|
|
|
1410 |
|
|
1411 |
classPackage := eachClass package.
|
|
1412 |
eachClass instAndClassMethodsDo:[:mthd |
|
|
1413 |
mthd package ~= classPackage ifTrue:[
|
|
1414 |
mthd package == aProjectID ifTrue:[
|
|
1415 |
methods add:mthd
|
|
1416 |
]
|
|
1417 |
].
|
|
1418 |
].
|
|
1419 |
].
|
|
1420 |
^ methods
|
|
1421 |
"
|
|
1422 |
self searchForExtensionsForProject:#'bosch:dapasx'
|
|
1423 |
"
|
|
1424 |
|
|
1425 |
"Created: / 07-08-2006 / 22:03:55 / fm"
|
|
1426 |
!
|
|
1427 |
|
|
1428 |
searchForExtensionsWithProject
|
|
1429 |
^ self searchForExtensionsForProject:self package
|
|
1430 |
|
|
1431 |
"
|
|
1432 |
self searchForExtensionsWithProject
|
|
1433 |
DapasXProject searchForExtensionsWithProject
|
|
1434 |
DapasX_Datenbasis searchForExtensionsWithProject
|
|
1435 |
|
|
1436 |
"
|
|
1437 |
|
|
1438 |
"Created: / 07-08-2006 / 21:03:10 / fm"
|
|
1439 |
"Modified: / 09-08-2006 / 13:01:26 / fm"
|
|
1440 |
!
|
|
1441 |
|
|
1442 |
searchForProjectsWhichProvideHeaderFiles
|
|
1443 |
|myPackageID requiredPackages|
|
|
1444 |
|
|
1445 |
requiredPackages := Set new.
|
|
1446 |
myPackageID := self package.
|
|
1447 |
|
9495
|
1448 |
self compiled_classesDo:[:includedClass |
|
9493
|
1449 |
includedClass allSuperclassesDo:[:eachSuperClass |
|
|
1450 |
((eachSuperClass package ~= myPackageID)
|
|
1451 |
and:[ (self moduleOfClass: eachSuperClass) ~= 'stx' ])
|
|
1452 |
ifTrue:[
|
|
1453 |
eachSuperClass package == Project noProjectID ifFalse:[
|
|
1454 |
requiredPackages add:(eachSuperClass package).
|
|
1455 |
]
|
|
1456 |
]
|
|
1457 |
]
|
|
1458 |
].
|
|
1459 |
^ requiredPackages
|
|
1460 |
|
|
1461 |
"
|
|
1462 |
self searchForProjectsWhichProvideHeaderFiles
|
|
1463 |
DapasX_Datenbasis searchForProjectsWhichProvideHeaderFiles
|
|
1464 |
"
|
|
1465 |
|
|
1466 |
"Created: / 09-08-2006 / 16:26:37 / fm"
|
|
1467 |
! !
|
|
1468 |
|
|
1469 |
!ProjectDefinition class methodsFor:'xxx'!
|
|
1470 |
|
|
1471 |
try
|
|
1472 |
^ 'hhh' , '989898'
|
|
1473 |
|
|
1474 |
"Created: / 09-08-2006 / 16:50:52 / fm"
|
|
1475 |
!
|
|
1476 |
|
|
1477 |
try2
|
|
1478 |
^ 1 + 2
|
|
1479 |
|
|
1480 |
"Created: / 09-08-2006 / 16:53:16 / fm"
|
|
1481 |
! !
|
|
1482 |
|
|
1483 |
!ProjectDefinition methodsFor:'others'!
|
|
1484 |
|
|
1485 |
classNames
|
|
1486 |
"This method has been automatically generated"
|
|
1487 |
^OrderedCollection new
|
|
1488 |
add: #'DAPASX::IStreamHierarchyObject'
|
|
1489 |
add: #'DAPASX::ProjCFHierarchyObject'
|
|
1490 |
add: #'DAPASX::IStorage'
|
|
1491 |
add: #'DAPASX::OLECompoundFile'
|
|
1492 |
add: #'DAPASX::DapasDBIStreamHierarchyObject'
|
|
1493 |
add: #'DAPASX::OLEStorageElementInterface'
|
|
1494 |
add: #'DAPASX::CompoundFileHierarchyObject'
|
|
1495 |
add: #ProjectDefinition
|
|
1496 |
yourself
|
|
1497 |
|
|
1498 |
"Created: / 08-08-2006 / 15:22:59 / fm"
|
|
1499 |
! !
|
|
1500 |
|
|
1501 |
!ProjectDefinition class methodsFor:'documentation'!
|
|
1502 |
|
|
1503 |
version
|
9517
|
1504 |
^ '$Header: /cvs/stx/stx/libbasic/LibraryDefinition.st,v 1.11 2006-08-10 15:59:48 fm Exp $'
|
9516
|
1505 |
|
9493
|
1506 |
! !
|