author | Stefan Vogel <sv@exept.de> |
Tue, 04 Apr 2017 10:08:21 +0200 | |
changeset 21685 | 0f9d82ec04db |
parent 19997 | e925ec41a00c |
child 21927 | f82381b50ee2 |
permissions | -rw-r--r-- |
9526
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
1 |
" |
14910 | 2 |
COPYRIGHT (c) 2006-2013 by eXept Software AG |
3 |
All Rights Reserved |
|
9526
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 |
" |
9671 | 12 |
"{ Package: 'stx:libbasic' }" |
9493 | 13 |
|
18502 | 14 |
"{ NameSpace: Smalltalk }" |
15 |
||
9568 | 16 |
ProjectDefinition subclass:#LibraryDefinition |
9616 | 17 |
instanceVariableNames:'' |
18 |
classVariableNames:'' |
|
19 |
poolDictionaries:'' |
|
20 |
category:'System-Support-Projects' |
|
9493 | 21 |
! |
22 |
||
9568 | 23 |
!LibraryDefinition class methodsFor:'documentation'! |
9526
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
24 |
|
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
25 |
copyright |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
26 |
" |
14910 | 27 |
COPYRIGHT (c) 2006-2013 by eXept Software AG |
28 |
All Rights Reserved |
|
9526
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
29 |
|
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
30 |
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
|
31 |
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
|
32 |
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
|
33 |
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
|
34 |
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
|
35 |
hereby transferred. |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
36 |
" |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
37 |
! ! |
9493 | 38 |
|
11577
d9ad27e7ca5e
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11550
diff
changeset
|
39 |
!LibraryDefinition class methodsFor:'description - compilation'! |
d9ad27e7ca5e
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11550
diff
changeset
|
40 |
|
d9ad27e7ca5e
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11550
diff
changeset
|
41 |
primaryTarget |
d9ad27e7ca5e
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11550
diff
changeset
|
42 |
"the primary make target in Make.proto/bc.mak" |
d9ad27e7ca5e
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11550
diff
changeset
|
43 |
|
d9ad27e7ca5e
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11550
diff
changeset
|
44 |
^ 'classLibRule' |
d9ad27e7ca5e
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11550
diff
changeset
|
45 |
! ! |
d9ad27e7ca5e
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11550
diff
changeset
|
46 |
|
9576 | 47 |
!LibraryDefinition class methodsFor:'description - project information'! |
48 |
||
49 |
description |
|
50 |
"Returns a description string which will appear in nt.def / bc.def" |
|
51 |
||
52 |
self module = 'stx' ifTrue:[ |
|
12095 | 53 |
^ 'Smalltalk/X Class library' |
9576 | 54 |
]. |
55 |
||
9586 | 56 |
^ 'Class Library' |
9576 | 57 |
|
58 |
"Created: / 17-08-2006 / 20:52:16 / cg" |
|
9586 | 59 |
"Modified: / 18-08-2006 / 16:15:53 / cg" |
9847 | 60 |
! |
61 |
||
62 |
fileDescription |
|
10417 | 63 |
"Return a description string which will appear in nt.def / bc.def and the rc-file" |
9847 | 64 |
|
17242 | 65 |
^ self description , ' (LIB)' |
9847 | 66 |
|
67 |
"Created: / 14-09-2006 / 10:55:23 / cg" |
|
13179 | 68 |
! |
69 |
||
21685 | 70 |
productName |
71 |
"Returns a product name which will appear in <lib>.rc. |
|
72 |
Under win32, this is placed into the dll's file-info. |
|
73 |
This method is usually redefined in a concrete application definition" |
|
74 |
||
75 |
^ super productName ? self name. |
|
76 |
||
77 |
"Created: / 03-04-2017 / 19:08:44 / stefan" |
|
78 |
! |
|
79 |
||
13179 | 80 |
productType |
81 |
"Returns the product type for autopackage" |
|
82 |
||
83 |
^ 'Library' |
|
84 |
||
85 |
"Created: / 21-12-2010 / 09:28:59 / cg" |
|
9576 | 86 |
! ! |
87 |
||
9568 | 88 |
!LibraryDefinition class methodsFor:'file generation'! |
9493 | 89 |
|
9853 | 90 |
basicFileNamesToGenerate |
17242 | 91 |
"answer a dictionary (filename -> generator method) with all the files, |
92 |
that have to be generated for this package" |
|
10865
59a7977261af
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10805
diff
changeset
|
93 |
|
59a7977261af
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10805
diff
changeset
|
94 |
|dict| |
9576 | 95 |
|
10865
59a7977261af
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10805
diff
changeset
|
96 |
dict := super basicFileNamesToGenerate. |
17242 | 97 |
dict at:'libInit.cc' put:#'generate_libInit_dot_cc'. |
10865
59a7977261af
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10805
diff
changeset
|
98 |
^ dict. |
9582 | 99 |
! |
100 |
||
9622 | 101 |
generateFile:filename |
102 |
filename = 'libInit.cc' ifTrue:[ |
|
12095 | 103 |
^ self generate_libInit_dot_cc |
9622 | 104 |
]. |
9832 | 105 |
((filename = 'lib.rc') or:[filename = self rcFilename]) ifTrue:[ |
12095 | 106 |
^ self generate_packageName_dot_rc |
9622 | 107 |
]. |
108 |
^ super generateFile:filename |
|
109 |
||
110 |
"Created: / 22-08-2006 / 18:36:24 / cg" |
|
9832 | 111 |
"Modified: / 07-09-2006 / 17:07:46 / cg" |
9622 | 112 |
! |
113 |
||
9582 | 114 |
generate_libInit_dot_cc |
12095 | 115 |
^ self replaceMappings: self libInit_dot_cc_mappings |
19308 | 116 |
in: self libInit_dot_cc |
9582 | 117 |
|
9960
13b44d7b8f54
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9957
diff
changeset
|
118 |
" |
19308 | 119 |
stx_libbasic2 generate_libInit_dot_cc |
9960
13b44d7b8f54
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9957
diff
changeset
|
120 |
bosch_dapasx_datenbasis generate_libInit_dot_cc |
13b44d7b8f54
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9957
diff
changeset
|
121 |
bosch_dapasx_application generate_libInit_dot_cc |
13b44d7b8f54
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9957
diff
changeset
|
122 |
" |
9582 | 123 |
|
124 |
"Created: / 08-08-2006 / 12:47:16 / fm" |
|
125 |
"Modified: / 09-08-2006 / 11:30:52 / fm" |
|
9960
13b44d7b8f54
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9957
diff
changeset
|
126 |
"Modified: / 19-09-2006 / 22:41:40 / cg" |
9493 | 127 |
! ! |
128 |
||
12365 | 129 |
!LibraryDefinition class methodsFor:'file mappings'! |
130 |
||
131 |
bc_dot_mak_mappings |
|
132 |
|d resFileName| |
|
133 |
||
19997 | 134 |
resFileName := self resourceFilename. "/ (self package copyFrom:(self package lastIndexOfAny:':/')+1),'.$(RES)'. |
12365 | 135 |
|
136 |
d := super bc_dot_mak_mappings. |
|
14946 | 137 |
^ d |
14858 | 138 |
at: 'LIBRARY_NAME' put: ( self libraryName ); |
139 |
at: 'COMMONSYMFLAG' put: (self commonSymbolsFlag); |
|
140 |
at: 'HEADEROUTPUTARG' put: (self headerFileOutputArg); |
|
141 |
at: 'RESFILENAME' put: resFileName; |
|
142 |
at: 'DEPENDENCIES' put: (self generateDependencies_win32); |
|
14946 | 143 |
at: 'MAKE_PREREQUISITES' put: (self generateRequiredMakePrerequisites_bc_dot_mak ? ''); |
14858 | 144 |
yourself. |
12365 | 145 |
|
146 |
"Created: / 09-08-2006 / 11:44:36 / fm" |
|
147 |
"Modified: / 09-08-2006 / 20:00:01 / fm" |
|
148 |
"Modified: / 14-09-2006 / 18:58:15 / cg" |
|
149 |
! |
|
150 |
||
151 |
extensionLine_libInit_dot_cc_mappings |
|
152 |
||
17242 | 153 |
^ Dictionary new |
18502 | 154 |
at: 'LIBRARY_NAME' put: ( self st2c:(ProjectDefinition projectDefinitionClassNameForDefinitionOf:self package) ); |
17242 | 155 |
yourself |
12365 | 156 |
|
157 |
"Created: / 09-08-2006 / 11:19:59 / fm" |
|
158 |
"Modified: / 14-09-2006 / 18:56:26 / cg" |
|
159 |
! |
|
160 |
||
161 |
libInit_dot_cc_mappings |
|
162 |
||
17242 | 163 |
^ Dictionary new |
164 |
at: 'LIBRARY_NAME' put: (self libraryName); |
|
165 |
at: 'PACKAGE' put: (self package); |
|
19308 | 166 |
at: 'EXTERN_DECLARATIONS' put: (self generateExternalDeclarationLines_libInit_dot_cc); |
167 |
at: 'DEFINITION_CLASSES' put: (self generateDefinitionClassLine_libInit_dot_cc); |
|
17242 | 168 |
at: 'CLASSES' put: (self generateClassLines_libInit_dot_cc); |
169 |
at: 'EXTENSION' put: (self generateExtensionLine_libInit_dot_cc); |
|
170 |
yourself |
|
12365 | 171 |
|
19308 | 172 |
" |
173 |
stx_libbasic libInit_dot_cc_mappings |
|
174 |
" |
|
175 |
||
12365 | 176 |
"Created: / 09-08-2006 / 11:20:24 / fm" |
177 |
"Modified: / 16-08-2006 / 18:19:03 / User" |
|
178 |
"Modified: / 14-09-2006 / 18:56:42 / cg" |
|
179 |
! |
|
180 |
||
14946 | 181 |
make_dot_proto_mappings |
182 |
|d| |
|
183 |
||
184 |
d := super make_dot_proto_mappings. |
|
185 |
^ d |
|
186 |
at: 'MAKE_PREREQUISITES' put: (self generateRequiredMakePrerequisites_make_dot_proto); |
|
187 |
yourself. |
|
12365 | 188 |
! ! |
189 |
||
190 |
!LibraryDefinition class methodsFor:'file mappings support'! |
|
191 |
||
192 |
commonSymbolsFlag |
|
193 |
"some libraries are compiled with COMMONSYMBOLS - |
|
194 |
This saves a lot of space in the generated dll/so files; |
|
195 |
However, it also requires the librun to be rebuilt, whenever one of |
|
196 |
the commonSymbols-libs changes. |
|
197 |
Therefore, NEVER do this for end-user or application libraries; |
|
198 |
ONLY do it for a subset of the predefined, eXept-provided standard stx libraries" |
|
199 |
||
200 |
( |
|
201 |
#( |
|
202 |
'stx:libbasic' 'stx:libview' 'stx:libtool' |
|
203 |
'stx:libbasic2' 'stx:libview2' 'stx:libtool2' |
|
204 |
'stx:libbasic3' 'stx:libwidg' 'stx:libhtml' |
|
205 |
'stx:libcomp' 'stx:libwidg2' 'stx:libui' |
|
206 |
'stx:libboss' 'stx:libdb' |
|
207 |
) |
|
208 |
includes:self package) ifTrue:[ |
|
209 |
^ '$(COMMONSYMBOLS)' |
|
210 |
]. |
|
211 |
^ '' |
|
212 |
||
213 |
"Created: / 18-08-2006 / 13:01:52 / cg" |
|
214 |
"Modified: / 23-08-2006 / 09:48:11 / cg" |
|
215 |
! |
|
216 |
||
217 |
generateExtensionLine_libInit_dot_cc |
|
218 |
|mappings| |
|
219 |
||
17242 | 220 |
^ self hasExtensionMethods |
221 |
ifFalse:[''] |
|
222 |
ifTrue:[ |
|
223 |
mappings := self extensionLine_libInit_dot_cc_mappings. |
|
224 |
self replaceMappings: mappings in: self extensionLine_libInit_dot_cc.] |
|
12365 | 225 |
|
226 |
" |
|
227 |
DapasXProject generateExtensionLine_libInit_dot_cc |
|
228 |
DapasX_Datenbasis generateExtensionLine_libInit_dot_cc |
|
229 |
" |
|
230 |
||
231 |
"Created: / 09-08-2006 / 11:23:34 / fm" |
|
232 |
"Modified: / 14-09-2006 / 14:19:59 / cg" |
|
233 |
! ! |
|
234 |
||
9568 | 235 |
!LibraryDefinition class methodsFor:'file templates'! |
9493 | 236 |
|
237 |
bc_dot_def |
|
9576 | 238 |
"the template code for the bc.def file" |
9493 | 239 |
|
12772 | 240 |
"/^ |
241 |
"/'LIBRARY %(LIBRARY_NAME) |
|
242 |
"/DESCRIPTION %(DESCRIPTION) |
|
243 |
"/CODE PRELOAD MOVEABLE DISCARDABLE |
|
244 |
"/SEGMENTS |
|
245 |
"/ INITCODE PRELOAD DISCARDABLE |
|
246 |
"/EXPORTS |
|
247 |
"/ __%(LIBRARY_NAME)_Init @1 |
|
248 |
"/ __%(LIBRARY_NAME)_InitDefinition @2 |
|
249 |
"/' |
|
250 |
||
12095 | 251 |
^ |
9608 | 252 |
'LIBRARY %(LIBRARY_NAME) |
9493 | 253 |
DESCRIPTION %(DESCRIPTION) |
254 |
CODE PRELOAD MOVEABLE DISCARDABLE |
|
255 |
SEGMENTS |
|
256 |
INITCODE PRELOAD DISCARDABLE |
|
257 |
EXPORTS |
|
12770
520a17d353eb
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12365
diff
changeset
|
258 |
__%(LIBRARY_NAME)_Init @1 |
9504 | 259 |
' |
9493 | 260 |
|
261 |
"Created: / 08-08-2006 / 12:26:58 / fm" |
|
262 |
"Modified: / 08-08-2006 / 19:32:27 / fm" |
|
9590 | 263 |
"Modified: / 18-08-2006 / 17:13:45 / cg" |
9493 | 264 |
! |
265 |
||
10305 | 266 |
bc_dot_mak |
10318
bef855ddbb59
bc.def - no longer generated it is now in rules\bc_dll.def or
Stefan Vogel <sv@exept.de>
parents:
10305
diff
changeset
|
267 |
"answer a template for the bc.mak makefile. |
bef855ddbb59
bc.def - no longer generated it is now in rules\bc_dll.def or
Stefan Vogel <sv@exept.de>
parents:
10305
diff
changeset
|
268 |
Any variable definition %(Variable) will be later replaced by the mapping. |
bef855ddbb59
bc.def - no longer generated it is now in rules\bc_dll.def or
Stefan Vogel <sv@exept.de>
parents:
10305
diff
changeset
|
269 |
$% characters have to be duplicated" |
10305 | 270 |
|
271 |
^ |
|
272 |
'# $','Header','$ |
|
273 |
# |
|
12095 | 274 |
# DO NOT EDIT |
14246 | 275 |
# automagically generated from the projectDefinition: ',self name",' at ',Timestamp now printString",'. |
10305 | 276 |
# |
277 |
# Warning: once you modify this file, do not rerun |
|
278 |
# stmkmp or projectDefinition-build again - otherwise, your changes are lost. |
|
279 |
# |
|
13951
f4528d257651
use objdir in librun (objbc or objvc), so both compiler outputs can coexist
Claus Gittinger <cg@exept.de>
parents:
13788
diff
changeset
|
280 |
# Notice, that the name bc.mak is historical (from times, when only borland c was supported). |
f4528d257651
use objdir in librun (objbc or objvc), so both compiler outputs can coexist
Claus Gittinger <cg@exept.de>
parents:
13788
diff
changeset
|
281 |
# This file contains make rules for the win32 platform using either borland-bcc or visual-c. |
10305 | 282 |
# It shares common definitions with the unix-make in Make.spec. |
13951
f4528d257651
use objdir in librun (objbc or objvc), so both compiler outputs can coexist
Claus Gittinger <cg@exept.de>
parents:
13788
diff
changeset
|
283 |
# The bc.mak supports the following targets: |
10305 | 284 |
# bmake - compile all st-files to a classLib (dll) |
285 |
# bmake clean - clean all temp files |
|
286 |
# bmake clobber - clean all |
|
287 |
# |
|
13729 | 288 |
# Historic Note: |
14433 | 289 |
# this used to contain only rules to make with borland |
13729 | 290 |
# (called via bmake, by "make.exe -f bc.mak") |
13784 | 291 |
# this has changed; it is now also possible to build using microsoft visual c |
13729 | 292 |
# (called via vcmake, by "make.exe -f bc.mak -DUSEVC") |
10305 | 293 |
# |
294 |
TOP=%(TOP) |
|
295 |
INCLUDE_TOP=$(TOP)\.. |
|
296 |
||
11941
56b21fa6c358
base address definition moved into a separate spec
Claus Gittinger <cg@exept.de>
parents:
11687
diff
changeset
|
297 |
%(ADDITIONAL_BASE_ADDRESS_DEFINITION) |
56b21fa6c358
base address definition moved into a separate spec
Claus Gittinger <cg@exept.de>
parents:
11687
diff
changeset
|
298 |
|
10305 | 299 |
!!INCLUDE $(TOP)\rules\stdHeader_bc |
300 |
||
301 |
!!INCLUDE Make.spec |
|
302 |
||
303 |
LIBNAME=%(LIBRARY_NAME) |
|
17039 | 304 |
MODULE_PATH=%(MODULE_PATH) |
10305 | 305 |
RESFILES=%(RESFILENAME) |
10536
d1da7d71bcf5
Put additionalDefinitions before localIncludes
Stefan Vogel <sv@exept.de>
parents:
10417
diff
changeset
|
306 |
|
d1da7d71bcf5
Put additionalDefinitions before localIncludes
Stefan Vogel <sv@exept.de>
parents:
10417
diff
changeset
|
307 |
%(ADDITIONAL_DEFINITIONS) |
d1da7d71bcf5
Put additionalDefinitions before localIncludes
Stefan Vogel <sv@exept.de>
parents:
10417
diff
changeset
|
308 |
|
10305 | 309 |
LOCALINCLUDES=%(LOCAL_INCLUDES) |
10980 | 310 |
LOCALDEFINES=%(LOCAL_DEFINES) |
10305 | 311 |
|
312 |
STCLOCALOPT=-package=$(PACKAGE) -I. $(LOCALINCLUDES) %(HEADEROUTPUTARG) $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES) %(COMMONSYMFLAG) -varPrefix=$(LIBNAME) |
|
313 |
LOCALLIBS=%(ADDITIONAL_LINK_LIBRARIES) |
|
314 |
||
315 |
OBJS= $(COMMON_OBJS) $(WIN32_OBJS) |
|
316 |
||
11577
d9ad27e7ca5e
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11550
diff
changeset
|
317 |
ALL:: %(ADDITIONAL_TARGETS) %(PRIMARY_TARGET) |
d9ad27e7ca5e
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11550
diff
changeset
|
318 |
|
12152
9d03dd3552a0
changed: classLibRule to include OUTDIR.
Claus Gittinger <cg@exept.de>
parents:
12095
diff
changeset
|
319 |
classLibRule: $(OUTDIR) $(OUTDIR)$(LIBNAME).dll |
10305 | 320 |
|
321 |
!!INCLUDE $(TOP)\rules\stdRules_bc |
|
322 |
||
14879 | 323 |
# build all mandatory prerequisite packages (containing superclasses) for this package |
11155
c816b5f0f90b
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
10980
diff
changeset
|
324 |
prereq: |
c816b5f0f90b
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
10980
diff
changeset
|
325 |
%(MAKE_PREREQUISITES) |
c816b5f0f90b
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
10980
diff
changeset
|
326 |
|
14879 | 327 |
|
10305 | 328 |
%(ADDITIONAL_RULES) |
15949 | 329 |
|
13685
069f722252d9
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13287
diff
changeset
|
330 |
%(ADDITIONAL_HEADERRULES) |
10305 | 331 |
|
15949 | 332 |
test: $(TOP)\goodies\builder\reports\NUL |
333 |
pushd $(TOP)\goodies\builder\reports & $(MAKE_BAT) |
|
334 |
$(TOP)\goodies\builder\reports\report-runner.bat -D . -r Builder::TestReport -p $(PACKAGE) |
|
335 |
||
14807 | 336 |
clean:: |
19980 | 337 |
-del *.$(CSUFFIX) |
14807 | 338 |
|
15949 | 339 |
|
10305 | 340 |
# BEGINMAKEDEPEND --- do not remove this line; make depend needs it |
341 |
%(DEPENDENCIES) |
|
342 |
# ENDMAKEDEPEND --- do not remove this line |
|
15949 | 343 |
%(ADDITIONAL_RULES_HG)' |
10305 | 344 |
|
345 |
"Created: / 09-08-2006 / 11:44:20 / fm" |
|
346 |
"Modified: / 09-08-2006 / 19:59:32 / fm" |
|
14246 | 347 |
"Modified: / 26-07-2012 / 00:57:20 / cg" |
15949 | 348 |
"Modified: / 28-11-2012 / 10:18:59 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10305 | 349 |
! |
350 |
||
9493 | 351 |
extensionLine_libInit_dot_cc |
352 |
||
19308 | 353 |
^ ' _%(LIBRARY_NAME)_extensions_Init(pass,__pRT__,snd);' |
9493 | 354 |
|
355 |
"Created: / 08-08-2006 / 15:48:56 / fm" |
|
356 |
"Modified: / 08-08-2006 / 19:32:33 / fm" |
|
357 |
! |
|
358 |
||
359 |
libInit_dot_cc |
|
9576 | 360 |
"the template code for the libInit.cc file" |
9493 | 361 |
|
12095 | 362 |
^ |
9493 | 363 |
'/* |
9576 | 364 |
* $','Header','$ |
365 |
* |
|
12095 | 366 |
* DO NOT EDIT |
9576 | 367 |
* automagically generated from the projectDefinition: ',self name,'. |
9493 | 368 |
*/ |
369 |
#define __INDIRECTVMINITCALLS__ |
|
10377 | 370 |
#include <stc.h> |
10332
5fe4d84d78fe
Add DLL_EXPORT to libInit_dot_cc
Stefan Vogel <sv@exept.de>
parents:
10318
diff
changeset
|
371 |
|
9493 | 372 |
#ifdef WIN32 |
373 |
# pragma codeseg INITCODE "INITCODE" |
|
12095 | 374 |
#endif |
10332
5fe4d84d78fe
Add DLL_EXPORT to libInit_dot_cc
Stefan Vogel <sv@exept.de>
parents:
10318
diff
changeset
|
375 |
|
5fe4d84d78fe
Add DLL_EXPORT to libInit_dot_cc
Stefan Vogel <sv@exept.de>
parents:
10318
diff
changeset
|
376 |
#if defined(INIT_TEXT_SECTION) || defined(DLL_EXPORT) |
5fe4d84d78fe
Add DLL_EXPORT to libInit_dot_cc
Stefan Vogel <sv@exept.de>
parents:
10318
diff
changeset
|
377 |
DLL_EXPORT void _%(LIBRARY_NAME)_Init() INIT_TEXT_SECTION; |
14785 | 378 |
DLL_EXPORT void _%(LIBRARY_NAME)_InitDefinition() INIT_TEXT_SECTION; |
9493 | 379 |
#endif |
10332
5fe4d84d78fe
Add DLL_EXPORT to libInit_dot_cc
Stefan Vogel <sv@exept.de>
parents:
10318
diff
changeset
|
380 |
|
19308 | 381 |
%(EXTERN_DECLARATIONS) |
382 |
||
383 |
void _%(LIBRARY_NAME)_InitDefinition(int pass, struct __vmData__ *__pRT__, OBJ snd) |
|
384 |
{ |
|
385 |
__BEGIN_PACKAGE2__("%(LIBRARY_NAME)__DFN", _%(LIBRARY_NAME)_InitDefinition, "%(PACKAGE)"); |
|
14785 | 386 |
%(DEFINITION_CLASSES) |
19308 | 387 |
__END_PACKAGE__(); |
14785 | 388 |
} |
12770
520a17d353eb
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12365
diff
changeset
|
389 |
|
19308 | 390 |
void _%(LIBRARY_NAME)_Init(int pass, struct __vmData__ *__pRT__, OBJ snd) |
391 |
{ |
|
392 |
__BEGIN_PACKAGE2__("%(LIBRARY_NAME)", _%(LIBRARY_NAME)_Init, "%(PACKAGE)"); |
|
9493 | 393 |
%(CLASSES) |
394 |
%(EXTENSION) |
|
19308 | 395 |
__END_PACKAGE__(); |
9902
74fab44fab6e
Add newline at end of libInit.cc
Stefan Vogel <sv@exept.de>
parents:
9899
diff
changeset
|
396 |
} |
74fab44fab6e
Add newline at end of libInit.cc
Stefan Vogel <sv@exept.de>
parents:
9899
diff
changeset
|
397 |
' |
9493 | 398 |
|
399 |
"Created: / 08-08-2006 / 12:40:45 / fm" |
|
400 |
"Modified: / 08-08-2006 / 19:33:01 / fm" |
|
9576 | 401 |
"Modified: / 18-08-2006 / 12:57:02 / cg" |
402 |
! |
|
403 |
||
9493 | 404 |
make_dot_proto |
405 |
||
12024 | 406 |
^ |
9576 | 407 |
'# $','Header','$ |
408 |
# |
|
12024 | 409 |
# DO NOT EDIT |
14246 | 410 |
# automagically generated from the projectDefinition: ',self name",' at ',Timestamp now printString",'. |
9576 | 411 |
# |
9493 | 412 |
# Warning: once you modify this file, do not rerun |
9576 | 413 |
# stmkmp or projectDefinition-build again - otherwise, your changes are lost. |
9493 | 414 |
# |
415 |
# The Makefile as generated by this Make.proto supports the following targets: |
|
416 |
# make - compile all st-files to a classLib |
|
417 |
# make clean - clean all temp files |
|
418 |
# make clobber - clean all |
|
9576 | 419 |
# |
420 |
# This file contains definitions for Unix based platforms. |
|
9851 | 421 |
# It shares common definitions with the win32-make in Make.spec. |
9493 | 422 |
|
423 |
# |
|
424 |
# position (of this package) in directory hierarchy: |
|
425 |
# (must point to ST/X top directory, for tools and includes) |
|
426 |
TOP=%(TOP) |
|
9879 | 427 |
INCLUDE_TOP=$(TOP)/.. |
9493 | 428 |
|
429 |
# subdirectories where targets are to be made: |
|
430 |
SUBDIRS=%(SUBDIRECTORIES) |
|
431 |
||
432 |
||
433 |
# subdirectories where Makefiles are to be made: |
|
434 |
# (only define if different from SUBDIRS) |
|
435 |
# ALLSUBDIRS= |
|
436 |
||
11155
c816b5f0f90b
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
10980
diff
changeset
|
437 |
REQUIRED_SUPPORT_DIRS=%(REQUIRED_SUPPORT_DIRS) |
9493 | 438 |
|
12024 | 439 |
# if your embedded C code requires any system includes, |
440 |
# add the path(es) here:, |
|
9493 | 441 |
# ********** OPTIONAL: MODIFY the next lines *** |
442 |
# LOCALINCLUDES=-Ifoo -Ibar |
|
443 |
LOCALINCLUDES=%(LOCAL_INCLUDES) |
|
444 |
||
445 |
||
12024 | 446 |
# if you need any additional defines for embedded C code, |
447 |
# add them here:, |
|
9493 | 448 |
# ********** OPTIONAL: MODIFY the next lines *** |
449 |
# LOCALDEFINES=-Dfoo -Dbar -DDEBUG |
|
450 |
LOCALDEFINES=%(LOCAL_DEFINES) |
|
451 |
||
9818 | 452 |
LIBNAME=%(LIBRARY_NAME) |
9613 | 453 |
STCLOCALOPT=''-package=$(PACKAGE)'' -I. $(LOCALINCLUDES) $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES) %(HEADEROUTPUTARG) %(COMMONSYMFLAG) -varPrefix=$(LIBNAME) |
9493 | 454 |
|
455 |
||
456 |
# ********** OPTIONAL: MODIFY the next line *** |
|
457 |
# additional C-libraries that should be pre-linked with the class-objects |
|
9734 | 458 |
LD_OBJ_LIBS=%(ADDITIONAL_LINK_LIBRARIES) |
9971
57890631d67a
Allow shared libraries to be defined for a class lib (needed for liboracle)
Stefan Vogel <sv@exept.de>
parents:
9960
diff
changeset
|
459 |
LOCAL_SHARED_LIBS=%(ADDITIONAL_SHARED_LINK_LIBRARIES) |
9493 | 460 |
|
461 |
||
462 |
# ********** OPTIONAL: MODIFY the next line *** |
|
463 |
# additional C targets or libraries should be added below |
|
464 |
LOCAL_EXTRA_TARGETS= |
|
465 |
||
9606 | 466 |
OBJS= $(COMMON_OBJS) $(UNIX_OBJS) |
467 |
||
9626 | 468 |
%(ADDITIONAL_DEFINITIONS) |
469 |
||
11577
d9ad27e7ca5e
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11550
diff
changeset
|
470 |
all:: preMake %(PRIMARY_TARGET) postMake |
9493 | 471 |
|
12024 | 472 |
pre_objs:: %(ADDITIONAL_TARGETS) %(ADDITIONAL_TARGETS_SVN) |
9626 | 473 |
|
474 |
%(ADDITIONAL_RULES) |
|
9493 | 475 |
|
12024 | 476 |
%(ADDITIONAL_RULES_SVN) |
477 |
||
15949 | 478 |
%(ADDITIONAL_RULES_HG) |
479 |
||
13685
069f722252d9
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13287
diff
changeset
|
480 |
%(ADDITIONAL_HEADERRULES) |
069f722252d9
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13287
diff
changeset
|
481 |
|
15949 | 482 |
# run default testsuite for this package |
483 |
test: $(TOP)/goodies/builder/reports |
|
16194
92e1f555fb2a
Fixed target test after changing Makefile to Makefile.init
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15949
diff
changeset
|
484 |
$(MAKE) -C $(TOP)/goodies/builder/reports -f Makefile.init |
15949 | 485 |
$(TOP)/goodies/builder/reports/report-runner.sh -D . -r Builder::TestReport -p $(PACKAGE) |
486 |
||
487 |
||
488 |
||
9493 | 489 |
# add more install actions here |
490 |
install:: |
|
491 |
||
492 |
# add more install actions for aux-files (resources) here |
|
493 |
installAux:: |
|
494 |
||
495 |
# add more preMake actions here |
|
496 |
preMake:: |
|
497 |
||
498 |
# add more postMake actions here |
|
499 |
postMake:: cleanjunk |
|
500 |
||
14879 | 501 |
# build all mandatory prerequisite packages (containing superclasses) for this package |
502 |
prereq: |
|
11155
c816b5f0f90b
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
10980
diff
changeset
|
503 |
%(MAKE_PREREQUISITES) |
c816b5f0f90b
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
10980
diff
changeset
|
504 |
|
14879 | 505 |
# build all packages containing referenced classes for this package |
17231 | 506 |
# they are not needed to compile the package (but later, to load it) |
14879 | 507 |
references: |
508 |
%(MAKE_REFERENCES) |
|
509 |
||
9493 | 510 |
cleanjunk:: |
13788 | 511 |
%(TAB)-rm -f *.s *.s2 |
9493 | 512 |
|
513 |
clean:: |
|
9576 | 514 |
%(TAB)-rm -f *.o *.H |
9493 | 515 |
|
10805
92df6c9281f9
Fix prereq: definition in Make.proto
Stefan Vogel <sv@exept.de>
parents:
10536
diff
changeset
|
516 |
clobber:: clean |
9576 | 517 |
%(TAB)-rm -f *.so *.dll |
9493 | 518 |
|
519 |
', |
|
520 |
" |
|
521 |
$(INSTALLBASE):: |
|
9576 | 522 |
%(TAB)@test -d $@ || mkdir $@ |
9493 | 523 |
|
524 |
$(INSTALLBASE)/packages:: $(INSTALLBASE) |
|
9576 | 525 |
%(TAB)@test -d $@ || mkdir $@ |
9493 | 526 |
|
527 |
$(INSTALLBASE)/packages/$(MODULE):: $(INSTALLBASE)/packages |
|
9576 | 528 |
%(TAB)@test -d $@ || mkdir $@ |
9493 | 529 |
|
530 |
$(INSTALLBASE)/packages/$(MODULE)/dapasx:: $(INSTALLBASE)/packages/$(MODULE) |
|
9576 | 531 |
%(TAB)@test -d $@ || mkdir $@ |
9493 | 532 |
|
533 |
$(INSTALLBASE)/packages/$(MODULE)/dapasx/interactiver_editor:: $(INSTALLBASE)/packages/$(MODULE)/dapasx |
|
9576 | 534 |
%(TAB)@test -d $@ || mkdir $@ |
9493 | 535 |
|
536 |
$(INSTALLBASE)/packages/$(MODULE)/$(MODULE_DIR):: $(INSTALLBASE)/packages/$(MODULE) |
|
9576 | 537 |
%(TAB)@test -d $@ || mkdir $@ |
9493 | 538 |
" |
539 |
' |
|
540 |
# BEGINMAKEDEPEND --- do not remove this line; make depend needs it |
|
9851 | 541 |
%(DEPENDENCIES) |
9493 | 542 |
# ENDMAKEDEPEND --- do not remove this line |
543 |
||
544 |
' |
|
545 |
||
546 |
"Created: / 08-08-2006 / 20:45:36 / fm" |
|
547 |
"Modified: / 09-08-2006 / 16:50:23 / fm" |
|
12024 | 548 |
"Modified: / 24-06-2009 / 21:39:29 / Jan Vrany <vranyj1@fel.cvut.cz>" |
14246 | 549 |
"Modified: / 26-07-2012 / 00:57:29 / cg" |
16194
92e1f555fb2a
Fixed target test after changing Makefile to Makefile.init
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
15949
diff
changeset
|
550 |
"Modified: / 03-03-2014 / 12:17:35 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
9493 | 551 |
! ! |
552 |
||
12087 | 553 |
|
11550 | 554 |
!LibraryDefinition class methodsFor:'obsolete'! |
555 |
||
556 |
lib_dot_rc |
|
557 |
<resource: #obsolete> |
|
558 |
||
12095 | 559 |
^ |
11550 | 560 |
'/*------------------------------------------------------------------------ |
12095 | 561 |
* $','Header','$ |
11550 | 562 |
* |
12095 | 563 |
* DO NOT EDIT |
11550 | 564 |
* automagically generated from the projectDefinition: ',self name,'. |
565 |
*------------------------------------------------------------------------*/ |
|
566 |
||
567 |
// #if (__BORLANDC__ < 0x0550) |
|
568 |
// #include <ver.h> |
|
569 |
// #endif |
|
570 |
||
571 |
VS_VERSION_INFO VERSIONINFO |
|
572 |
FILEVERSION %(FILEVERSION) |
|
573 |
PRODUCTVERSION %(PRODUCTVERSION) |
|
13984 | 574 |
#if (__BORLANDC__) |
11550 | 575 |
FILEFLAGSMASK VS_FF_DEBUG | VS_FF_PRERELEASE |
576 |
FILEFLAGS VS_FF_PRERELEASE | VS_FF_SPECIALBUILD |
|
577 |
FILEOS VOS_NT_WINDOWS32 |
|
578 |
FILETYPE %(FILETYPE) |
|
579 |
FILESUBTYPE VS_USER_DEFINED |
|
13984 | 580 |
#endif |
11550 | 581 |
|
582 |
BEGIN |
|
583 |
BLOCK "StringFileInfo" |
|
584 |
BEGIN |
|
585 |
BLOCK "040904E4" |
|
586 |
BEGIN |
|
587 |
VALUE "CompanyName", %(COMPANYNAME) |
|
588 |
VALUE "FileDescription", "Smalltalk/X Additional Developer Basic Classes Library\0" |
|
589 |
VALUE "FileVersion", "5.2.8.1\0" |
|
590 |
VALUE "InternalName", "libbasic3\0" |
|
591 |
VALUE "LegalCopyright", "Copyright eXept Software AG 1998-2006\0" |
|
592 |
VALUE "ProductName", "Smalltalk/X\0" |
|
593 |
VALUE "ProductVersion", "5.2.8.1\0" |
|
594 |
END |
|
595 |
||
596 |
END |
|
597 |
||
598 |
BLOCK "VarFileInfo" |
|
599 |
BEGIN // Language | Translation |
|
600 |
VALUE "Translation", 0x409, 0x4E4 // U.S. English, Windows Multilingual |
|
601 |
END |
|
602 |
END |
|
603 |
' |
|
604 |
||
605 |
"Created: / 17-08-2006 / 19:37:50 / cg" |
|
13984 | 606 |
"Modified: / 24-01-2012 / 18:35:45 / cg" |
11550 | 607 |
! ! |
608 |
||
9812 | 609 |
!LibraryDefinition class methodsFor:'queries'! |
610 |
||
17242 | 611 |
definitionClassOfApplicationBundle |
612 |
"Return the applicationDefinition of the applicationBundle or nil. |
|
613 |
This is the applicationDefinition of the package which gets actually deployed. |
|
614 |
For example, for all stx libraries, this will be stx_projects_smalltalk. |
|
615 |
For expecco, this would be exept_expecco_application. |
|
616 |
The algorithm here follows the parent hierarchy (not the class hierarchy) of the package name. |
|
617 |
Some classes may explicitly redefine this (if the folder structure is not hierarchical). |
|
618 |
This information is currently used for automatic check of language translations. |
|
619 |
||
620 |
Notice: libraries which are used by more than one project, should only return the one |
|
621 |
which is their 'natural' bundle - usually defined by the position in the package hierarchy. |
|
622 |
This is a little experimental - may change." |
|
623 |
||
624 |
|libPackageID parentPackageID parentDefinitionClass| |
|
625 |
||
626 |
libPackageID := self package asPackageId. |
|
627 |
[ |
|
628 |
parentPackageID := libPackageID parentPackage. |
|
629 |
parentPackageID isNil ifTrue:[^ nil]. |
|
630 |
||
631 |
parentDefinitionClass := parentPackageID projectDefinitionClass. |
|
632 |
parentDefinitionClass notNil ifTrue:[ |
|
633 |
^ parentDefinitionClass definitionClassOfApplicationBundle |
|
634 |
]. |
|
635 |
libPackageID := parentPackageID |
|
636 |
] loop. |
|
637 |
||
638 |
" |
|
639 |
exept_expecco definitionClassOfApplicationBundle |
|
640 |
" |
|
641 |
! |
|
642 |
||
19443 | 643 |
isAbstract |
644 |
^ self == LibraryDefinition |
|
645 |
! |
|
646 |
||
12333 | 647 |
projectType |
648 |
^ LibraryType |
|
17242 | 649 |
! |
650 |
||
651 |
supportedLanguages |
|
652 |
"Returns a list of languages that (should be / are) supported by this application or library. |
|
653 |
Currently this is only used by lint, to verify that the corresponding languages are |
|
654 |
present in the resource files." |
|
655 |
||
656 |
|app| |
|
657 |
||
658 |
(app := self definitionClassOfApplicationBundle) notNil ifTrue:[ |
|
659 |
^ app supportedLanguages |
|
660 |
]. |
|
661 |
^ super supportedLanguages. |
|
662 |
||
663 |
" |
|
664 |
exept_expecco definitionClassOfApplicationBundle |
|
19657 | 665 |
stx_libtool definitionClassOfApplicationBundle |
17242 | 666 |
" |
9812 | 667 |
! ! |
668 |
||
9568 | 669 |
!LibraryDefinition class methodsFor:'sanity checks'! |
9493 | 670 |
|
671 |
searchForInconsistencies |
|
672 |
self searchForNeverCompiledSuperclasses. |
|
673 |
||
674 |
" |
|
675 |
self searchForInconsistencies |
|
12095 | 676 |
DapasX_Datenbasis searchForInconsistencies |
9493 | 677 |
" |
678 |
||
679 |
"Created: / 09-08-2006 / 16:30:46 / fm" |
|
680 |
! |
|
681 |
||
682 |
searchForNeverCompiledSuperclasses |
|
12095 | 683 |
self compiled_classesDo:[:includedClass | |
12214
96d417c20fb8
Project noProjectID -> PackageId noProjectID
Claus Gittinger <cg@exept.de>
parents:
12152
diff
changeset
|
684 |
includedClass allSuperclassesDo:[:eachSuperClass | |
96d417c20fb8
Project noProjectID -> PackageId noProjectID
Claus Gittinger <cg@exept.de>
parents:
12152
diff
changeset
|
685 |
eachSuperClass package == PackageId noProjectID ifTrue:[ |
96d417c20fb8
Project noProjectID -> PackageId noProjectID
Claus Gittinger <cg@exept.de>
parents:
12152
diff
changeset
|
686 |
self inconsistency:'uncompiled superclass: ' , eachSuperClass name |
96d417c20fb8
Project noProjectID -> PackageId noProjectID
Claus Gittinger <cg@exept.de>
parents:
12152
diff
changeset
|
687 |
]. |
96d417c20fb8
Project noProjectID -> PackageId noProjectID
Claus Gittinger <cg@exept.de>
parents:
12152
diff
changeset
|
688 |
] |
9493 | 689 |
]. |
690 |
||
691 |
" |
|
692 |
self searchForNeverCompiledSuperclasses |
|
12095 | 693 |
DapasX_Datenbasis searchForNeverCompiledSuperclasses |
9493 | 694 |
" |
695 |
||
696 |
"Created: / 09-08-2006 / 16:31:54 / fm" |
|
697 |
! ! |
|
698 |
||
9568 | 699 |
!LibraryDefinition class methodsFor:'testing'! |
9558 | 700 |
|
9666 | 701 |
isLibraryDefinition |
14980 | 702 |
^ self isAbstract not |
9666 | 703 |
|
704 |
" |
|
705 |
stx_libboss isLibraryDefinition |
|
706 |
ProjectDefinition isLibraryDefinition |
|
707 |
LibraryDefinition isLibraryDefinition |
|
708 |
" |
|
709 |
||
710 |
"Created: / 23-08-2006 / 15:17:50 / cg" |
|
9558 | 711 |
! ! |
712 |
||
9568 | 713 |
!LibraryDefinition class methodsFor:'documentation'! |
9493 | 714 |
|
715 |
version |
|
18502 | 716 |
^ '$Header$' |
12087 | 717 |
! |
718 |
||
719 |
version_CVS |
|
18502 | 720 |
^ '$Header$' |
9493 | 721 |
! ! |
14785 | 722 |