author | fm |
Wed, 16 Aug 2006 17:37:54 +0200 | |
changeset 9540 | bd35339a8a02 |
parent 9538 | 63ff3d3040dd |
child 9543 | b4f82498926b |
permissions | -rw-r--r-- |
9526
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
1 |
" |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
2 |
COPYRIGHT (c) 2006 by eXept Software AG |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
3 |
All Rights Reserved |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
4 |
|
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
5 |
This software is furnished under a license and may be used |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
6 |
only in accordance with the terms of that license and with the |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
7 |
inclusion of the above copyright notice. This software may not |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
8 |
be provided or otherwise made available to, or used by, any |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
9 |
other person. No title to or ownership of the software is |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
10 |
hereby transferred. |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
11 |
" |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
12 |
|
9493 | 13 |
"{ Package: 'stx:libbasic3' }" |
14 |
||
9538 | 15 |
BuildDefinition subclass:#ProjectDefinition |
9533 | 16 |
instanceVariableNames:'' |
17 |
classVariableNames:'' |
|
18 |
poolDictionaries:'' |
|
19 |
category:'System-Support-Projects' |
|
9493 | 20 |
! |
21 |
||
9526
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
22 |
!ProjectDefinition class methodsFor:'documentation'! |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
23 |
|
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
24 |
copyright |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
25 |
" |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
26 |
COPYRIGHT (c) 2006 by eXept Software AG |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
27 |
All Rights Reserved |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
28 |
|
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
29 |
This software is furnished under a license and may be used |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
30 |
only in accordance with the terms of that license and with the |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
31 |
inclusion of the above copyright notice. This software may not |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
32 |
be provided or otherwise made available to, or used by, any |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
33 |
other person. No title to or ownership of the software is |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
34 |
hereby transferred. |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
35 |
" |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
36 |
! ! |
9493 | 37 |
|
38 |
!ProjectDefinition class methodsFor:'instance creation'! |
|
39 |
||
40 |
definitionClassForPackage:aPackageID |
|
9529 | 41 |
^ self definitionClassForPackage:aPackageID createIfAbsent:false |
9493 | 42 |
|
9529 | 43 |
"Modified: / 11-08-2006 / 14:29:21 / cg" |
44 |
! |
|
45 |
||
46 |
definitionClassForPackage:aPackageID createIfAbsent:doCreateIfAbsent |
|
47 |
|class| |
|
9493 | 48 |
|
9529 | 49 |
class := Smalltalk at:(aPackageID asString copy replaceAny:':/' with:$_) asSymbol. |
50 |
class isNil ifTrue:[ |
|
51 |
doCreateIfAbsent ifTrue:[ |
|
52 |
^ self newForPackage:aPackageID |
|
53 |
] |
|
54 |
]. |
|
55 |
^ class. |
|
9493 | 56 |
|
9529 | 57 |
"Created: / 11-08-2006 / 14:28:51 / cg" |
58 |
! |
|
59 |
||
60 |
newForPackage:packageID |
|
61 |
^ self |
|
62 |
newNamed:(self initialClassNameForDefinitionOf:packageID) |
|
63 |
package:packageID. |
|
64 |
||
65 |
"Created: / 11-08-2006 / 14:27:19 / cg" |
|
9493 | 66 |
! |
67 |
||
68 |
newNamed:newName package:packageID |
|
69 |
|newClass| |
|
70 |
||
9529 | 71 |
"/ for now, we are strict. |
72 |
self assert:(self initialClassNameForDefinitionOf:packageID) = newName. |
|
9493 | 73 |
newClass := self |
74 |
subclass:(newName asSymbol) |
|
75 |
instanceVariableNames:'' |
|
76 |
classVariableNames:'' |
|
77 |
poolDictionaries:'' |
|
9529 | 78 |
category:(self defaultCategory). |
9493 | 79 |
|
80 |
newClass package:packageID asSymbol. |
|
81 |
^ newClass |
|
82 |
||
83 |
"Created: / 09-08-2006 / 17:57:37 / fm" |
|
84 |
"Modified: / 09-08-2006 / 19:27:53 / fm" |
|
9529 | 85 |
"Modified: / 11-08-2006 / 14:18:01 / cg" |
9493 | 86 |
! ! |
87 |
||
9534 | 88 |
!ProjectDefinition class methodsFor:'defaults'! |
9533 | 89 |
|
9534 | 90 |
defaultDescription |
91 |
^ 'a classLibrary' |
|
9493 | 92 |
! ! |
93 |
||
94 |
!ProjectDefinition class methodsFor:'file generation'! |
|
95 |
||
9534 | 96 |
fileNamesToGenerate |
97 |
^ #( |
|
98 |
#('Make.proto' #'generate_make_dot_proto') |
|
99 |
#('Make.spec' #'generate_make_dot_spec') |
|
100 |
#('libInit.cc' #'generate_libInit_dot_cc') |
|
101 |
#('bc.def' #'generate_bc_dot_def') |
|
102 |
#('nt.mak' #'generate_nt_dot_mak') |
|
103 |
#('nt.def' #'generate_nt_dot_def') |
|
104 |
#('abbrev.stc' #'generate_abbrev_dot_stc') |
|
105 |
) |
|
9493 | 106 |
! ! |
107 |
||
108 |
!ProjectDefinition class methodsFor:'file templates'! |
|
109 |
||
110 |
bc_dot_def |
|
111 |
||
112 |
^ |
|
113 |
'LIBRARY %(LIBRARY_NAME) |
|
114 |
DESCRIPTION %(DESCRIPTION) |
|
115 |
CODE PRELOAD MOVEABLE DISCARDABLE |
|
116 |
SEGMENTS |
|
117 |
INITCODE PRELOAD DISCARDABLE |
|
118 |
EXPORTS |
|
9530 | 119 |
__%(C_LIBRARY_NAME)_Init @1 |
9504 | 120 |
' |
9493 | 121 |
|
122 |
"Created: / 08-08-2006 / 12:26:58 / fm" |
|
123 |
"Modified: / 08-08-2006 / 19:32:27 / fm" |
|
124 |
! |
|
125 |
||
126 |
classLine_libInit_dot_cc |
|
127 |
||
128 |
^'_%(CLASS)_Init(pass,__pRT__,snd);' |
|
129 |
||
130 |
"Created: / 08-08-2006 / 12:51:44 / fm" |
|
131 |
"Modified: / 08-08-2006 / 15:46:05 / fm" |
|
132 |
! |
|
133 |
||
134 |
extensionLine_libInit_dot_cc |
|
135 |
||
136 |
^'_%(LIBRARY_NAME)_extensions_Init(pass,__pRT__,snd);' |
|
137 |
||
138 |
"Created: / 08-08-2006 / 15:48:56 / fm" |
|
139 |
"Modified: / 08-08-2006 / 19:32:33 / fm" |
|
140 |
! |
|
141 |
||
142 |
libInit_dot_cc |
|
143 |
||
144 |
^ |
|
145 |
'/* |
|
146 |
* DO NOT EDIT |
|
147 |
* automagically generated from Make.proto (by make libInit.cc) |
|
148 |
*/ |
|
149 |
#define __INDIRECTVMINITCALLS__ |
|
150 |
#include <stc.h> |
|
151 |
#define INIT_TEXT_SECT /* as nothing */ |
|
152 |
#ifdef WIN32 |
|
153 |
# pragma codeseg INITCODE "INITCODE" |
|
154 |
#else /* not WIN32 */ |
|
155 |
# if defined(__GNUC__) && !!defined(NO_SECTION_ATTRIBUTES) |
|
156 |
# if (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) || __GNUC__ > 2 |
|
157 |
# undef INIT_TEXT_SECT |
|
158 |
# define INIT_TEXT_SECT __attribute__((section(".stxitext"))) |
|
159 |
# endif |
|
160 |
# endif /* not GNUC */ |
|
161 |
#endif /* not WIN32 */ |
|
162 |
#ifdef INIT_TEXT_SECT |
|
163 |
extern void _%(LIBRARY_NAME)_Init() INIT_TEXT_SECT; |
|
164 |
#endif |
|
165 |
void _%(LIBRARY_NAME)_Init(pass, __pRT__, snd) |
|
166 |
OBJ snd; struct __vmData__ *__pRT__; { |
|
167 |
__BEGIN_PACKAGE2__("%(LIBRARY_NAME)", _%(LIBRARY_NAME)_Init, "%(PACKAGE)"); |
|
168 |
%(CLASSES) |
|
169 |
%(EXTENSION) |
|
170 |
__END_PACKAGE__(); |
|
171 |
}' |
|
172 |
||
173 |
"Created: / 08-08-2006 / 12:40:45 / fm" |
|
174 |
"Modified: / 08-08-2006 / 19:33:01 / fm" |
|
175 |
! |
|
176 |
||
177 |
make_dot_proto |
|
178 |
||
179 |
^ |
|
180 |
'# |
|
181 |
# Warning: once you modify this file, do not rerun |
|
182 |
# stmkmp again - otherwise, your changes are lost. |
|
183 |
# |
|
184 |
# The Makefile as generated by this Make.proto supports the following targets: |
|
185 |
# make - compile all st-files to a classLib |
|
186 |
# make install - install the classLib in /opt/smalltalk/... |
|
187 |
# make clean - clean all temp files |
|
188 |
# make clobber - clean all |
|
189 |
||
190 |
# |
|
191 |
# position (of this package) in directory hierarchy: |
|
192 |
# (must point to ST/X top directory, for tools and includes) |
|
193 |
TOP=%(TOP) |
|
194 |
||
195 |
||
196 |
# subdirectories where targets are to be made: |
|
197 |
SUBDIRS=%(SUBDIRECTORIES) |
|
198 |
||
199 |
||
200 |
# subdirectories where Makefiles are to be made: |
|
201 |
# (only define if different from SUBDIRS) |
|
202 |
# ALLSUBDIRS= |
|
203 |
||
204 |
||
205 |
# if your embedded C code requires any system includes, |
|
206 |
# add the path(es) here:, |
|
207 |
# ********** OPTIONAL: MODIFY the next lines *** |
|
208 |
# LOCALINCLUDES=-Ifoo -Ibar |
|
209 |
LOCALINCLUDES=%(LOCAL_INCLUDES) |
|
210 |
||
211 |
||
212 |
# if you need any additional defines for embedded C code, |
|
213 |
# add them here:, |
|
214 |
# ********** OPTIONAL: MODIFY the next lines *** |
|
215 |
# LOCALDEFINES=-Dfoo -Dbar -DDEBUG |
|
216 |
LOCALDEFINES=%(LOCAL_DEFINES) |
|
217 |
||
218 |
||
219 |
# |
|
220 |
# The next 2 defines should be left as-is |
|
221 |
# for a class-library package, you can uncomment the following: |
|
222 |
# (it does not hurt much, if you leave it as is - but you may NOT |
|
223 |
# uncomment it if object files are to be loaded individually later). |
|
224 |
# INITCODESEPFLAG=$(SEPINITCODE) |
|
225 |
# |
|
226 |
# the following MAY ONLY be uncommented for classes/classLibs, |
|
227 |
# which are ALWAYS statically included in the executable. |
|
228 |
# (i.e. NEVER for those which are subject to dynamic loading). |
|
229 |
# COMMONSYMFLAG=$(COMMONSYMBOLS) |
|
230 |
# |
|
231 |
STCLOCALOPT=-I. $(LOCALINCLUDES) $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES) -H. ''-P$(PACKAGE)'' ''-Z$(LIBNAME)'' $(COMMONSYMFLAG) $(INITCODESEPFLAG) |
|
232 |
||
233 |
||
234 |
# ********** OPTIONAL: MODIFY the next line *** |
|
235 |
# additional C-libraries that should be pre-linked with the class-objects |
|
236 |
LD_OBJ_LIBS= |
|
237 |
||
238 |
||
239 |
# ********** OPTIONAL: MODIFY the next line *** |
|
240 |
# additional C targets or libraries should be added below |
|
241 |
LOCAL_EXTRA_TARGETS= |
|
242 |
||
243 |
all:: preMake classLibRule postMake |
|
244 |
||
245 |
||
246 |
# add more install actions here |
|
247 |
install:: |
|
248 |
||
249 |
# add more install actions for aux-files (resources) here |
|
250 |
installAux:: |
|
251 |
||
252 |
# add more preMake actions here |
|
253 |
preMake:: |
|
254 |
||
255 |
# add more postMake actions here |
|
256 |
postMake:: cleanjunk |
|
257 |
||
258 |
cleanjunk:: |
|
259 |
||
260 |
clean:: |
|
261 |
-rm -f *.o *.H |
|
262 |
||
263 |
clobber:: |
|
264 |
-rm -f *.so *.dll |
|
265 |
||
266 |
', |
|
267 |
" |
|
268 |
$(INSTALLBASE):: |
|
269 |
@test -d $@ || mkdir $@ |
|
270 |
||
271 |
$(INSTALLBASE)/packages:: $(INSTALLBASE) |
|
272 |
@test -d $@ || mkdir $@ |
|
273 |
||
274 |
$(INSTALLBASE)/packages/$(MODULE):: $(INSTALLBASE)/packages |
|
275 |
@test -d $@ || mkdir $@ |
|
276 |
||
277 |
$(INSTALLBASE)/packages/$(MODULE)/dapasx:: $(INSTALLBASE)/packages/$(MODULE) |
|
278 |
@test -d $@ || mkdir $@ |
|
279 |
||
280 |
$(INSTALLBASE)/packages/$(MODULE)/dapasx/interactiver_editor:: $(INSTALLBASE)/packages/$(MODULE)/dapasx |
|
281 |
@test -d $@ || mkdir $@ |
|
282 |
||
283 |
$(INSTALLBASE)/packages/$(MODULE)/$(MODULE_DIR):: $(INSTALLBASE)/packages/$(MODULE) |
|
284 |
@test -d $@ || mkdir $@ |
|
285 |
" |
|
286 |
' |
|
287 |
# if other things are to be compiled, |
|
288 |
# add target definitions here, |
|
289 |
# and list them in LOCAL_EXTRA_TARGETS above. |
|
290 |
# (care for make syntax - TABS are required in the actions) |
|
291 |
# foo: foo.o |
|
292 |
# $(CC) -o foo foo.o |
|
293 |
||
294 |
# ''make depend'' will add dependency info between |
|
295 |
# BEGIN...END below |
|
296 |
# |
|
297 |
# BEGINMAKEDEPEND --- do not remove this line; make depend needs it |
|
298 |
# ENDMAKEDEPEND --- do not remove this line |
|
299 |
||
300 |
' |
|
301 |
||
302 |
"Created: / 08-08-2006 / 20:45:36 / fm" |
|
303 |
"Modified: / 09-08-2006 / 16:50:23 / fm" |
|
304 |
! |
|
305 |
||
306 |
make_dot_spec |
|
307 |
||
308 |
^ |
|
309 |
'# |
|
310 |
# This file contains specifications which are common to all platforms. |
|
311 |
# |
|
312 |
# Warning: once you modify this file, do not rerun |
|
313 |
# stmkmp again - otherwise, your changes are lost. |
|
314 |
# |
|
315 |
# This file contains definitions for Unix based platforms. |
|
316 |
# |
|
317 |
||
318 |
||
319 |
||
320 |
||
321 |
# module and directory-in-module; |
|
322 |
# these should correspond to the directory hierarchy |
|
323 |
# location (otherwise, ST/X will have a hard time to |
|
324 |
# find out the packages location from its packageID) |
|
325 |
MODULE=%(MODULE) |
|
326 |
MODULE_DIR=%(MODULE_DIRECTORY) |
|
327 |
||
328 |
||
329 |
# the name of your classLibrary: |
|
330 |
# ********** REQUIRED: CHECK the next line *** |
|
331 |
LIBNAME=%(LIBRARY_NAME) |
|
332 |
||
333 |
||
334 |
# the package is stored as an ID in classes and methods |
|
335 |
# to identify code belonging to this project. |
|
336 |
# It also specifies the position in the source repository |
|
337 |
# and directory tree, when packages are loaded by packageID. |
|
338 |
# ********** REQUIRED: CHECK the next line *** |
|
339 |
PACKAGE=$(MODULE):$(MODULE_DIR) |
|
340 |
||
341 |
||
342 |
# Argument(s) to the stc compiler. |
|
343 |
# -H. : create header files locally |
|
344 |
# (if removed, they will be created as common |
|
345 |
# -Pxxx : defines the package |
|
346 |
# -Zxxx : a prefix for variables within the classLib |
|
347 |
# -Dxxx : defines passed to to CC for inline C-code |
|
348 |
# -Ixxx : include path passed to CC for inline C-code |
|
349 |
# +optspace : optimized for space |
|
350 |
# +optspace2 : optimized more for space |
|
351 |
# +optspace3 : optimized even more for space |
|
352 |
# +optinline : generate inline code for some ST constructs |
|
353 |
# +inlineNew : additionally inline new |
|
354 |
# +inlineMath : additionally inline some floatPnt math stuff |
|
355 |
# |
|
356 |
# ********** OPTIONAL: MODIFY the next line(s) *** |
|
357 |
# STCLOCALOPTIMIZATIONS=+optinline +inlineNew |
|
358 |
# STCLOCALOPTIMIZATIONS=+optspace3 |
|
359 |
STCLOCALOPTIMIZATIONS=+optspace3 |
|
360 |
||
361 |
||
362 |
# Argument(s) to the stc compiler. |
|
363 |
# -warn : no warnings |
|
364 |
# -warnNonStandard : no warnings about ST/X extensions |
|
365 |
# -warnEOLComments : no warnings about EOL comment extension |
|
366 |
# -warnPrivacy : no warnings about privateClass extension |
|
367 |
# |
|
368 |
# ********** OPTIONAL: MODIFY the next line(s) *** |
|
369 |
# STCWARNINGS=-warn |
|
370 |
# STCWARNINGS=-warnNonStandard |
|
371 |
# STCWARNINGS=-warnEOLComments |
|
372 |
STCWARNINGS= |
|
373 |
||
374 |
OBJS= \ |
|
375 |
%(OBJECTS) |
|
376 |
' |
|
377 |
||
378 |
"Created: / 08-08-2006 / 19:31:29 / fm" |
|
379 |
"Modified: / 09-08-2006 / 15:10:57 / fm" |
|
380 |
! |
|
381 |
||
382 |
nt_dot_def |
|
383 |
||
384 |
^ |
|
385 |
'LIBRARY %(LIBRARY_NAME) |
|
386 |
DESCRIPTION %(DESCRIPTION) |
|
387 |
VERSION %(VERSION_NUMBER) |
|
388 |
CODE EXECUTE READ |
|
389 |
DATA READ WRITE |
|
390 |
SECTIONS |
|
391 |
INITCODE READ EXECUTE |
|
392 |
INITDATA READ WRITE |
|
393 |
EXPORTS |
|
394 |
_%(LIBRARY_NAME)_Init @1 |
|
395 |
IMPORTS' |
|
396 |
||
397 |
"Modified: / 08-08-2006 / 19:33:14 / fm" |
|
398 |
! |
|
399 |
||
400 |
nt_dot_mak |
|
401 |
||
402 |
^ |
|
403 |
'# |
|
404 |
# This file contains make rules for the win32 platform (using borland-bcc). |
|
405 |
# |
|
406 |
# Warning: once you modify this file, do not rerun |
|
407 |
# stmkmp again - otherwise, your changes are lost. |
|
408 |
# |
|
409 |
TOP=%(TOP) |
|
410 |
||
411 |
!!INCLUDE $(TOP)\rules\stdHeader_nt |
|
412 |
||
413 |
!!INCLUDE Make.spec |
|
414 |
||
415 |
LOCALINCLUDES=%(LOCAL_INCLUDES) |
|
416 |
||
417 |
STCLOCALOPT=-I. $(LOCALINCLUDES) -H. $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES) ''-P$(PACKAGE)'' ''-Z$(LIBNAME)'' $(COMMONSYMFLAG) $(INITCODESEPFLAG) |
|
418 |
||
419 |
ALL:: $(LIBJPEG) $(LIBDIR)\$(LIBNAME).lib $(BINDIR)\$(LIBNAME).dll |
|
420 |
||
421 |
!!INCLUDE $(TOP)\rules\stdRules_nt |
|
422 |
||
423 |
# BEGINMAKEDEPEND --- do not remove this line; make depend needs it |
|
424 |
# ENDMAKEDEPEND --- do not remove this line |
|
425 |
' |
|
426 |
||
427 |
"Created: / 09-08-2006 / 11:44:20 / fm" |
|
428 |
"Modified: / 09-08-2006 / 19:59:32 / fm" |
|
429 |
! |
|
430 |
||
431 |
objectLine_make_dot_spec |
|
432 |
||
433 |
^' %(CLASS).$(O) \' |
|
434 |
||
435 |
"Created: / 08-08-2006 / 20:16:46 / fm" |
|
436 |
! ! |
|
437 |
||
438 |
!ProjectDefinition class methodsFor:'mappings'! |
|
439 |
||
440 |
bc_dot_def_mappings |
|
9534 | 441 |
^ (super bc_dot_def_mappings) |
9504 | 442 |
at:#'LIBRARY_NAME' put:[ self libraryName ]; |
9530 | 443 |
at:#'C_LIBRARY_NAME' put:[ self st2c:self libraryName ]; |
9504 | 444 |
yourself |
9493 | 445 |
|
446 |
"Created: / 09-08-2006 / 11:17:59 / fm" |
|
447 |
! |
|
448 |
||
449 |
classLine_libInit_dot_cc_mappings: aClassName |
|
450 |
||
451 |
^Dictionary new |
|
9530 | 452 |
at: #'CLASS' put: [self st2c:aClassName]; |
9493 | 453 |
yourself |
454 |
||
455 |
"Created: / 08-08-2006 / 14:04:00 / fm" |
|
456 |
"Modified: / 09-08-2006 / 18:27:07 / fm" |
|
457 |
! |
|
458 |
||
459 |
extensionLine_libInit_dot_cc_mappings |
|
460 |
||
461 |
^Dictionary new |
|
462 |
at: #'LIBRARY_NAME' put: [self libraryName]; |
|
463 |
yourself |
|
464 |
||
465 |
"Created: / 09-08-2006 / 11:19:59 / fm" |
|
466 |
! |
|
467 |
||
468 |
libInit_dot_cc_mappings |
|
469 |
||
470 |
^Dictionary new |
|
9530 | 471 |
at: #'LIBRARY_NAME' put: [self st2c:self libraryName]; |
9493 | 472 |
at: #'PACKAGE' put: [self package]; |
473 |
at: #'CLASSES' put: [self generateClassLines_libInit_dot_cc]; |
|
474 |
at: #'EXTENSION' put: [self generateExtensionLine_libInit_dot_cc]; |
|
475 |
||
476 |
yourself |
|
477 |
||
478 |
"Created: / 09-08-2006 / 11:20:24 / fm" |
|
479 |
! |
|
480 |
||
481 |
make_dot_proto_mappings |
|
482 |
||
483 |
^Dictionary new |
|
9503 | 484 |
at: #'TOP' put: [self unixPathToTop]; |
9493 | 485 |
at: #'SUBDIRECTORIES' put: [self generateSubDirectories]; |
9503 | 486 |
at: #'LOCAL_INCLUDES' put: [self generateUnixLocalIncludes]; |
9493 | 487 |
at: #'LOCAL_DEFINES' put: ['']; |
488 |
yourself |
|
489 |
||
490 |
"Created: / 09-08-2006 / 11:20:45 / fm" |
|
491 |
"Modified: / 09-08-2006 / 16:44:48 / fm" |
|
492 |
! |
|
493 |
||
494 |
make_dot_spec_mappings |
|
495 |
||
496 |
^Dictionary new |
|
497 |
at: #'MODULE' put: [self module]; |
|
498 |
at: #'MODULE_DIRECTORY' put: [self moduleDirectory]; |
|
499 |
at: #'LIBRARY_NAME' put: [self libraryName]; |
|
500 |
at: #'OBJECTS' put: [self generateObjects_make_dot_spec]; |
|
501 |
yourself |
|
502 |
||
503 |
"Created: / 09-08-2006 / 11:21:06 / fm" |
|
504 |
! |
|
505 |
||
506 |
nt_dot_def_mappings |
|
507 |
||
508 |
^Dictionary new |
|
509 |
at: #'LIBRARY_NAME' put: [self libraryName]; |
|
9504 | 510 |
at: #'DESCRIPTION' put: [self description storeString]; |
9493 | 511 |
at: #'VERSION_NUMBER' put: [self versionNumber]; |
512 |
yourself |
|
513 |
||
514 |
"Created: / 09-08-2006 / 11:21:21 / fm" |
|
515 |
! |
|
516 |
||
517 |
nt_dot_mak_mappings |
|
518 |
||
519 |
^Dictionary new |
|
9503 | 520 |
at: #'TOP' put: [self msdosPathToTop]; |
521 |
at: #'LOCAL_INCLUDES' put: [self generateMsdosLocalIncludes]; |
|
9493 | 522 |
yourself |
523 |
||
524 |
"Created: / 09-08-2006 / 11:44:36 / fm" |
|
525 |
"Modified: / 09-08-2006 / 20:00:01 / fm" |
|
526 |
! |
|
527 |
||
528 |
objectLine_make_dot_spec_mappings: aClassName |
|
529 |
||
530 |
^Dictionary new |
|
9503 | 531 |
at: #'CLASS' put: [(Smalltalk classNamed:aClassName) classFilename asFilename withoutSuffix baseName]; |
9493 | 532 |
yourself |
533 |
||
534 |
"Created: / 08-08-2006 / 20:17:28 / fm" |
|
535 |
"Modified: / 09-08-2006 / 18:26:52 / fm" |
|
536 |
! |
|
537 |
||
9530 | 538 |
st2c:aString |
539 |
^ (aString asString |
|
540 |
copyReplaceString:'_' withString:('_',($_ codePoint printStringRadix:8))) |
|
541 |
replaceAny:':' with:$_ |
|
9493 | 542 |
! ! |
543 |
||
544 |
!ProjectDefinition class methodsFor:'mappings support'! |
|
545 |
||
546 |
generateClassLines_libInit_dot_cc |
|
547 |
||
9495 | 548 |
^self compiled_classNames |
9493 | 549 |
inject: '' |
550 |
into:[:classLines :className | |
|
551 |
|newClassLine mappings| |
|
552 |
mappings := self classLine_libInit_dot_cc_mappings: className. |
|
553 |
newClassLine := self replaceMappings: mappings |
|
554 |
in: self classLine_libInit_dot_cc. |
|
555 |
classLines concatenate: newClassLine |
|
556 |
and: String lf |
|
557 |
] |
|
558 |
||
559 |
" |
|
560 |
DapasXProject generateClassLines_libInit_dot_cc |
|
9530 | 561 |
bosch_dapasx_datenbasis_Definition generateClassLines_libInit_dot_cc |
9493 | 562 |
|
563 |
" |
|
564 |
||
565 |
"Created: / 09-08-2006 / 11:21:48 / fm" |
|
566 |
! |
|
567 |
||
568 |
generateExtensionLine_libInit_dot_cc |
|
569 |
|mappings| |
|
570 |
^self extensionMethodNames isEmpty |
|
571 |
ifTrue:[''] |
|
572 |
ifFalse:[ mappings := self extensionLine_libInit_dot_cc_mappings. |
|
573 |
self replaceMappings: mappings |
|
574 |
in: self extensionLine_libInit_dot_cc.] |
|
575 |
" |
|
576 |
DapasXProject generateExtensionLine_libInit_dot_cc |
|
577 |
DapasX_Datenbasis generateExtensionLine_libInit_dot_cc |
|
578 |
||
579 |
" |
|
580 |
||
581 |
"Created: / 09-08-2006 / 11:23:34 / fm" |
|
582 |
! |
|
583 |
||
9503 | 584 |
generateMsdosLocalIncludes |
9493 | 585 |
|
586 |
^self searchForProjectsWhichProvideHeaderFiles |
|
587 |
inject: '' |
|
588 |
into:[:objectLines :includeProjectName | |
|
9503 | 589 |
objectLines , ' -I',(self msdosPathToPackage: includeProjectName) |
9493 | 590 |
] |
591 |
||
592 |
" |
|
593 |
DapasXProject generateLocalIncludes |
|
594 |
DapasX_Datenbasis generateLocalIncludes |
|
595 |
||
596 |
" |
|
597 |
||
598 |
"Created: / 09-08-2006 / 16:46:49 / fm" |
|
599 |
! |
|
600 |
||
601 |
generateObjects_make_dot_spec |
|
9504 | 602 |
|pivateClassesOf classes| |
9493 | 603 |
|
9504 | 604 |
classes := self compiled_classes. |
605 |
pivateClassesOf := IdentityDictionary new. |
|
606 |
classes do:[:each | pivateClassesOf at:each put:(each allPrivateClasses)]. |
|
607 |
||
608 |
classes topologicalSort:[:a :b | |
|
609 |
"/ a must come before b iff: |
|
610 |
"/ b is a subclass of a |
|
611 |
"/ b has a private class which is a subclass of a |
|
612 |
||
613 |
|mustComeBefore pivateClassesOfB| |
|
9533 | 614 |
|
615 |
mustComeBefore := false. |
|
616 |
(a isSharedPool and:[(b sharedPools includes: a name)]) ifTrue:[ |
|
617 |
mustComeBefore := true |
|
618 |
]. |
|
619 |
||
620 |
mustComeBefore := mustComeBefore or:[b isSubclassOf:a]. |
|
9504 | 621 |
pivateClassesOfB := pivateClassesOf at:b. |
622 |
pivateClassesOfB do:[:eachClassInB | |
|
623 |
mustComeBefore := mustComeBefore or:[eachClassInB isSubclassOf:a] |
|
624 |
]. |
|
625 |
mustComeBefore |
|
626 |
]. |
|
627 |
||
628 |
^ String streamContents:[:s | |
|
629 |
classes do:[:eachClass | |
|
630 |
|mappings newObjectLine| |
|
631 |
||
632 |
mappings := self objectLine_make_dot_spec_mappings: eachClass name. |
|
633 |
newObjectLine := self replaceMappings: mappings in: self objectLine_make_dot_spec. |
|
9534 | 634 |
s nextPutLine:newObjectLine. |
635 |
]. |
|
636 |
self extensionMethodNames notEmpty |
|
637 |
ifTrue:[ |
|
638 |
s nextPutLine:' extensions.$(O) \'. |
|
639 |
] |
|
9493 | 640 |
] |
641 |
" |
|
9533 | 642 |
bosch_dapasx_hw_schnittstellen_Definition generateObjects_make_dot_spec |
9493 | 643 |
DapasXProject generateObjects_make_dot_spec |
644 |
DapasX_Datenbasis generateObjects_make_dot_spec |
|
645 |
||
646 |
" |
|
647 |
||
648 |
"Created: / 09-08-2006 / 11:24:39 / fm" |
|
649 |
! |
|
650 |
||
651 |
generatePrerequisiteProjectsPaths |
|
652 |
||
653 |
^self prerequisiteProjects |
|
654 |
inject: '' |
|
655 |
into:[:objectLines :subProjectName | |
|
656 |
objectLines |
|
657 |
concatenate: String lf |
|
658 |
and: ' -I' |
|
659 |
and: subProjectName |
|
660 |
] |
|
661 |
||
662 |
" |
|
663 |
DapasXProject generatePrerequisiteProjectsPaths |
|
664 |
DapasX_Datenbasis generatePrerequisiteProjectsPaths |
|
665 |
||
666 |
" |
|
667 |
||
668 |
"Created: / 09-08-2006 / 12:34:20 / fm" |
|
669 |
! |
|
670 |
||
671 |
generateSubDirectories |
|
672 |
||
673 |
^self subProjects |
|
674 |
inject: '' |
|
675 |
into:[:objectLines :subProjectName | |
|
676 |
objectLines |
|
677 |
concatenate: ' ' |
|
678 |
and: subProjectName |
|
679 |
] |
|
680 |
||
681 |
" |
|
682 |
DapasXProject generateSubDirectories |
|
683 |
DapasX_Datenbasis generateSubDirectories |
|
684 |
||
685 |
" |
|
686 |
||
687 |
"Created: / 09-08-2006 / 11:26:59 / fm" |
|
688 |
! |
|
689 |
||
9503 | 690 |
generateUnixLocalIncludes |
691 |
||
692 |
^self searchForProjectsWhichProvideHeaderFiles |
|
693 |
inject: '' |
|
694 |
into:[:objectLines :includeProjectName | |
|
695 |
objectLines , ' -I',(self unixPathToPackage: includeProjectName) |
|
696 |
] |
|
697 |
||
698 |
" |
|
699 |
DapasXProject generateLocalIncludes |
|
700 |
DapasX_Datenbasis generateLocalIncludes |
|
701 |
||
702 |
" |
|
703 |
||
704 |
"Created: / 09-08-2006 / 16:46:49 / fm" |
|
705 |
! |
|
706 |
||
9493 | 707 |
prerequisiteProjectsOrdered |
708 |
||
709 |
^self prerequisiteProjects asSortedCollection:[:a :b | ] |
|
710 |
||
711 |
" |
|
712 |
DapasXProject generatePrerequisiteProjectsPaths |
|
713 |
DapasX_Datenbasis generatePrerequisiteProjectsPaths |
|
714 |
||
715 |
" |
|
716 |
||
717 |
"Created: / 09-08-2006 / 13:12:01 / fm" |
|
718 |
! ! |
|
719 |
||
720 |
!ProjectDefinition class methodsFor:'sanity checks'! |
|
721 |
||
722 |
searchForInconsistencies |
|
723 |
self searchForNeverCompiledSuperclasses. |
|
724 |
||
725 |
" |
|
726 |
self searchForInconsistencies |
|
727 |
DapasX_Datenbasis searchForInconsistencies |
|
728 |
" |
|
729 |
||
730 |
"Created: / 09-08-2006 / 16:30:46 / fm" |
|
731 |
! |
|
732 |
||
733 |
searchForNeverCompiledSuperclasses |
|
9495 | 734 |
self compiled_classesDo:[:includedClass | |
9493 | 735 |
includedClass allSuperclassesDo:[:eachSuperClass | |
736 |
eachSuperClass package == Project noProjectID ifTrue:[ |
|
737 |
self inconsistency:'uncompiled superclass: ' , eachSuperClass name |
|
738 |
]. |
|
739 |
] |
|
740 |
]. |
|
741 |
||
742 |
" |
|
743 |
self searchForNeverCompiledSuperclasses |
|
744 |
DapasX_Datenbasis searchForNeverCompiledSuperclasses |
|
745 |
" |
|
746 |
||
747 |
"Created: / 09-08-2006 / 16:31:54 / fm" |
|
748 |
! ! |
|
749 |
||
750 |
!ProjectDefinition class methodsFor:'update description'! |
|
751 |
||
9495 | 752 |
autoloadedClassNamesGeneratedCodeToCompile |
753 |
|classNamesCode| |
|
754 |
||
755 |
classNamesCode := 'autoloaded_classNames', String lf, '"This method has been automatically generated"'. |
|
756 |
classNamesCode := classNamesCode, String lf, self autoloadedClassNamesGeneratedString. |
|
757 |
^classNamesCode |
|
758 |
||
759 |
" |
|
760 |
DapasXProject autoloadedClassNamesGeneratedCodeToCompile |
|
761 |
DapasX_Datenbasis autoloadedClassNamesGeneratedCodeToCompile |
|
762 |
||
763 |
" |
|
764 |
||
765 |
"Created: / 08-08-2006 / 15:07:06 / fm" |
|
766 |
! |
|
767 |
||
768 |
autoloadedClassNamesGeneratedString |
|
769 |
| | |
|
770 |
||
771 |
^ String streamContents:[:s | |
|
772 |
s nextPutAll:'^#('. |
|
773 |
self searchForClassesWithProject do:[:eachClass | |
|
9530 | 774 |
(false "eachClass wasAutoloaded" or:[ eachClass isLoaded not ]) ifTrue:[ |
9495 | 775 |
(self compiled_classNames includes:eachClass name) ifFalse:[ |
776 |
(self excluded_classNames includes:eachClass name) ifFalse:[ |
|
777 |
s cr; nextPutAll:eachClass name asString storeString |
|
778 |
] |
|
779 |
] |
|
780 |
] |
|
781 |
]. |
|
782 |
s cr; nextPutAll:')' |
|
783 |
]. |
|
784 |
||
785 |
" |
|
9526
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
786 |
bosch_dapasx_interactiver_editor autoloadedClassNamesGeneratedString |
9495 | 787 |
" |
788 |
||
789 |
"Created: / 08-08-2006 / 15:00:17 / fm" |
|
790 |
"Modified: / 08-08-2006 / 19:24:34 / fm" |
|
9526
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
791 |
"Modified: / 11-08-2006 / 14:01:23 / cg" |
9495 | 792 |
! |
793 |
||
9493 | 794 |
classNamesGeneratedCodeToCompile |
795 |
|classNamesCode| |
|
796 |
||
9495 | 797 |
classNamesCode := 'compiled_classNames', String lf, '"This method has been automatically generated"'. |
9493 | 798 |
classNamesCode := classNamesCode, String lf, self classNamesGeneratedString. |
799 |
^classNamesCode |
|
800 |
||
801 |
" |
|
9495 | 802 |
DapasXProject Datenbasis |
803 |
DapasX_Datenbasis Datenbasis |
|
9493 | 804 |
|
805 |
" |
|
806 |
||
807 |
"Created: / 08-08-2006 / 15:07:06 / fm" |
|
808 |
! |
|
809 |
||
810 |
classNamesGeneratedString |
|
9495 | 811 |
| | |
9493 | 812 |
|
9495 | 813 |
^ String streamContents:[:s | |
814 |
s nextPutAll:'^#('. |
|
815 |
self searchForClassesWithProject do:[:eachClass | |
|
816 |
(self autoloaded_classNames includes:eachClass name) ifFalse:[ |
|
817 |
(self excluded_classNames includes:eachClass name) ifFalse:[ |
|
818 |
s cr; nextPutAll:eachClass name asString storeString |
|
819 |
] |
|
820 |
] |
|
821 |
]. |
|
822 |
s cr; nextPutAll:')' |
|
823 |
]. |
|
9493 | 824 |
|
825 |
" |
|
9526
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
826 |
bosch_dapasx_interactiver_editor classNamesGeneratedString |
9493 | 827 |
" |
828 |
||
829 |
"Created: / 08-08-2006 / 15:00:17 / fm" |
|
830 |
"Modified: / 08-08-2006 / 19:24:34 / fm" |
|
9526
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
831 |
"Modified: / 11-08-2006 / 14:01:26 / cg" |
9493 | 832 |
! |
833 |
||
834 |
extensionMethodNamesGeneratedCodeToCompile |
|
835 |
|extensionMethodNamesCode| |
|
836 |
||
837 |
extensionMethodNamesCode := 'extensionMethodNames', String lf, '"This method has been automatically generated"'. |
|
838 |
extensionMethodNamesCode := extensionMethodNamesCode, String lf, self extensionMethodNamesGeneratedString. |
|
839 |
^extensionMethodNamesCode |
|
840 |
||
841 |
" |
|
842 |
DapasXProject extensionMethodNamesGeneratedCodeToCompile |
|
843 |
DapasX_Datenbasis extensionMethodNamesGeneratedCodeToCompile |
|
844 |
||
845 |
" |
|
846 |
||
847 |
"Created: / 08-08-2006 / 18:54:42 / fm" |
|
848 |
! |
|
849 |
||
850 |
extensionMethodNamesGeneratedString |
|
851 |
|generatedString | |
|
852 |
||
853 |
generatedString := self searchForExtensionsWithProject |
|
854 |
inject: '^#(' |
|
855 |
into:[:string :each | |
|
856 |
string, String lf, each mclass name asString storeString, ' #', each name ]. |
|
857 |
^generatedString, String lf, ')' |
|
858 |
||
859 |
" |
|
860 |
self extensionMethodNamesGeneratedString |
|
861 |
" |
|
862 |
||
863 |
"Created: / 08-08-2006 / 18:55:04 / fm" |
|
864 |
! |
|
865 |
||
9514 | 866 |
forEachMethodsCodeToCompileDo:aTwoArgBlock |
867 |
aTwoArgBlock |
|
868 |
value:self autoloadedClassNamesGeneratedCodeToCompile |
|
9534 | 869 |
value:'description'. |
9514 | 870 |
|
871 |
aTwoArgBlock |
|
872 |
value: self classNamesGeneratedCodeToCompile |
|
9534 | 873 |
value: 'description'. |
9514 | 874 |
|
875 |
(self theMetaclass includesSelector:#excluded_classNames) ifFalse:[ |
|
876 |
aTwoArgBlock |
|
877 |
value: 'excluded_classNames\^ #()' withCRs |
|
9534 | 878 |
value: 'description'. |
9514 | 879 |
]. |
880 |
||
881 |
aTwoArgBlock |
|
882 |
value: self extensionMethodNamesGeneratedCodeToCompile |
|
9534 | 883 |
value: 'description'. |
9514 | 884 |
|
885 |
"/ aTwoArgBlock |
|
886 |
"/ value: 'description ^''bla bla''' |
|
9534 | 887 |
"/ value: 'description' |
9514 | 888 |
|
889 |
"Created: / 10-08-2006 / 16:35:47 / cg" |
|
9493 | 890 |
! ! |
891 |
||
892 |
!ProjectDefinition class methodsFor:'xxx'! |
|
893 |
||
894 |
try |
|
895 |
^ 'hhh' , '989898' |
|
896 |
||
897 |
"Created: / 09-08-2006 / 16:50:52 / fm" |
|
898 |
! |
|
899 |
||
900 |
try2 |
|
901 |
^ 1 + 2 |
|
902 |
||
903 |
"Created: / 09-08-2006 / 16:53:16 / fm" |
|
904 |
! ! |
|
905 |
||
906 |
!ProjectDefinition class methodsFor:'documentation'! |
|
907 |
||
908 |
version |
|
9540 | 909 |
^ '$Header: /cvs/stx/stx/libbasic/LibraryDefinition.st,v 1.18 2006-08-16 15:37:54 fm Exp $' |
9493 | 910 |
! ! |