Source

ede / ede-compilers.texi

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
@c -*-texinfo-*-
@c
@c $Id$
@c

@c The next line is for the back-search to see what node this one
@c resides in.

@c @node Compilers,
@c @chapter Compilers

@c This command is a convenience to help rebuild this file.  Use C-x C-e
@c on the expression below to rebuild the entire index (but only
@c after loading in all relevant source files.)

@c (eieiodoc-class ede-compilation-program "cm")
@menu
* ede-compilation-program ::
*  ede-compiler ::
*   ede-object-compiler ::
*  ede-linker ::
@end menu


@node ede-compilation-program, ede-compiler,  , Compilers
@comment  node-name,  next,  previous,  up
@section ede-compilation-program
@cmindex ede-compilation-program

@table @asis
@item Inheritance Tree:
@table @code
@item eieio-instance-inheritor
@table @code
@item ede-compilation-program
@table @asis
@item Children:
@w{@xref{ede-compiler},} @w{@xref{ede-linker}.} 
@end table

@end table

@end table
@end table

  Create a new object with name NAME of class type ede-compilation-program

@table @asis
@item Slots:

@table @code
@item :parent-instance
Type: @code{eieio-instance-inheritor}

The parent of this instance.
If a slot of this class is reference, and is unbound, then  the parent
is checked for a value.
@refill

@item :name
Type: @code{string}

Name of this type of compiler.
@refill

@item :variables
Type: @code{list}

Variables needed in the Makefile for this compiler.
An assoc list where each element is (VARNAME . VALUE) where VARNAME
is a string, and VALUE is either a string, or a list of strings.
For example, GCC would define CC=gcc, and emacs would define EMACS=emacs.
@refill

@item :sourcetype
Type: @code{list}

A list of @code{ede-sourcecode} @xref{ede-sourcecode}. objects this class will handle.
This is used to match target objects with the compilers and linkers
they can use, and which files this object is interested in.
@refill

@item :rules
Type: @code{list} @*
Default Value: @code{nil}

Auxiliary rules needed for this compiler to run.
For example, yacc/lex files need additional chain rules, or inferences.
@refill

@item :commands
Type: @code{list}

The commands used to execute this compiler.
The object which uses this compiler will place these commands after
it's rule definition.
@refill

@item :autoconf
Type: @code{list} @*
Default Value: @code{nil}

Autoconf function to call if this type of compiler is used.
When a project is in Automake mode, this defines the autoconf function to
call to initialize automake to use this compiler.
For example, there may be multiple C compilers, but they all probably
use the same autoconf form.
@refill

@item :objectextention
Type: @code{string}

A string which is the extention used for object files.
For example, C code uses .o on unix, and Emacs Lisp uses .elc.
@refill

@end table

@end table
@subsection Specialized Methods

@deffn Method ede-proj-flush-autoconf :PRIMARY this 
Flush the configure file (current buffer) to accomodate @var{THIS}.
@end deffn

@deffn Method ede-proj-makefile-insert-rules :PRIMARY this 
Insert rules needed for @var{THIS} compiler object.
@end deffn

@deffn Method ede-proj-makefile-insert-variables :PRIMARY this 
Insert variables needed by the compiler @var{THIS}.
@end deffn

@deffn Method ede-proj-makefile-insert-commands :PRIMARY this 
Insert the commands needed to use compiler @var{THIS}.
The object creating makefile rules must call this method for the
compiler it decides to use after inserting in the rule.
@end deffn

@deffn Method ede-object-sourcecode :PRIMARY this 
Retrieves the slot @code{sourcetype} from an object of class @code{ede-compilation-program}
@end deffn

@deffn Method ede-proj-tweak-autoconf :PRIMARY this 
Tweak the configure file (current buffer) to accomodate @var{THIS}.
@end deffn


@node ede-compiler, ede-object-compiler, ede-compilation-program, Compilers
@comment  node-name,  next,  previous,  up
@section ede-compiler
@cmindex ede-compiler

@table @asis
@item Inheritance Tree:
@table @code
@item eieio-instance-inheritor
@table @code
@item @w{@xref{ede-compilation-program}.}
@table @code
@item ede-compiler
@table @asis
@item Children:
@w{@xref{ede-object-compiler}.} 
@end table

@end table

@end table

@end table
@end table

  Create a new object with name NAME of class type ede-compiler

@table @asis
@item Slots:

@table @code
@item :parent-instance
Type: @code{eieio-instance-inheritor}

The parent of this instance.
If a slot of this class is reference, and is unbound, then  the parent
is checked for a value.
@refill

@item :name
Type: @code{string}

Name of this type of compiler.
@refill

@item :variables
Type: @code{list}

Variables needed in the Makefile for this compiler.
An assoc list where each element is (VARNAME . VALUE) where VARNAME
is a string, and VALUE is either a string, or a list of strings.
For example, GCC would define CC=gcc, and emacs would define EMACS=emacs.
@refill

@item :sourcetype
Type: @code{list}

A list of @code{ede-sourcecode} @xref{ede-sourcecode}. objects this class will handle.
This is used to match target objects with the compilers and linkers
they can use, and which files this object is interested in.
@refill

@item :commands
Type: @code{list}

The commands used to execute this compiler.
The object which uses this compiler will place these commands after
it's rule definition.
@refill

@item :objectextention
Type: @code{string}

