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