A string which is the extention used for object files.
For example, C code uses .o on unix, and Emacs Lisp uses .elc.
@refill

@item :makedepends
Type: @code{boolean} @*
Default Value: @code{nil}

Non-@code{nil} if this compiler can make dependencies.
@refill

@item :uselinker
Type: @code{boolean} @*
Default Value: @code{nil}

Non-@code{nil} if this compiler creates code that can be linked.
This requires that the containing target also define a list of available
linkers that can be used.
@refill

@end table

@end table
@subsection Specialized Methods

@deffn Method initialize-instance :AFTER this &rest fields 
Make sure that all ede compiler objects are cached in 
@code{ede-compiler-list}.
@end deffn

@deffn Method ede-proj-makefile-insert-object-variables :PRIMARY this targetname sourcefiles 
Insert an OBJ variable to specify object code to be generated for @var{THIS}.
The name of the target is @var{TARGETNAME} as a string.  @var{SOURCEFILES} is the list of
files to be objectified.
Not all compilers do this.
@end deffn

@deffn Method ede-compiler-intermediate-objects-p :PRIMARY this 
Return non-@code{nil} if @var{THIS} has intermediate object files.
If this compiler creates code that can be linked together,
then the object files created by the compiler are considered intermediate.
@end deffn

@deffn Method ede-compiler-intermediate-object-variable :PRIMARY this targetname 
Return a string based on @var{THIS} representing a make object variable.
@var{TARGETNAME} is the name of the target that these objects belong to.
@end deffn


@node ede-object-compiler, ede-linker, ede-compiler, Compilers
@comment  node-name,  next,  previous,  up
@section ede-object-compiler
@cmindex ede-object-compiler

@table @asis
@item Inheritance Tree:
@table @code
@item eieio-instance-inheritor
@table @code
@item @w{@xref{ede-compilation-program}.}
@table @code
@item @w{@xref{ede-compiler}.}
@table @code
@item ede-object-compiler
No children
@end table

@end table

@end table

@end table
@end table

  Create a new object with name NAME of class type ede-object-compiler

@table @asis
@item Slots:

@table @code
@item :parent-instance
Type: @code{eieio-instance-inheritor}

The parent of this instance.
If a slot of this class is reference, and is unbound, then  the parent
is checked for a value.
@refill

@item :name
Type: @code{string}

Name of this type of compiler.
@refill

@item :variables
Type: @code{list}

Variables needed in the Makefile for this compiler.
An assoc list where each element is (VARNAME . VALUE) where VARNAME
is a string, and VALUE is either a string, or a list of strings.
For example, GCC would define CC=gcc, and emacs would define EMACS=emacs.
@refill

@item :sourcetype
Type: @code{list}

A list of @code{ede-sourcecode} @xref{ede-sourcecode}. objects this class will handle.
This is used to match target objects with the compilers and linkers
they can use, and which files this object is interested in.
@refill

@item :commands
Type: @code{list}

The commands used to execute this compiler.
The object which uses this compiler will place these commands after
it's rule definition.
@refill

@item :objectextention
Type: @code{string}

A string which is the extention used for object files.
For example, C code uses .o on unix, and Emacs Lisp uses .elc.
@refill

@item :uselinker
Type: @code{boolean} @*
Default Value: @code{t}

@xref{ede-compiler}.
@item :dependencyvar
Type: @code{list}

A variable dedicated to dependency generation.
@refill

@end table

@end table
@subsection Specialized Methods

@deffn Method ede-proj-makefile-insert-variables :PRIMARY this 
Insert variables needed by the compiler @var{THIS}.
@end deffn


@node ede-linker,  , ede-object-compiler, Compilers
@comment  node-name,  next,  previous,  up
@section ede-linker
@cmindex ede-linker

@table @asis
@item Inheritance Tree:
@table @code
@item eieio-instance-inheritor
@table @code
@item @w{@xref{ede-compilation-program}.}
@table @code
@item ede-linker
No children
@end table

@end table

@end table
@end table

  Create a new object with name NAME of class type ede-linker

@table @asis
@item Slots:

@table @code
@item :parent-instance
Type: @code{eieio-instance-inheritor}

The parent of this instance.
If a slot of this class is reference, and is unbound, then  the parent
is checked for a value.
@refill

@item :name
Type: @code{string}

Name of this type of compiler.
@refill

@item :variables
Type: @code{list}

Variables needed in the Makefile for this compiler.
An assoc list where each element is (VARNAME . VALUE) where VARNAME
is a string, and VALUE is either a string, or a list of strings.
For example, GCC would define CC=gcc, and emacs would define EMACS=emacs.
@refill

@item :sourcetype
Type: @code{list}

A list of @code{ede-sourcecode} @xref{ede-sourcecode}. objects this class will handle.
This is used to match target objects with the compilers and linkers
they can use, and which files this object is interested in.
@refill

@item :commands
Type: @code{list}

The commands used to execute this compiler.
The object which uses this compiler will place these commands after
it's rule definition.
@refill

@item :objectextention
Type: @code{string}

A string which is the extention used for object files.
For example, C code uses .o on unix, and Emacs Lisp uses .elc.
@refill

@end table

@end table
@subsection Specialized Methods

@deffn Method initialize-instance :AFTER this &rest fields 
Make sure that all ede compiler objects are cached in 
@code{ede-linker-list}.
@end deffn
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.