ede.texi: Remove documentation for features only in CEDET upstream.
[bpt/emacs.git] / doc / misc / ede.texi
1 \input texinfo
2 @setfilename ../../info/ede
3 @settitle Emacs Development Environment
4 @documentencoding UTF-8
5
6 @copying
7 This file describes EDE, the Emacs Development Environment.
8
9 Copyright @copyright{} 1998--2001, 2004--2005, 2008--2014
10 Free Software Foundation, Inc.
11
12 @quotation
13 Permission is granted to copy, distribute and/or modify this document
14 under the terms of the GNU Free Documentation License, Version 1.3 or
15 any later version published by the Free Software Foundation; with no
16 Invariant Sections, with the Front-Cover texts being ``A GNU Manual,''
17 and with the Back-Cover Texts as in (a) below. A copy of the license
18 is included in the section entitled ``GNU Free Documentation License.''
19
20 (a) The FSF's Back-Cover Text is: ``You have the freedom to copy and
21 modify this GNU manual.''
22 @end quotation
23 @end copying
24
25 @dircategory Emacs misc features
26 @direntry
27 * EDE: (ede). The Emacs Development Environment.
28 @end direntry
29
30 @titlepage
31 @center @titlefont{EDE (The Emacs Development Environment)}
32 @sp 4
33 @center by Eric Ludlam
34 @page
35 @vskip 0pt plus 1filll
36 @insertcopying
37 @end titlepage
38 @page
39
40 @macro cedet{}
41 @i{CEDET}
42 @end macro
43
44 @macro semantic{}
45 @i{Semantic}
46 @end macro
47
48 @macro srecode{}
49 @i{SRecode}
50 @end macro
51
52 @macro eieio{}
53 @i{EIEIO}
54 @end macro
55
56 @macro ede{}
57 @i{EDE}
58 @end macro
59
60 @macro cogre{}
61 @i{COGRE}
62 @end macro
63
64 @macro speedbar{}
65 @i{Speedbar}
66 @end macro
67
68 @contents
69
70 @node Top, EDE Project Concepts, (dir), (dir)
71 @top EDE
72 @comment node-name, next, previous, up
73
74 @ede{} is the Emacs Development Environment: an Emacs extension that
75 simplifies building and debugging programs in Emacs. It attempts to
76 emulate a typical IDE (Integrated Development Environment). @ede{}
77 can manage or create your makefiles and other building environment
78 duties, allowing you to concentrate on writing code rather than
79 support files. It aims to make it much easier for new programmers to
80 learn and adopt GNU ways of doing things.
81
82 @ifnottex
83 @insertcopying
84 @end ifnottex
85
86 @menu
87 * EDE Project Concepts:: @ede{} Project Concepts
88 * EDE Mode:: Turning on @ede{} mode.
89 * Quick Start:: Quick start to building a project.
90 * Creating a project:: Creating a project.
91 * Modifying your project:: Adding and removing files and targets.
92 * Building and Debugging:: Initiating a build or debug session.
93 * Miscellaneous commands:: Other project related commands.
94 * Extending EDE:: Programming and extending @ede{}.
95 * GNU Free Documentation License:: The license for this documentation.
96 @end menu
97
98 @node EDE Project Concepts, EDE Mode, Top, Top
99 @chapter @ede{} Project Concepts
100
101 @ede{} is a generic interface for managing projects. It specifies a
102 single set of menus and keybindings, while supporting multiple ways to
103 express a project via a build system.
104
105 In the subsequent chapters, we will describe the different project
106 types (@pxref{Creating a project}), as well as the commands to build
107 and debug projects (@pxref{Building and Debugging}).
108
109 In @ede{}, a project hierarchy matches a directory hierarchy. The
110 project's topmost directory is called the @dfn{project root}, and its
111 subdirectories are @dfn{subprojects}.
112
113 Each project can contain multiple @dfn{targets}. A target, at the
114 simplest level, is a named collection of files within a project. A
115 target can specify two different types of information:
116
117 @enumerate
118 @item
119 A collection of files to be added to a distribution (e.g., a tarball
120 that you intend to distribute to others).
121
122 @item
123 A collection of files that can be built into something else (e.g., a
124 program or compiled documentation).
125 @end enumerate
126
127 Lastly, @ede{} provides a way for other tools to easily learn file
128 associations. For example, a program might need to restrict some sort
129 of search to files in a single target, or to discover the location of
130 documentation or interface files. @ede{} can provide this
131 information.
132
133 @node EDE Mode, Quick Start, EDE Project Concepts, Top
134 @chapter @ede{} Mode
135
136 @ede{} is implemented as a minor mode, which augments other modes such
137 as C mode, and Texinfo mode. You can enable @ede{} for all buffers by
138 running the command @code{global-ede-mode}, or by putting this in your
139 init file:
140
141 @example
142 (global-ede-mode t)
143 @end example
144
145 Activating @ede{} adds a menu named @samp{Development} to the menu
146 bar. This menu provides several menu items for high-level @ede{}
147 commands. These menu items, and their corresponding keybindings, are
148 independent of the type of project you are actually working on.
149
150 @node Quick Start, Creating a project, EDE Mode, Top
151 @chapter Quick Start
152
153 Once you have @ede{} enabled, you can create a project. This chapter
154 provides an example C++ project that will create Automake files for
155 compilation.
156
157 @section Step 1: Create root directory
158
159 First, lets create a directory for our project. For this example,
160 we'll start with something in @file{/tmp}.
161
162 @example
163 C-x C-f /tmp/myproject/README RET
164 M-x make-directory RET RET
165 @end example
166
167 Now put some plain text in your README file to start.
168
169 Now, lets create the project:
170
171 @example
172 M-x ede-new RET Automake RET myproject RET
173 @end example
174
175
176 Nothing visible happened, but if you use @code{dired} to look at the
177 directory, you should see this:
178
179 @example
180 /tmp/myproject:
181 total used in directory 32 available 166643476
182 drwxr-xr-x 2 zappo users 4096 2012-02-23 22:10 .
183 drwxrwxrwt 73 root root 20480 2012-02-23 22:10 ..
184 -rw-r--r-- 1 zappo users 195 2012-02-23 22:10 Project.ede
185 -rw-r--r-- 1 zappo users 10 2012-02-23 22:09 README
186 @end example
187
188 @section Step 2: Create Subdirectories and Files
189
190 We'll make a more complex project, so use dired to create some more
191 directories using the @kbd{+} key, and typing in new directories:
192
193 @example
194 + include RET
195 + src RET
196 @end example
197
198 Now I'll short-cut in this tutorial. Create the following files:
199
200 @file{include/myproj.hh}
201 @example
202 /** myproj.hh ---
203 */
204
205 #ifndef myproj_hh
206 #define myproj_hh 1
207
208 #define IMPORTANT_MACRO 1
209
210 int my_lib_function();
211
212 #endif // myproj_hh
213 @end example
214
215
216 @file{src/main.cpp}
217 @example
218 /** main.cpp ---
219 */
220
221 #include <iostream>
222 #include "myproj.hh"
223
224 int main() @{
225
226 @}
227
228 #ifdef IMPORTANT_MACRO
229 int my_fcn() @{
230
231 @}
232 #endif
233 @end example
234
235 @file{src/mylib.cpp}
236 @example
237 /** mylib.cpp ---
238 *
239 * Shared Library to build
240 */
241
242 int my_lib_function() @{
243
244 @}
245 @end example
246
247 @section Step 3: Create subprojects
248
249 @ede{} needs subdirectories to also have projects in them. You can
250 now create those projects.
251
252 With @file{main.cpp} as your current buffer, type:
253
254 @example
255 M-x ede-new RET Automake RET src RET
256 @end example
257
258 and in @file{myproj.hh} as your current buffer, type:
259
260 @example
261 M-x ede-new RET Automake RET include RET
262 @end example
263
264 These steps effectively only create the Project.ede file in which you
265 will start adding targets.
266
267 @section Step 4: Create targets
268
269 In order to build a program, you must have targets in your @ede{}
270 Projects. You can create targets either from a buffer, or from a
271 @code{dired} directory buffer.
272
273 Note: If for some reason a directory list buffer, or file does not have the
274 @samp{Project} menu item, or if @ede{} keybindings don't work, just
275 use @kbd{M-x revert-buffer RET} to force a refresh. Sometimes
276 creating a new project doesn't restart buffers correctly.
277
278 Lets start with the header file. In @file{include/myproj.hh}, you
279 could use the menu, but we will now start using the @ede{} command prefix
280 which is @kbd{C-c .}.
281
282 @example
283 C-c . t includes RET miscellaneous RET y
284 @end example
285
286
287 This creates a misc target for holding your includes, and then adds
288 myproj.hh to the target. Automake (the tool) has better ways to do
289 this, but for this project, it is sufficient.
290
291 Next, visit the @file{src} directory using dired. There should be a
292 @samp{Project} menu. You can create a new target with
293
294 @example
295 . t myprogram RET program RET
296 @end example
297
298 Note that @kbd{. t} is a command for creating a target. This command
299 is also in the menu. This will create a target that will build a
300 program. If you want, visit @file{Project.ede} to see the structure
301 built so far.
302
303 Next, place the cursor on @file{main.cpp}, and use @kbd{. a} to add
304 that file to your target.
305
306 @example
307 . a myprogram RET
308 @end example
309
310 Note that these prompts often have completion, so you can just press
311 @kbd{TAB} to complete the name @file{myprogram}.
312
313 If you had many files to add to the same target, you could mark them
314 all in your dired buffer, and add them all at the same time.
315
316 Next, do the same for the library by placing the cursor on @file{mylib.cpp}.
317
318 @example
319 . t mylib RET sharedobject RET
320 . a mylib RET
321 @end example
322
323 @section Step 5: Compile, and fail
324
325 Next, we'll try to compile the project, but we aren't done yet, so it
326 won't work right away.
327
328 Visit @file{/tmp/myproject/Project.ede}. We're starting here because
329 we don't have any program files in this directory yet. Now we can use
330 the compile command:
331
332 @example
333 C-c . C
334 @end example
335
336 Because this is the very first time, it will create a bunch of files
337 for you that are required by Automake. It will then use automake to
338 build the support infrastructure it needs. This step is skipped if
339 you choose just a @file{Makefile} build system.
340
341 After the Automake init, it runs compile. You will immediately
342 discover the error in main.cpp can't find @file{myproj.hh}. We need
343 to go fix this.
344
345 @section Step 6: Customizing your project
346
347 To fix the failed compile, we need to add
348 @file{/tmp/myproject/include} to the include path.
349
350 Visit @file{main.cpp}.
351
352 @example
353 M-x customize-project RET
354 @end example
355
356 Select the @samp{[Settings]} subgroup of options. Under
357 @samp{Variable :} click @samp{[INS]}. At this point, you need to be
358 somewhat savvy with Automake. Add a variable named @samp{CPPFLAGS},
359 and set the value to @samp{../include}.
360
361 You should see something like this:
362
363 @example
364 Variables :
365 [INS] [DEL] Cons-cell:
366 Name: AM_CPPFLAGS
367 Value: -I../include
368 [INS]
369 Variables to set in this Makefile.
370 @end example
371
372 Click @samp{[Apply]}. Feel free to visit @file{Project.ede} to see
373 how it changed the config file.
374
375 Compile the whole project again with @kbd{C-c . C} from
376 @file{main.cpp}. It should now compile.
377
378 @section Step 7: Shared library dependency
379
380 Note: Supporting shared libraries for Automake in this way is easy,
381 but doing so from a project of type Makefile is a bit tricky. If you
382 are creating shared libraries too, stick to Automake projects.
383
384 Next, lets add a dependency from @file{main.cpp} on our shared
385 library. To do that, update main like this:
386
387 @example
388 int main() @{
389
390 my_lib_function();
391
392 @}
393 @end example
394
395 Now compile with:
396
397 @example
398 C-c . c
399 @end example
400
401 where the lower case @kbd{c} compiles just that target. You should
402 see an error.
403
404 This time, we need to add a dependency from @file{main.cpp} on our shared
405 library. To do that, we need to customize our target instead of the
406 project. This is because variables such as the include path are
407 treated globally, whereas dependencies for a target are target specific.
408
409 @example
410 M-x customize-target RET
411 @end example
412
413 On the first page, you will see an Ldlibs-local section. Add mylib to
414 it by first clicking @samp{[INS]}, and they adding the library. It
415 should look like this:
416
417 @example
418 Ldlibs-Local :
419 [INS] [DEL] Local Library: libmylib.la
420 [INS]
421 Libraries that are part of this project. [Hide Rest]
422 The full path to these libraries should be specified, such as:
423 ../lib/libMylib.la or ../ar/myArchive.a
424 @end example
425
426 You will also see other variables for library related flags and system
427 libraries if you need them. Click @samp{[Accept]}, and from
428 @file{main.cpp}, again compile the whole project to force all
429 dependent elements to compile:
430
431 @example
432 C-c . C
433 @end example
434
435 @section Step 8: Run your program
436
437 You can run your program directly from @ede{}.
438
439 @example
440 C-c . R RET RET
441 @end example
442
443 If your program takes command line arguments, you can type them in
444 when it offers the command line you want to use to run your program.
445
446 @node Creating a project, Modifying your project, Quick Start, Top
447 @chapter Creating a project
448
449 To create a new project, first visit a file that you want to include
450 in that project. If you have a hierarchy of directories, first visit
451 a file in the topmost directory. From this buffer, type @kbd{M-x
452 ede-new}, or click on the @samp{Create Project} item in the
453 @samp{Development} menu.
454
455 The @command{ede-new} command prompts for the type of project you
456 would like to create. Each project type has its own benefits or
457 language specific enhancements. Not all projects that @ede{} supports
458 also allow creating a new project. Projects such as @code{emacs}
459 or @code{linux} are designed to recognize existing projects only.
460 Project types such as @samp{Make} and @samp{Automake} do support
461 creating new project types with @command{ede-new}.
462
463 @itemize
464 @item
465 For the @samp{Make} project type, @ede{} creates a @dfn{project file},
466 called @file{Project.ede}, in each project directory. Information
467 about the project is stored in this file. This project autogenerates
468 a @file{Makefile}.
469
470 @item
471 For the @samp{Automake} project type, @ede{} creates a
472 @file{Project.ede} project file similar to a @samp{Make} project.
473 Unlike a @samp{Make} project, this project autogenerates a
474 @file{Makefile.am} file. @ede{} handles the Automake bootstrapping
475 routines, which import and maintain a @file{configure.am} script and
476 other required files.
477 @end itemize
478
479 A subproject is merely a project in a subdirectory of another project.
480 You can create a subproject by using the @command{ede-new} command (or
481 the @samp{Create Project} menu item), while visiting a buffer in a
482 subdirectory of the project root. This new project is automatically
483 added to the parent project, and will be automatically loaded when
484 @ede{} reads the parent project.
485
486 When using a project command that involves a makefile, @ede{} uses
487 the top-most project's makefile as a starting place for the build. How
488 the toplevel project handles subprojects in the build process is
489 dependent on that project's type.
490
491 @node Modifying your project, Building and Debugging, Creating a project, Top
492 @chapter Modifying your project
493
494 In this chapter, we describe the generic features for manipulating
495 projects, including the targets and files within them. Subsequent
496 chapters, which describe specific project types, will provide more
497 detailed information about exactly what these features do.
498
499 @menu
500 * Add/Remove target::
501 * Add/Remove files::
502 * Customize Features::
503 * Project Local Variables::
504 * EDE Project Features::
505 @end menu
506
507 @node Add/Remove target, Add/Remove files, Modifying your project, Modifying your project
508 @section Add/Remove target
509
510 To create a new target, type @kbd{C-c . t} (@code{ede-new-target}) or
511 use the @samp{Add Target} menu item in the @samp{Project Options}
512 submenu. This prompts for a target name, and adds the current buffer
513 to that target.
514
515 The @command{ede-new-target} command also prompts for a @dfn{target
516 type}. Each target type has its own build process and class of files
517 that it will accept.
518
519 To remove a target from the project, type @kbd{M-x ede-delete-target},
520 or use the @samp{Remove Target} menu item in the @samp{Project
521 Options} submenu.
522
523 @node Add/Remove files, Customize Features, Add/Remove target, Modifying your project
524 @section Add/Remove files
525
526 To add the current file to an existing target, type @kbd{C-c . a}
527 (@code{ede-add-file}), or use the @samp{Add File} menu item in the
528 @samp{Target Options} submenu.
529
530 You can add a file to more than one target; this is OK.
531
532 To remove the current file from a target, type @kbd{C-c . d}
533 (@code{ede-remove-file}), or use the @samp{Remove File} menu item
534 in the @samp{Target Options} submenu. If the file belongs to multiple
535 targets, this command prompts for each target it could be removed
536 from.
537
538 While working in a project, if you visit a file that is not part of an
539 existing target, @ede{} automatically prompts for a target. If you do
540 not wish to add the file to any target, you can choose @samp{none}.
541 You can customize this behavior with the variable
542 @command{ede-auto-add-method}.
543
544 @node Customize Features, Project Local Variables, Add/Remove files, Modifying your project
545 @section Customize Features
546
547 A project, and its targets, are objects using the @samp{EIEIO} object
548 system. @xref{Top,,,eieio,EIEIO manual}. These objects have data
549 fields containing important information related to your work.
550
551 If the high-level functions aren't enough, you can tweak all
552 user-customizable fields at any time by running the command
553 @command{customize-project} or @command{customize-target}. This loads
554 the current project or target into a customization buffer, where you
555 can tweak individual slots. This is usually necessary for complex
556 projects.
557
558 Some project modes do not have a project file, but directly read a
559 Makefile or other existing file. Instead of directly editing the
560 object, you can edit the file by typing @kbd{C-c . e}
561 (@code{ede-edit-file-target}). You should ``rescan'' the project
562 afterwards (@pxref{Miscellaneous commands}).
563
564 @node Project Local Variables, EDE Project Features, Customize Features, Modifying your project
565 @section Project Local Variables
566
567 EDE projects can store and manager project local variables. The
568 variables are stored in the project, and will be restored when a
569 project reloads.
570
571 Projects which are not stored on disk WILL NOT restore your project
572 local variables later.
573
574 You can use @ref{Customize Features} to of the project to edit the
575 project local variables. They are under the 'Settings' group as
576 ``Project Local Variables''.
577
578 You can also use @kbd{M-x ede-set} to set a new variable local in the
579 mini buffer.
580
581 In multi-level projects such as Automake and Make generating projects,
582 project local variables are installed from both the TOP most project,
583 and the local directory's project. In that way, you can have some
584 variables across your whole project, and some specific to a
585 subdirectory.
586
587 You can use project local variables to set any Emacs variable so that
588 buffers belonging to different projects can have different settings.
589
590 NOTE: When you use project-local variables with @ref{ede-cpp-root},
591 the format is an association list. For example:
592
593 @example
594 (ede-cpp-root-project "SOMENAME"
595 :file "/dir/to/some/file"
596 :local-variables
597 '((grep-command . "grep -nHi -e ")
598 (compile-command . "make -f MyCustomMakefile all")))
599 @end example
600
601 @node EDE Project Features, , Project Local Variables, Modifying your project
602 @section EDE Project Features
603
604 This section details user facing features of an @ede{} @samp{Make}
605 style project. An @samp{Automake} project has similar options (but a
606 direct Automake project does not).
607
608 To modify any of the specific features mentioned here, you need to
609 customize the project or target with @command{customize-project} or
610 @command{customize-target}.
611
612 When you are customizing, you are directly manipulating slot values in
613 @eieio{} objects. @xref{Extending EDE}, if you are interested in
614 additional details.
615
616 @menu
617 * Changing Compilers and Flags::
618 * Configurations::
619 @end menu
620
621 @node Changing Compilers and Flags, Configurations, EDE Project Features, EDE Project Features
622 @subsection Changing Compilers and Flags
623
624 Targets that build stuff need compilers. To change compilers, you
625 need to customize the desired target.
626
627 In the @samp{[Make]} section, you can choose a new compiler or linker
628 from the list. If a linker you need is not available, you will need
629 to create a new one. @xref{Compiler and Linker objects}.
630
631 If an existing compiler or linker is close, but you need to modify
632 some flag set such as adding an include path you will need to add a
633 configuration variable.
634
635 To start, you should create the basic setup, and construct a makefile
636 with @command{ede-proj-regenerate}. Look in the @file{Makefile} to
637 see what commands are inserted. Once you have determined the variable
638 you need to modify, you can add a configuration for it.
639 @xref{Configurations}.
640
641 @node Configurations, , Changing Compilers and Flags, EDE Project Features
642 @subsection Configurations
643
644 Configurations specify different ways to build a project. For
645 example, you may configure a project to be in ``debug'' mode, or
646 perhaps in ``release'' mode.
647
648 The project, and each target type all have a slot named
649 @code{configuration-variables}. To add new variables to a
650 configuration find this slot in the custom buffer, and insert a new
651 configuration. Name it either ``debug'' or ``release'', then insert
652 some number of name/value pairs to it.
653
654 You can have any number of valid configurations too. To add a new
655 configuration, customize your project. Work in the @samp{[Settings]}
656 block for ``configurations''. Add a new named configuration here.
657
658 To switch between different active configurations, modify the
659 ``configuration default'' slot.
660
661 @node Building and Debugging, Miscellaneous commands, Modifying your project, Top
662 @chapter Building and Debugging
663
664 @ede{} provides the following ``project-aware'' compilation and
665 debugging commands:
666
667 @table @kbd
668 @item C-c . c
669 Compile the current target (@code{ede-compile-target}).
670 @item C-c . C
671 Compile the entire project (@code{ede-compile-project}).
672 @item c-c . D
673 Debug the current target (@code{ede-debug-target}).
674 @item M-x ede-make-dist
675 Build a distribution file for your project.
676 @end table
677
678 These commands are also available from the @samp{Development} menu.
679
680 @node Miscellaneous commands, Extending EDE, Building and Debugging, Top
681 @chapter Miscellaneous commands
682
683 If you opt to go in and edit @ede{} project files directly---for
684 instance, by using @kbd{C-c . e} (@pxref{Customize Features})---you
685 must then ``rescan'' the project files to update the internal data
686 structures. To rescan the current project, type @kbd{C-c . g}
687 (@code{ede-rescan-toplevel}).
688
689 @ede{} can help you find files in your project, via the command
690 @kbd{C-c . f} (@code{ede-find-file}). This prompts for a file name;
691 you need not specify the directory. EDE then tries to visit a file
692 with that name somewhere in your project.
693
694 @ede{} can use external tools to help with file finding. To do this,
695 customize @code{ede-locate-setup-options}.
696
697 @defvar ede-locate-setup-options
698 @anchor{ede-locate-setup-options}
699 List of locate objects to try out by default.
700 Listed in order of preference. If the first item cannot be used in
701 a particular project, then the next one is tried.
702 It is always assumed that @dfn{ede-locate-base} is at end of the list.
703 @end defvar
704
705 @ede{} also provides a project display mode for the speedbar
706 (@pxref{Speedbar,,,emacs,GNU Emacs Manual}). This allows you to view
707 your source files as they are structured in your project: as a
708 hierarchical tree, grouped according to target.
709
710 To activate the speedbar in this mode, type @kbd{C-c . s}
711 (@code{ede-speedbar}).
712
713 @menu
714 * Make and Automake projects:: Project types of @samp{ede-project}
715 * Automake direct projects:: Project interface on hand-written automake files.
716 * Simple projects:: Projects @ede{} doesn't manage.
717 @end menu
718
719 @node Make and Automake projects, Automake direct projects, Miscellaneous commands, Miscellaneous commands
720 @section Make and Automake projects
721
722 A project of @samp{ede-project} type creates a file called
723 @file{Project.ede} in every project directory. This is used to track
724 your configuration information. If you configure this project to be
725 in @samp{Makefile} mode, then this project will autogenerate a
726 @file{Makefile}. If you configure it in @samp{Automake} mode a
727 @file{Makefile.am} file will be created. The automake bootstrapping
728 routines will also import and maintain a configure.am script and a
729 host of other files required by Automake.
730
731 @node Automake direct projects, Simple projects, Make and Automake projects, Miscellaneous commands
732 @section Automake direct projects
733
734 The project type that reads @file{Makefile.am} directly is derived
735 from the sources of the original @file{project-am.el} mode that was
736 distributed independently. This mode eventually became @ede{}. The
737 @samp{project-am} project will read existing automake files, but will
738 not generate them automatically, or create new ones. As such, it is
739 useful as a browsing tool, or as maintenance in managing file lists.
740
741 @node Simple projects, , Automake direct projects, Miscellaneous commands
742 @section Simple Projects
743
744 There is a wide array of simple projects. In this case a simple
745 project is one that detects, or is directed to identify a directory as
746 belonging to a project, but doesn't provide many features of a typical
747 @ede{} project. Having the project however allows tools such as
748 @semantic{} to find sources and perform project level completions.
749
750
751 @menu
752 * ede-cpp-root:: This project marks the root of a C/C++ code project.
753 * ede-emacs:: A project for working with Emacs.
754 * ede-linux:: A project for working with Linux kernels.
755 * ede-generic-project:: A project type for wrapping build systems with EDE.
756 * Custom Locate:: Customizing how to locate files in a simple project
757 @end menu
758
759 @node ede-cpp-root, ede-emacs, Simple projects, Simple projects
760 @subsection ede-cpp-root
761
762 The @code{ede-cpp-root} project type allows you to create a single
763 object with no save-file in your @file{.emacs} file. It allows @ede{}
764 to provide the @semantic{} package with the ability to find header
765 files quickly.
766
767 The @code{ede-cpp-root} class knows a few things about C++ projects,
768 such as the prevalence of "include" directories, and typical
769 file-layout stuff. If this isn't sufficient, you can subclass
770 @code{ede-cpp-root-project} and add your own tweaks in just a few
771 lines. See the end of this file for an example.
772
773 In the most basic case, add this to your @file{.emacs} file, modifying
774 appropriate bits as needed.
775
776 @example
777 (ede-cpp-root-project "SOMENAME" :file "/dir/to/some/file")
778 @end example
779
780 Replace @var{SOMENAME} with whatever name you want, and the filename
781 to an actual file at the root of your project. It might be a
782 Makefile, a README file. Whatever. It doesn't matter. It's just a
783 key to hang the rest of @ede{} off of.
784
785 The most likely reason to create this project, is to speed up
786 searching for includes files, or to simplify bootstrapping @semantic{}'s
787 ability to find files without much user interaction. In conjunction
788 with @semantic{} completion, having a short include path is key. You can
789 override the default include path and system include path like this:
790
791 @example
792 (ede-cpp-root-project "NAME" :file "FILENAME"
793 :include-path '( "/include" "../include" "/c/include" )
794 :system-include-path '( "/usr/include/c++/3.2.2/" )
795 :spp-table '( ("MOOSE" . "")
796 ("CONST" . "const") ) )
797 @end example
798
799 In this case each item in the include path list is searched. If the
800 directory starts with "/", then that expands to the project root
801 directory. If a directory does not start with "/", then it is
802 relative to the default-directory of the current buffer when the file
803 name is expanded.
804
805 The include path only affects C/C++ header files. Use the slot
806 @code{:header-match-regexp} to change it.
807
808 The @code{:system-include-path} allows you to specify full directory
809 names to include directories where system header files can be found.
810 These will be applied to files in this project only.
811
812 The @code{:spp-table} provides a list of project specific #define
813 style macros that are unique to this project, passed in to the
814 compiler on the command line, or are in special headers.
815 See the @code{semantic-lex-c-preprocessor-symbol-map} for more
816 on how to format this entry.
817
818 If there is a single file in your project, you can instead set the
819 @code{:spp-files} to a list of file names relative to the root of your
820 project. Specifying this is like setting the variable
821 @code{semantic-lex-c-preprocessor-symbol-file} in semantic.
822
823 If you want to override the file-finding tool with your own
824 function you can do this:
825
826 @example
827 (ede-cpp-root-project "NAME" :file "FILENAME" :locate-fcn 'MYFCN)
828 @end example
829
830 Where @var{MYFCN} is a symbol for a function. The locate function can
831 be used in place of @code{ede-expand-filename} so you can quickly
832 customize your custom target to use specialized local routines instead
833 of the default @ede{} routines. The function symbol must take two
834 arguments:
835
836 @table @var
837 @item NAME
838 The name of the file to find.
839 @item DIR
840 The directory root for this cpp-root project.
841 @end table
842
843 When creating a project with @code{ede-cpp-root}, you can get
844 additional configurations via @ref{Project Local Variables}. Be aware
845 that the format for project local variables is an association list.
846 You cannot use @kbd{M-x ede-set} and have your project local variables
847 persist between sessions.
848
849 If the cpp-root project style is right for you, but you want a dynamic
850 loader, instead of hard-coding path name values in your @file{.emacs}, you
851 can do that too, but you will need to write some lisp code.
852
853 To do that, you need to add an entry to the
854 @code{ede-project-class-files} list, and also provide two functions to
855 teach @ede{} how to load your project pattern
856
857 It would look like this:
858
859 @example
860 (defun MY-FILE-FOR-DIR (&optional dir)
861 "Return a full file name to the project file stored in DIR."
862 <write your code here, or return nil>
863 )
864
865 (defun MY-ROOT-FCN ()
866 "Return the root fcn for `default-directory'"
867 ;; You might be able to use `ede-cpp-root-project-root'
868 ;; and not write this at all.
869 )
870
871 (defun MY-LOAD (dir)
872 "Load a project of type `cpp-root' for the directory DIR.
873 Return nil if there isn't one."
874 ;; Use your preferred construction method here.
875 (ede-cpp-root-project "NAME" :file (expand-file-name "FILE" dir)
876 :locate-fcn 'MYFCN)
877 )
878
879 (add-to-list 'ede-project-class-files
880 (ede-project-autoload "cpp-root"
881 :name "CPP ROOT"
882 :file 'ede-cpp-root
883 :proj-file 'MY-FILE-FOR-DIR
884 :proj-root 'MY-ROOT-FCN
885 :load-type 'MY-LOAD
886 :class-sym 'ede-cpp-root)
887 t)
888 @end example
889
890 This example only creates an auto-loader, and does not create a new kind
891 of project.
892
893 @xref{ede-cpp-root-project}, for details about the class that defines
894 the @code{ede-cpp-root} project type.
895
896 @node ede-emacs, ede-linux, ede-cpp-root, Simple projects
897 @subsection ede-emacs
898
899 The @code{ede-emacs} project automatically identifies an Emacs source
900 tree, and enables EDE project mode for it.
901
902 It pre-populates the C Preprocessor symbol map for correct parsing,
903 and has an optimized include file identification function.
904
905 @node ede-linux, ede-generic-project, ede-emacs, Simple projects
906 @subsection ede-linux
907
908 The @code{ede-linux} project will automatically identify a Linux
909 Kernel source tree, and enable EDE project mode for it.
910
911 It pre-populates the C Preprocessor symbol map for reasonable parsing,
912 and has an optimized include file identification function.
913
914 @node ede-generic-project, Custom Locate, ede-linux, Simple projects
915 @subsection ede-generic-project
916
917 The @code{ede-generic-project} is a project system that makes it easy
918 to wrap up different kinds of build systems as an EDE project.
919 Projects such as @ref{ede-emacs} require coding skills to create.
920 Generic projects also require writing Emacs Lisp code, but the
921 requirements are minimal. You can then use
922 @command{customize-project} to configure build commands, includes, and
923 other options for that project. The configuration is saved in
924 @file{EDEConfig.el}.
925
926 Generic projects are disabled by default because they have the
927 potential to interfere with other projects. To use the generic
928 project system to start detecting projects, you need to enable it.
929
930 @deffn Command ede-enable-generic-projects
931 Enable generic project loaders.
932
933 This enables generic loaders for projects that are detected using
934 either a @file{Makefile}, @file{SConstruct}, or @file{CMakeLists}.
935
936 You do not need to use this command if you create your own generic
937 project type.
938 @end deffn
939
940 If you want to create your own generic project loader, you need to
941 define your own project and target classes, and create an autoloader.
942 The example for Makefiles looks like this:
943
944 @example
945 ;;; MAKEFILE
946
947 (defclass ede-generic-makefile-project (ede-generic-project)
948 ((buildfile :initform "Makefile")
949 )
950 "Generic Project for makefiles.")
951
952 (defmethod ede-generic-setup-configuration ((proj ede-generic-makefile-project) config)
953 "Setup a configuration for Make."
954 (oset config build-command "make -k")
955 (oset config debug-command "gdb ")
956 )
957
958 (ede-generic-new-autoloader "generic-makefile" "Make"
959 "Makefile" 'ede-generic-makefile-project)
960 @end example
961
962 This example project will detect any directory with the file
963 @file{Makefile} in it as belonging to this project type.
964 Customization of the project will allow you to make build and debug
965 commands more precise.
966
967 @node Custom Locate, , ede-generic-project, Simple projects
968 @subsection Custom Locate
969
970 The various simple project styles all have one major drawback, which
971 is that the files in the project are not completely known to EDE@.
972 When the EDE API is used to try and file files by some reference name
973 in the project, then that could fail.
974
975 @ede{} can therefore use some external locate commands, such as the unix
976 ``locate'' command, or ``GNU Global''.
977
978 Configuration of the tool you want to use such as @code{locate}, or
979 @code{global} will need to be done without the aid of @ede{}. Once
980 configured, however, @ede{} can use it.
981
982 To enable one of these tools, set the variable
983 @code{ede-locate-setup-options} with the names of different locate
984 objects. @ref{Miscellaneous commands}.
985
986 Configure this in your @file{.emacs} before loading in CEDET or EDE@.
987 If you want to add support for GNU Global, your configuration would
988 look like this:
989
990 @example
991 (setq ede-locate-setup-options '(ede-locate-global ede-locate-base))
992 @end example
993
994 That way, when a search needs to be done, it will first try using
995 GLOBAL@. If global is not available for that directory, then it will
996 revert to the base locate object. The base object always fails to
997 find a file.
998
999 You can add your own locate tool but subclassing from
1000 @code{ede-locate-base}. The subclass should also implement two
1001 methods. See the code in @file{ede-locate.el} for GNU Global as a
1002 simple example.
1003
1004 @@TODO - Add ID Utils and CScope examples
1005
1006 More on idutils and cscope is in the CEDET manual, and they each have
1007 their own section.
1008
1009 @node Extending EDE, GNU Free Documentation License, Miscellaneous commands, Top
1010 @chapter Extending @ede{}
1011
1012 This chapter is intended for users who want to write new parts or fix
1013 bugs in @ede{}. A knowledge of Emacs Lisp, and some @eieio{}(CLOS) is
1014 required.
1015
1016 @ede{} uses @eieio{}, the CLOS package for Emacs, to define two object
1017 superclasses, specifically the PROJECT and TARGET@. All commands in
1018 @ede{} are usually meant to address the current project, or current
1019 target.
1020
1021 All specific projects in @ede{} derive subclasses of the @ede{}
1022 superclasses. In this way, specific behaviors such as how a project
1023 is saved, or how a target is compiled can be customized by a project
1024 author in detail. @ede{} communicates to these project objects via an
1025 API using methods. The commands you use in @ede{} mode are high-level
1026 functional wrappers over these methods. @xref{Top,,, eieio, EIEIO manual}. For
1027 details on using @eieio{} to extending classes, and writing methods.
1028
1029 If you intend to extend @ede{}, it is most likely that a new target type is
1030 needed in one of the existing project types. The rest of this chapter
1031 will discuss extending the @code{ede-project} class, and it's targets.
1032 See @file{project-am.el} for basic details on adding targets to it.
1033
1034 For the @code{ede-project} type, the core target class is called
1035 @code{ede-proj-target}. Inheriting from this will give you everything
1036 you need to start, including adding your sources into the makefile. If
1037 you also need additional rules in the makefile, you will want to inherit
1038 from @code{ede-proj-target-makefile} instead. You may want to also add
1039 new fields to track important information.
1040
1041 If you are building currently unsupported code into a program or shared
1042 library, it is unlikely you need a new target at all. Instead you
1043 would need to create a new compiler or linker object that compiles
1044 source code of the desired type. @ref{Compiler and Linker objects}.
1045
1046 Once your new class exists, you will want to fill in some basic methods.
1047 See the @file{ede-skel.el} file for examples of these. The files
1048 @file{ede-proj-info.el} and @file{ede-proj-elisp.el} are two interesting
1049 examples.
1050
1051 @menu
1052 * Development Overview::
1053 * Detecting a Project::
1054 * User interface methods:: Methods associated with keybindings
1055 * Base project methods:: The most basic methods on @ede{} objects.
1056 * Sourcecode objects:: Defining new sourcecode classes.
1057 * Compiler and Linker objects:: Defining new compilers and linkers.
1058 * Project:: Details of project classes.
1059 * Targets:: Details of target classes.
1060 * Sourcecode:: Details of source code classes.
1061 * Compilers:: Details of compiler classes.
1062 @end menu
1063
1064 @node Development Overview, Detecting a Project, Extending EDE, Extending EDE
1065 @section Development Overview
1066
1067 @ede{} is made up of a series of classes implemented with @eieio{}.
1068 These classes define an interface that can be used to create different
1069 types of projects.
1070
1071 @ede{} defines two superclasses which are @code{ede-project} and
1072 @code{ede-target}. All commands in @ede{} are usually meant to
1073 address the current project, or current target.
1074
1075 All specific projects in @ede{} derive subclasses of the @ede{} superclasses.
1076 In this way, specific behaviors such as how a project is saved, or how a
1077 target is compiled can be customized by a project author in detail. @ede{}
1078 communicates to these project objects via an API using methods. The
1079 commands you use in @ede{} mode are high-level functional wrappers over
1080 these methods.
1081
1082 Some example project types are:
1083
1084 @table @code
1085 @item project-am
1086 Automake project which reads existing Automake files.
1087 @item ede-proj-project
1088 This project type will create @file{Makefiles},
1089 or @file{Makefile.am} files to compile your project.
1090 @item ede-linux
1091 This project type will detect linux source trees.
1092 @item ede-emacs
1093 This project will detect an Emacs source tree.
1094 @end table
1095
1096 There are several other project types as well.
1097
1098 The first class you need to know to create a new project type is
1099 @code{ede-project-autoload}. New instances of this class are needed
1100 to define how Emacs associates different files/buffers with different
1101 project types. All the autoloads are kept in the variable
1102 @code{ede-project-class-files}.
1103
1104 The next most important class to know is @code{ede-project}. This is
1105 the baseclass defines how all projects behave. The basic pattern for
1106 a project is that there is one project per directory, and the topmost
1107 project or directory defines the project as a whole.
1108
1109 Key features of @code{ede-project} are things like name and version
1110 number. It also holds a list of @code{ede-target} objects and a list
1111 of sub projects, or more @code{ede-project} objects.
1112
1113 New project types must subclass @code{ede-project} to add special
1114 behavior. New project types also need to subclass @code{ede-target} to
1115 add specialty behavior.
1116
1117 In this way, the common @ede{} interface is designed to work against
1118 @code{ede-project}, and thus all subclasses.
1119
1120 @code{ede-project} subclasses @code{ede-project-placeholder}. This is
1121 the minimum necessary project needed to be cached between runs of
1122 Emacs. This way, Emacs can track all projects ever seen, without
1123 loading those projects into memory.
1124
1125 Here is a high-level UML diagram for the @ede{} system created with @cogre{}..
1126
1127 @example
1128 +-----------------------+ +-----------------------+
1129 | | |ede-project-placeholder|
1130 |ede-project-class-files| +-----------------------+
1131 | | +-----------------------+
1132 +-----------------------+ +-----------------------+
1133 /\ ^
1134 \/ /_\
1135 | |
1136 +--------------------+ +-----------+ +----------+
1137 |ede-project-autoload| |ede-project| |ede-target|
1138 +--------------------+<>--------------+-----------+<>-------+----------+
1139 +--------------------+ +-----------+ +----------+
1140 +--------------------+ +-----------+ +----------+
1141 ^
1142 /_\
1143 |
1144 +---------------------+-----------------+
1145 | | |
1146 | | |
1147 | | |
1148 +----------------+ +-------------------+ +---------+
1149 |ede-proj-project| |project-am-makefile| |ede-emacs|
1150 +----------------+ +-------------------+ +---------+
1151 +----------------+ +-------------------+ +---------+
1152 +----------------+ +-------------------+ +---------+
1153 @end example
1154
1155
1156 @node Detecting a Project, User interface methods, Development Overview, Extending EDE
1157 @section Detecting a Project
1158
1159 Project detection happens with the list of @code{ede-project-autoload}
1160 instances stored in @code{ede-project-class-files}. The full project
1161 detection scheme works like this:
1162
1163 @table @asis
1164 @item Step 1:
1165 @code{find-file-hook} calls @code{ede-turn-on-hook} on BUFFER.
1166 @item Step 2:
1167 @code{ede-turn-on-hook} turns on @code{ede-minor-mode}
1168 @item Step 3:
1169 @code{ede-minor-mode} looks to see if BUFFER is associated with any
1170 open projects. If not, it calls @code{ede-load-project-file} to find
1171 a project associated with the current directory BUFFER is in.
1172 @item Step 4:
1173 @code{ede-minor-mode} associates the found project with the current
1174 buffer with a series of variables, such as @code{ede-object}, and
1175 @code{ede-object-project} and @code{ede-object-root-project}.
1176 @end table
1177
1178 Once a buffer is associated, @ede{} minor mode commands will operate
1179 on that buffer.
1180
1181 The function @code{ede-load-project-file} is at the heart of detecting
1182 projects, and it works by looping over all the known project autoload
1183 types in @code{ede-project-autoload} using the utility
1184 @code{ede-directory-project-p}.
1185
1186 The function @code{ede-directory-project-p} will call
1187 @code{ede-dir-to-projectfile} on every @code{ede-project-autoload}
1188 until one of them returns true. The method
1189 @code{ede-dir-to-projectfile} in turn gets the @code{:proj-file} slot
1190 from the autoload. If it is a string (i.e., a project file name), it
1191 checks to see if that exists in BUFFER's directory. If it is a
1192 function, then it calls that function and expects it to return a file
1193 name or nil. If the file exists, then this directory is assumed to be
1194 part of a project, and @code{ede-directory-project-p} returns the
1195 instance of @code{ede-project-autoload} that matched.
1196
1197 If the current directory contains the file @code{.ede-ignore} then
1198 that directory is automatically assumed to contain no projects, even
1199 if there is a matching pattern. Use this type of file in a directory
1200 that may contain many other sub projects, but still has a Makefile of
1201 some sort.
1202
1203 If the current directory is a project, then @ede{} scans upwards till
1204 it finds the top of the project. It does this by calling
1205 @code{ede-toplevel-project}. If this hasn't already been discovered,
1206 the directories as scanned upward one at a time until a directory with
1207 no project is found. The last found project becomes the project
1208 root. If the found instance of @code{ede-project-autoload} has a
1209 valid @code{proj-root} slot value, then that function is called instead
1210 of scanning the project by hand. Some project types have a short-cut
1211 for determining the root of a project, so this comes in handy.
1212
1213 Getting back to @code{ede-load-project-file}, this now has an instance
1214 of @code{ede-project-autoload}. It uses the @code{load-type} slot to
1215 both autoload in the project type, and to create a new instance of the
1216 project type found for the root of the project. That project is added
1217 to the global list of all projects. All subprojects are then created
1218 and assembled into the project data structures.
1219
1220
1221 @node User interface methods, Base project methods, Detecting a Project, Extending EDE
1222 @section User interface methods
1223
1224 These methods are core behaviors associated with user commands.
1225 If you do not implement a method, there is a reasonable default that
1226 may do what you need.
1227
1228 @table @code
1229 @item project-add-file
1230 Add a file to your project. Override this if you want to put new
1231 sources into different fields depending on extension, or other details.
1232 @item project-remove-file
1233 Reverse of project-add-file.
1234 @item project-compile-target
1235 Override this if you want to do something special when the user
1236 "compiles" this target.
1237 @item project-debug-target
1238 What to do when a user wants to debug your target.
1239 @item project-update-version
1240 Easily update the version number of your project.
1241 @item project-edit-file-target
1242 Edit the file the project's information is stored in.
1243 @item project-new-target
1244 Create a new target in a project.
1245 @item project-delete-target
1246 Delete a target from a project.
1247 @item project-make-dist
1248 Make a distribution (tar archive) of the project.
1249 @item project-rescan
1250 Rescan a project file, changing the data in the existing objects.
1251 @end table
1252
1253 @node Base project methods, Sourcecode objects, User interface methods, Extending EDE
1254 @section Base project methods
1255
1256 These methods are important for querying base information from project
1257 and target types:
1258
1259 @table @code
1260 @item ede-name
1261 Return a string that is the name of this target.
1262 @item ede-target-name
1263 Return a string that is the name of the target used by a Make system.
1264 @item ede-description
1265 A brief description of the project or target. This is currently used
1266 by the @samp{ede-speedbar} interface.
1267 @item ede-want-file-p
1268 Return non-nil if a target will accept a given file.
1269 It is generally unnecessary to override this. See the section on source
1270 code.
1271 @item ede-buffer-mine
1272 Return non-nil if a buffer belongs to this target. Used during
1273 association when a file is loaded. It is generally unnecessary to
1274 override this unless you keep auxiliary files.
1275 @end table
1276
1277 These methods are used by the semantic package extensions.
1278 @xref{Top,,, semantic, Semantic manual}.
1279
1280 @table @code
1281 @item ede-buffer-header-file
1282 Return a header file belonging to a given buffer. Prototypes are place
1283 there when appropriate
1284 @item ede-buffer-documentation-files
1285 Return the documentation file information about this file would be
1286 stored in.
1287 @item ede-documentation
1288 List all documentation a project or target is responsible for.
1289 @end table
1290
1291 @node Sourcecode objects, Compiler and Linker objects, Base project methods, Extending EDE
1292 @section Sourcecode objects
1293
1294 @ede{} projects track source file / target associates via source code
1295 objects. The definitions for this is in @file{ede-source.el}. A source
1296 code object contains methods that know how to identify a file as being
1297 of that class, (i.e., a C file ends with @file{.c}). Some targets can
1298 handle many different types of sources which must all be compiled
1299 together. For example, a mixed C and C++ program would have
1300 instantiations of both sourcecode types.
1301
1302 When a target needs to know if it will accept a source file, it
1303 references its list of source code objects. These objects then make
1304 that decision.
1305
1306 Source code objects are stored in the target objects as a list of
1307 symbols, where the symbol's value is the object. This enables the
1308 project save file mechanism to work.
1309
1310 Here is an example for an instantiation of an Emacs Lisp source code object:
1311
1312 @example
1313 (defvar ede-source-emacs
1314 (ede-sourcecode "ede-emacs-source"
1315 :name "Emacs Lisp"
1316 :sourcepattern "\\.el$"
1317 :garbagepattern '("*.elc"))
1318 "Emacs Lisp source code definition.")
1319 @end example
1320
1321 If you want to recycle parts of an existing sourcecode object, you can
1322 clone the original, and then just tweak the parts that are different.
1323 For example:
1324
1325 @example
1326 (defvar ede-source-emacs-autoload
1327 (clone ede-source-emacs "ede-source-emacs-autoload"
1328 :name "Emacs Lisp Autoload"
1329 :sourcepattern "-loaddefs\\.el")
1330 "Emacs Lisp autoload source code.")
1331 @end example
1332
1333 In this case, the garbage pattern is the same.
1334
1335 @xref{Sourcecode}.
1336
1337 @node Compiler and Linker objects, Project, Sourcecode objects, Extending EDE
1338 @section Compiler and Linker objects
1339
1340 In order for a target to create a @file{Makefile}, it must know how to
1341 compile the sources into the program or desired data file, and
1342 possibly link them together.
1343
1344 A compiler object instantiation is used to associate a given target
1345 with a given source code type. Some targets can handle many types of
1346 sources, and thus has many compilers available to it. Some targets
1347 may have multiple compilers for a given type of source code.
1348
1349 @ede{} will examine the actual source files in a target, cross reference
1350 that against the compiler list to come up with the final set of
1351 compilers that will be inserted into the Makefile.
1352
1353 Compiler instantiations must also insert variables specifying the
1354 compiler it plans to use, in addition to creating Automake settings for
1355 @file{configure.ac} when appropriate.
1356
1357 Compiler objects are stored in the target objects as a list of
1358 symbols, where the symbols value is the object. This enables the
1359 project output mechanism to work more efficiently.
1360
1361 Targets will also have a special "compiler" slot which lets a user
1362 explicitly choose the compiler they want to use.
1363
1364 Here is an example for texinfo:
1365
1366 @example
1367 (defvar ede-makeinfo-compiler
1368 (ede-compiler
1369 "ede-makeinfo-compiler"
1370 :name "makeinfo"
1371 :variables '(("MAKEINFO" . "makeinfo"))
1372 :commands '("makeinfo -o $@ $<")
1373 :autoconf '(("AC_CHECK_PROG" . "MAKEINFO, makeinfo"))
1374 :sourcetype '(ede-makeinfo-source)
1375 )
1376 "Compile texinfo files into info files.")
1377 @end example
1378
1379 @xref{Compilers}.
1380
1381 When creating compiler instantiations, it may be useful to @code{clone}
1382 an existing compiler variable. Cloning allows you to only modify
1383 parts of the original, while keeping the rest of the same.
1384 Modification of the original will result in the clone also being
1385 changed for shared value slots.
1386
1387 The second important object is the linker class. The linker is similar
1388 to the compiler, except several compilers might be used to create some
1389 object files, and only one linker is used to link those objects together.
1390
1391 See @file{ede-proj-obj.el} for examples of the combination.
1392
1393 @defindex pj
1394 @defindex tg
1395 @defindex sc
1396 @defindex cm
1397
1398 @node Project, Targets, Compiler and Linker objects, Extending EDE
1399 @section Project
1400
1401 @menu
1402 * ede-project-placeholder::
1403 * ede-project::
1404 * ede-cpp-root-project::
1405 * ede-simple-project::
1406 * ede-simple-base-project::
1407 * ede-proj-project::
1408 * project-am-makefile::
1409 * ede-step-project::
1410 @end menu
1411
1412 @node ede-project-placeholder, ede-project, Project, Project
1413 @subsection ede-project-placeholder
1414 @pjindex ede-project-placeholder
1415
1416 @table @asis
1417 @item Inheritance Tree:
1418 @table @code
1419 @item eieio-speedbar
1420 @table @code
1421 @item eieio-speedbar-directory-button
1422 @table @code
1423 @item ede-project-placeholder
1424 @table @asis
1425 @item Children:
1426 @w{@xref{ede-project}.}
1427 @end table
1428 @end table
1429 @end table
1430 @end table
1431 @end table
1432
1433 @table @asis
1434 @item Slots:
1435
1436 @table @code
1437 @item :name
1438 Type: @code{string} @*
1439 Default Value: @code{"Untitled"}
1440
1441 The name used when generating distribution files.
1442
1443 @item :version
1444 Type: @code{string} @*
1445 Default Value: @code{"1.0"}
1446
1447 The version number used when distributing files.
1448
1449 @item :directory
1450 Type: @code{string}
1451
1452 Directory this project is associated with.
1453
1454 @item :file
1455 Type: @code{string}
1456
1457 File name where this project is stored.
1458
1459 @end table
1460
1461 @end table
1462
1463 @subsubsection Specialized Methods
1464
1465 @deffn Method ede--project-inode :AFTER proj
1466 Get the inode of the directory project @var{PROJ} is in.
1467 @end deffn
1468
1469 @deffn Method ede-project-root :AFTER this
1470 If a project knows it's root, return it here.
1471 Allows for one-project-object-for-a-tree type systems.
1472 @end deffn
1473
1474 @deffn Method ede-find-subproject-for-directory :AFTER proj dir
1475 Find a subproject of @var{PROJ} that corresponds to @var{DIR}.
1476 @end deffn
1477
1478 @deffn Method ede-project-root-directory :AFTER this &optional file
1479 If a project knows it's root, return it here.
1480 Allows for one-project-object-for-a-tree type systems.
1481 Optional @var{FILE} is the file to test. It is ignored in preference
1482 of the anchor file for the project.
1483 @end deffn
1484
1485 @deffn Method ede-project-force-load :AFTER this
1486 Make sure the placeholder @var{THIS} is replaced with the real thing.
1487 Return the new object created in its place.
1488 @end deffn
1489
1490 @deffn Method project-interactive-select-target :AFTER this prompt
1491 Make sure placeholder @var{THIS} is replaced with the real thing, and pass through.
1492 @end deffn
1493
1494 @deffn Method project-add-file :AFTER this file
1495 Make sure placeholder @var{THIS} is replaced with the real thing, and pass through.
1496 @end deffn
1497
1498 @node ede-project, ede-cpp-root-project, ede-project-placeholder, Project
1499 @subsection ede-project
1500 @pjindex ede-project
1501
1502 @table @asis
1503 @item Inheritance Tree:
1504 @table @code
1505 @item eieio-speedbar
1506 @table @code
1507 @item eieio-speedbar-directory-button
1508 @table @code
1509 @item @w{@xref{ede-project-placeholder}.}
1510 @table @code
1511 @item ede-project
1512 @table @asis
1513 @item Children:
1514 @w{@xref{ede-cpp-root-project},} @w{ede-emacs-project,} @w{ede-linux-project,} @w{ede-maven-project,} @w{@xref{ede-simple-project},} @w{@xref{ede-simple-base-project},} @w{@xref{ede-proj-project},} @w{@xref{project-am-makefile},} @w{@xref{ede-step-project}.}
1515 @end table
1516 @end table
1517 @end table
1518 @end table
1519 @end table
1520 @end table
1521
1522 @table @asis
1523 @item Slots:
1524
1525 @table @code
1526 @item :targets
1527 Type: @code{list}
1528
1529 List of top level targets in this project.
1530
1531 @item :tool-cache
1532 Type: @code{list}
1533
1534 List of tool cache configurations in this project.
1535 This allows any tool to create, manage, and persist project-specific settings.
1536
1537 @item :web-site-url
1538 Type: @code{string} @*
1539
1540 URL to this projects web site.
1541 This is a URL to be sent to a web site for documentation.
1542
1543 @item :web-site-directory @*
1544
1545 A directory where web pages can be found by Emacs.
1546 For remote locations use a path compatible with ange-ftp or EFS@.
1547 You can also use TRAMP for use with rcp & scp.
1548
1549 @item :web-site-file @*
1550
1551 A file which contains the home page for this project.
1552 This file can be relative to slot @code{web-site-directory}.
1553 This can be a local file, use ange-ftp, EFS, or TRAMP.
1554
1555 @item :ftp-site
1556 Type: @code{string} @*
1557
1558 FTP site where this project's distribution can be found.
1559 This FTP site should be in Emacs form, as needed by @code{ange-ftp}, but can
1560 also be of a form used by TRAMP for use with scp, or rcp.
1561
1562 @item :ftp-upload-site
1563 Type: @code{string} @*
1564
1565 FTP Site to upload new distributions to.
1566 This FTP site should be in Emacs form as needed by @code{ange-ftp}.
1567 If this slot is @code{nil}, then use @code{ftp-site} instead.
1568
1569 @item :configurations
1570 Type: @code{list} @*
1571 Default Value: @code{("debug" "release")}
1572
1573 List of available configuration types.
1574 Individual target/project types can form associations between a configuration,
1575 and target specific elements such as build variables.
1576
1577 @item :configuration-default @*
1578 Default Value: @code{"debug"}
1579
1580 The default configuration.
1581
1582 @item :local-variables @*
1583 Default Value: @code{nil}
1584
1585 Project local variables
1586
1587 @end table
1588
1589 @end table
1590 @subsubsection Specialized Methods
1591
1592 @deffn Method ede-preprocessor-map :AFTER this
1593 Get the pre-processor map for project @var{THIS}.
1594 @end deffn
1595
1596 @deffn Method ede-subproject-relative-path :AFTER proj &optional parent-in
1597 Get a path name for @var{PROJ} which is relative to the parent project.
1598 If PARENT is specified, then be relative to the PARENT project.
1599 Specifying PARENT is useful for sub-sub projects relative to the root project.
1600 @end deffn
1601
1602 @deffn Method eieio-speedbar-description :AFTER obj
1603 Provide a speedbar description for @var{OBJ}.
1604 @end deffn
1605
1606 @deffn Method ede-map-any-target-p :AFTER this proc
1607 For project @var{THIS}, map @var{PROC} to all targets and return if any non-nil.
1608 Return the first non-@code{nil} value returned by @var{PROC}.
1609 @end deffn
1610
1611 @deffn Method ede-map-subprojects :AFTER this proc
1612 For object @var{THIS}, execute @var{PROC} on all direct subprojects.
1613 This function does not apply @var{PROC} to sub-sub projects.
1614 See also @dfn{ede-map-all-subprojects}.
1615 @end deffn
1616
1617 @deffn Method ede-convert-path :AFTER this path
1618 Convert path in a standard way for a given project.
1619 Default to making it project relative.
1620 Argument @var{THIS} is the project to convert @var{PATH} to.
1621 @end deffn
1622
1623 @deffn Method ede-name :AFTER this
1624 Return a short-name for @var{THIS} project file.
1625 Do this by extracting the lowest directory name.
1626 @end deffn
1627
1628 @deffn Method ede-set-project-variables :AFTER project &optional buffer
1629 Set variables local to @var{PROJECT} in @var{BUFFER}.
1630 @end deffn
1631
1632 @deffn Method eieio-speedbar-derive-line-path :AFTER obj &optional depth
1633 Return the path to @var{OBJ}.
1634 Optional @var{DEPTH} is the depth we start at.
1635 @end deffn
1636
1637 @deffn Method ede-map-all-subprojects :AFTER this allproc
1638 For object @var{THIS}, execute PROC on @var{THIS} and all subprojects.
1639 This function also applies PROC to sub-sub projects.
1640 See also @dfn{ede-map-subprojects}.
1641 @end deffn
1642
1643 @deffn Method project-update-version :AFTER ot
1644 The @code{:version} of the project @var{OT} has been updated.
1645 Handle saving, or other detail.
1646 @end deffn
1647
1648 @deffn Method ede-buffer-header-file :AFTER this buffer
1649 Return @code{nil}, projects don't have header files.
1650 @end deffn
1651
1652 @deffn Method ede-buffer-documentation-files :AFTER this buffer
1653 Return all documentation in project @var{THIS} based on @var{BUFFER}.
1654 @end deffn
1655
1656 @deffn Method ede-map-targets :AFTER this proc
1657 For object @var{THIS}, execute @var{PROC} on all targets.
1658 @end deffn
1659
1660 @deffn Method ede-buffer-mine :AFTER this buffer
1661 Return non-@code{nil} if object @var{THIS} lays claim to the file in @var{BUFFER}.
1662 @end deffn
1663
1664 @deffn Method ede-object-keybindings :BEFORE this
1665 Retrieves the slot @code{keybindings} from an object of class @code{ede-project}
1666 @end deffn
1667
1668 @deffn Method ede-description :AFTER this
1669 Return a description suitable for the minibuffer about @var{THIS}.
1670 @end deffn
1671
1672 @deffn Method eieio-speedbar-object-children :AFTER this
1673 Return the list of speedbar display children for @var{THIS}.
1674 @end deffn
1675
1676 @deffn Method project-make-dist :AFTER this
1677 Build a distribution for the project based on @var{THIS} project.
1678 @end deffn
1679
1680 @deffn Method ede-system-include-path :AFTER this
1681 Get the system include path used by project @var{THIS}.
1682 @end deffn
1683
1684 @deffn Method project-new-target-custom :AFTER proj
1685 Create a new target. It is up to the project @var{PROJ} to get the name.
1686 @end deffn
1687
1688 @deffn Method ede-subproject-p :AFTER proj
1689 Return non-@code{nil} if @var{PROJ} is a sub project.
1690 @end deffn
1691
1692 @deffn Method ede-expand-filename :AFTER this filename &optional force
1693 Return a fully qualified file name based on project @var{THIS}.
1694 @var{FILENAME} should be just a filename which occurs in a directory controlled
1695 by this project.
1696 Optional argument @var{FORCE} forces the default filename to be provided even if it
1697 doesn't exist.
1698 @end deffn
1699
1700 @deffn Method ede-menu-items-build :AFTER obj &optional current
1701 Return a list of menu items for building project @var{OBJ}.
1702 If optional argument @var{CURRENT} is non-@code{nil}, return sub-menu code.
1703 @end deffn
1704
1705 @deffn Method ede-update-version-in-source :AFTER this version
1706 Change occurrences of a version string in sources.
1707 In project @var{THIS}, cycle over all targets to give them a chance to set
1708 their sources to @var{VERSION}.
1709 @end deffn
1710
1711 @deffn Method project-new-target :AFTER proj &rest args
1712 Create a new target. It is up to the project @var{PROJ} to get the name.
1713 @end deffn
1714
1715 @deffn Method project-compile-project :AFTER obj &optional command
1716 Compile the entire current project @var{OBJ}.
1717 Argument @var{COMMAND} is the command to use when compiling.
1718 @end deffn
1719
1720 @deffn Method eieio-speedbar-object-buttonname :AFTER object
1721 Return a string to use as a speedbar button for @var{OBJECT}.
1722 @end deffn
1723
1724 @deffn Method ede-map-project-buffers :AFTER this proc
1725 For @var{THIS}, execute @var{PROC} on all buffers belonging to @var{THIS}.
1726 @end deffn
1727
1728 @deffn Method ede-expand-filename-impl :AFTER this filename &optional force
1729 Return a fully qualified file name based on project @var{THIS}.
1730 @var{FILENAME} should be just a filename which occurs in a directory controlled
1731 by this project.
1732 Optional argument @var{FORCE} forces the default filename to be provided even if it
1733 doesn't exist.
1734 @end deffn
1735
1736 @deffn Method eieio-done-customizing :AFTER proj
1737 Call this when a user finishes customizing @var{PROJ}.
1738 @end deffn
1739
1740 @deffn Method ede-html-documentation :AFTER this
1741 Return a list of HTML files provided by project @var{THIS}.
1742 @end deffn
1743
1744 @deffn Method ede-documentation :AFTER this
1745 Return a list of files that provides documentation.
1746 Documentation is not for object @var{THIS}, but is provided by @var{THIS} for other
1747 files in the project.
1748 @end deffn
1749
1750 @deffn Method project-interactive-select-target :AFTER this prompt
1751 Interactively query for a target that exists in project @var{THIS}.
1752 Argument @var{PROMPT} is the prompt to use when querying the user for a target.
1753 @end deffn
1754
1755 @deffn Method ede-target-in-project-p :AFTER proj target
1756 Is @var{PROJ} the parent of @var{TARGET}?
1757 If @var{TARGET} belongs to a subproject, return that project file.
1758 @end deffn
1759
1760 @deffn Method ede-find-target :AFTER proj buffer
1761 Fetch the target in @var{PROJ} belonging to @var{BUFFER} or nil.
1762 @end deffn
1763
1764 @deffn Method ede-add-subproject :AFTER proj-a proj-b
1765 Add into @var{PROJ-A}, the subproject @var{PROJ-B}.
1766 @end deffn
1767
1768 @deffn Method ede-commit-project :AFTER proj
1769 Commit any change to @var{PROJ} to its file.
1770 @end deffn
1771
1772 @deffn Method project-dist-files :AFTER this
1773 Return a list of files that constitutes a distribution of @var{THIS} project.
1774 @end deffn
1775
1776 @deffn Method ede-object-menu :BEFORE this
1777 Retrieves the slot @code{menu} from an object of class @code{ede-project}
1778 @end deffn
1779
1780 @deffn Method ede-commit-local-variables :AFTER proj
1781 Commit change to local variables in @var{PROJ}.
1782 @end deffn
1783
1784 @node ede-cpp-root-project, ede-simple-project, ede-project, Project
1785 @subsection ede-cpp-root-project
1786 @pjindex ede-cpp-root-project
1787
1788 @table @asis
1789 @item Inheritance Tree:
1790 @table @code
1791 @item eieio-speedbar
1792 @table @code
1793 @item eieio-speedbar-directory-button
1794 @table @code
1795 @item @w{@xref{ede-project-placeholder}.}
1796 @table @code
1797 @item @w{@xref{ede-project}.}
1798 @table @code
1799 @item ede-cpp-root-project
1800 No children
1801 @end table
1802 @end table
1803 @end table
1804 @end table
1805 @end table
1806 @end table
1807
1808 This class implements the @code{ede-cpp-root} project type.
1809 @xref{ede-cpp-root}, for information about using this project type.
1810
1811 @table @asis
1812 @item Slots:
1813
1814 @table @code
1815 @item :include-path
1816 Type: @code{list} @*
1817 Default Value: @code{(quote ("/include" "../include/"))}
1818
1819 The default locate function expands filenames within a project.
1820 If a header file (.h, .hh, etc.)@: name is expanded, and
1821 the @code{:locate-fcn} slot is @code{nil}, then the include path is checked
1822 first, and other directories are ignored. For very large
1823 projects, this optimization can save a lot of time.
1824
1825 Directory names in the path can be relative to the current
1826 buffer's @code{default-directory} (not starting with a /). Directories
1827 that are relative to the project's root should start with a /, such
1828 as "/include", meaning the directory @code{include} off the project root
1829 directory.
1830
1831 @item :system-include-path
1832 Type: @code{list} @*
1833 Default Value: @code{nil}
1834
1835 The system include path for files in this project.
1836 C files initialized in an ede-cpp-root-project have their semantic
1837 system include path set to this value. If this is @code{nil}, then the
1838 semantic path is not modified.
1839
1840 @item :spp-table
1841 Type: @code{list} @*
1842 Default Value: @code{nil}
1843
1844 C Preprocessor macros for your files.
1845 Preprocessor symbols will be used while parsing your files.
1846 These macros might be passed in through the command line compiler, or
1847 are critical symbols derived from header files. Providing header files
1848 macro values through this slot improves accuracy and performance.
1849 Use `:spp-files' to use these files directly.
1850
1851 @item :spp-files
1852 Type: @code{list} @*
1853 Default Value: @code{nil}
1854
1855 C header file with Preprocessor macros for your files.
1856 The PreProcessor symbols appearing in these files will be used while
1857 parsing files in this project.
1858 See @code{semantic-lex-c-preprocessor-symbol-map} for more on how this works.
1859
1860 @item :header-match-regexp
1861 Type: @code{string} @*
1862 Default Value: @code{"\\.\\(h\\(h\\|xx\\|pp\\|\\+\\+\\)?\\|H\\)$\\|\\<\\w+$"}
1863
1864 Regexp used to identify C/C++ header files.
1865
1866 @item :locate-fcn
1867 Type: @code{(or null function)} @*
1868 Default Value: @code{nil}
1869
1870 The locate function can be used in place of
1871 @dfn{ede-expand-filename} so you can quickly customize your custom target
1872 to use specialized local routines instead of the EDE routines.
1873 The function symbol must take two arguments:
1874 NAME - The name of the file to find.
1875 DIR - The directory root for this cpp-root project.
1876
1877 It should return the fully qualified file name passed in from NAME@. If that file does not
1878 exist, it should return nil.
1879
1880 @end table
1881
1882 @end table
1883 @subsubsection Specialized Methods
1884
1885 @deffn Method initialize-instance :AFTER this &rest fields
1886 Make sure the @code{:file} is fully expanded.
1887 @end deffn
1888
1889 @deffn Method ede-preprocessor-map :AFTER this
1890 Get the pre-processor map for project @var{THIS}.
1891 @end deffn
1892
1893 @deffn Method ede-cpp-root-header-file-p :AFTER proj name
1894 Non @code{nil} if in @var{PROJ} the filename @var{NAME} is a header.
1895 @end deffn
1896
1897 @deffn Method ede-system-include-path :AFTER this
1898 Get the system include path used by project @var{THIS}.
1899 @end deffn
1900
1901 @deffn Method ede-expand-filename-impl :AFTER proj name
1902 Within this project @var{PROJ}, find the file @var{NAME}.
1903 This knows details about or source tree.
1904 @end deffn
1905
1906 @node ede-simple-project, ede-simple-base-project, ede-cpp-root-project, Project
1907 @subsection ede-simple-project
1908 @pjindex ede-simple-project
1909
1910 @table @asis
1911 @item Inheritance Tree:
1912 @table @code
1913 @item eieio-speedbar
1914 @table @code
1915 @item eieio-speedbar-directory-button
1916 @table @code
1917 @item @w{@xref{ede-project-placeholder}.}
1918 @table @code
1919 @item @w{@xref{ede-project}.}
1920 @table @code
1921 @item ede-simple-project
1922 No children
1923 @end table
1924 @end table
1925 @end table
1926 @end table
1927 @end table
1928 @end table
1929
1930 @subsubsection Specialized Methods
1931
1932 @deffn Method ede-commit-project :AFTER proj
1933 Commit any change to @var{PROJ} to its file.
1934 @end deffn
1935
1936 @node ede-simple-base-project, ede-proj-project, ede-simple-project, Project
1937 @subsection ede-simple-base-project
1938 @pjindex ede-simple-base-project
1939
1940 @table @asis
1941 @item Inheritance Tree:
1942 @table @code
1943 @item eieio-speedbar
1944 @table @code
1945 @item eieio-speedbar-directory-button
1946 @table @code
1947 @item @w{@xref{ede-project-placeholder}.}
1948 @table @code
1949 @item @w{@xref{ede-project}.}
1950 @table @code
1951 @item ede-simple-base-project
1952 No children
1953 @end table
1954 @end table
1955 @end table
1956 @end table
1957 @end table
1958 @end table
1959
1960 EDE Simple project base class.
1961 This one project could control a tree of subdirectories.
1962
1963 @table @asis
1964 @end table
1965
1966 @node ede-proj-project, project-am-makefile, ede-simple-base-project, Project
1967 @subsection ede-proj-project
1968 @pjindex ede-proj-project
1969
1970 @table @asis
1971 @item Inheritance Tree:
1972 @table @code
1973 @item eieio-speedbar
1974 @table @code
1975 @item eieio-speedbar-directory-button
1976 @table @code
1977 @item @w{@xref{ede-project-placeholder}.}
1978 @table @code
1979 @item @w{@xref{ede-project}.}
1980 @table @code
1981 @item ede-proj-project
1982 No children
1983 @end table
1984 @end table
1985 @end table
1986 @end table
1987 @end table
1988 @end table
1989
1990 @table @asis
1991 @item Slots:
1992
1993 @table @code
1994 @item :makefile-type
1995 Type: @code{symbol} @*
1996 Default Value: @code{Makefile}
1997
1998 The type of Makefile to generate.
1999 Can be one of @code{'Makefile}, 'Makefile.in, or 'Makefile.am.
2000 If this value is NOT @code{'Makefile}, then that overrides the @code{:makefile} slot
2001 in targets.
2002
2003 @item :variables
2004 Type: @code{list} @*
2005 Default Value: @code{nil}
2006
2007 Variables to set in this Makefile.
2008
2009 @item :configuration-variables
2010 Type: @code{list} @*
2011 Default Value: @code{("debug" (("DEBUG" . "1")))}
2012
2013 Makefile variables to use in different configurations.
2014 These variables are used in the makefile when a configuration becomes active.
2015
2016 @item :inference-rules @*
2017 Default Value: @code{nil}
2018
2019 Inference rules to add to the makefile.
2020
2021 @item :include-file @*
2022 Default Value: @code{nil}
2023
2024 Additional files to include.
2025 These files can contain additional rules, variables, and customizations.
2026
2027 @item :automatic-dependencies
2028 Type: @code{boolean} @*
2029 Default Value: @code{t}
2030
2031 Non-@code{nil} to do implement automatic dependencies in the Makefile.
2032
2033 @item :metasubproject
2034 Type: @code{boolean} @*
2035 Default Value: @code{nil}
2036
2037 Non-@code{nil} if this is a metasubproject.
2038 Usually, a subproject is determined by a parent project. If multiple top level
2039 projects are grouped into a large project not maintained by EDE, then you need
2040 to set this to non-nil. The only effect is that the @code{dist} rule will then avoid
2041 making a tar file.
2042
2043 @end table
2044
2045 @end table
2046 @subsubsection Specialized Methods
2047
2048 @deffn Method ede-proj-makefile-create :AFTER this mfilename
2049 Create a Makefile for all Makefile targets in @var{THIS}.
2050 @var{MFILENAME} is the makefile to generate.
2051 @end deffn
2052
2053 @deffn Method ede-proj-makefile-insert-rules :AFTER this
2054 Insert rules needed by @var{THIS} target.
2055 @end deffn
2056
2057 @deffn Method ede-proj-makefile-tags :AFTER this targets
2058 Insert into the current location rules to make recursive TAGS files.
2059 Argument @var{THIS} is the project to create tags for.
2060 Argument @var{TARGETS} are the targets we should depend on for TAGS.
2061 @end deffn
2062
2063 @deffn Method ede-proj-makefile-insert-variables :AFTER this
2064 Insert variables needed by target @var{THIS}.
2065 @end deffn
2066
2067 @deffn Method project-make-dist :AFTER this
2068 Build a distribution for the project based on @var{THIS} target.
2069 @end deffn
2070
2071 @deffn Method ede-proj-makefile-insert-dist-rules :AFTER this
2072 Insert distribution rules for @var{THIS} in a Makefile, such as CLEAN and DIST.
2073 @end deffn
2074
2075 @deffn Method ede-proj-makefile-insert-dist-dependencies :AFTER this
2076 Insert any symbols that the DIST rule should depend on.
2077 Argument @var{THIS} is the project that should insert stuff.
2078 @end deffn
2079
2080 @deffn Method ede-proj-makefile-insert-subproj-rules :AFTER this
2081 Insert a rule for the project @var{THIS} which should be a subproject.
2082 @end deffn
2083
2084 @deffn Method ede-proj-makefile-create-maybe :AFTER this mfilename
2085 Create a Makefile for all Makefile targets in @var{THIS} if needed.
2086 @var{MFILENAME} is the makefile to generate.
2087 @end deffn
2088
2089 @deffn Method ede-proj-configure-test-required-file :AFTER this file
2090 For project @var{THIS}, test that the file @var{FILE} exists, or create it.
2091 @end deffn
2092
2093 @deffn Method ede-proj-setup-buildenvironment :AFTER this &optional force
2094 Setup the build environment for project @var{THIS}.
2095 Handles the Makefile, or a Makefile.am configure.ac combination.
2096 Optional argument @var{FORCE} will force items to be regenerated.
2097 @end deffn
2098
2099 @deffn Method ede-proj-makefile-garbage-patterns :AFTER this
2100 Return a list of patterns that are considered garbage to @var{THIS}.
2101 These are removed with make clean.
2102 @end deffn
2103
2104 @deffn Method ede-proj-configure-synchronize :AFTER this
2105 Synchronize what we know about project @var{THIS} into configure.ac.
2106 @end deffn
2107
2108 @deffn Method ede-proj-makefile-insert-variables-new :AFTER this
2109 Insert variables needed by target @var{THIS}.
2110
2111 NOTE: Not yet in use! This is part of an SRecode conversion of
2112 EDE that is in progress.
2113 @end deffn
2114
2115 @deffn Method ede-proj-makefile-configuration-variables :AFTER this configuration
2116 Return a list of configuration variables from @var{THIS}.
2117 Use @var{CONFIGURATION} as the current configuration to query.
2118 @end deffn
2119
2120 @deffn Method eieio-done-customizing :AFTER proj
2121 Call this when a user finishes customizing this object.
2122 Argument @var{PROJ} is the project to save.
2123 @end deffn
2124
2125 @deffn Method ede-proj-configure-recreate :AFTER this
2126 Delete project @var{THIS}'s configure script and start over.
2127 @end deffn
2128
2129 @deffn Method ede-proj-makefile-insert-user-rules :AFTER this
2130 Insert user specified rules needed by @var{THIS} target.
2131 This is different from @dfn{ede-proj-makefile-insert-rules} in that this
2132 function won't create the building rules which are auto created with
2133 automake.
2134 @end deffn
2135
2136 @deffn Method ede-proj-dist-makefile :AFTER this
2137 Return the name of the Makefile with the DIST target in it for @var{THIS}.
2138 @end deffn
2139
2140 @deffn Method ede-proj-configure-file :AFTER this
2141 The configure.ac script used by project @var{THIS}.
2142 @end deffn
2143
2144 @deffn Method ede-commit-project :AFTER proj
2145 Commit any change to @var{PROJ} to its file.
2146 @end deffn
2147
2148 @deffn Method project-dist-files :AFTER this
2149 Return a list of files that constitutes a distribution of @var{THIS} project.
2150 @end deffn
2151
2152 @deffn Method ede-commit-local-variables :AFTER proj
2153 Commit change to local variables in @var{PROJ}.
2154 @end deffn
2155
2156 @node project-am-makefile, ede-step-project, ede-proj-project, Project
2157 @subsection project-am-makefile
2158 @pjindex project-am-makefile
2159
2160 @table @asis
2161 @item Inheritance Tree:
2162 @table @code
2163 @item eieio-speedbar
2164 @table @code
2165 @item eieio-speedbar-directory-button
2166 @table @code
2167 @item @w{@xref{ede-project-placeholder}.}
2168 @table @code
2169 @item @w{@xref{ede-project}.}
2170 @table @code
2171 @item project-am-makefile
2172 No children
2173 @end table
2174 @end table
2175 @end table
2176 @end table
2177 @end table
2178 @end table
2179
2180 @subsubsection Specialized Methods
2181
2182 @deffn Method project-am-subtree :AFTER ampf subdir
2183 Return the sub project in @var{AMPF} specified by @var{SUBDIR}.
2184 @end deffn
2185
2186 @deffn Method project-targets-for-file :AFTER proj
2187 Return a list of targets the project @var{PROJ}.
2188 @end deffn
2189
2190 @deffn Method project-new-target :AFTER proj &optional name type
2191 Create a new target named @var{NAME}.
2192 Argument @var{TYPE} is the type of target to insert. This is a string
2193 matching something in @code{project-am-type-alist} or type class symbol.
2194 Despite the fact that this is a method, it depends on the current
2195 buffer being in order to provide a smart default target type.
2196 @end deffn
2197
2198 @node ede-step-project, , project-am-makefile, Project
2199 @subsection ede-step-project
2200 @pjindex ede-step-project
2201
2202 @table @asis
2203 @item Inheritance Tree:
2204 @table @code
2205 @item eieio-speedbar
2206 @table @code
2207 @item eieio-speedbar-directory-button
2208 @table @code
2209 @item @w{@xref{ede-project-placeholder}.}
2210 @table @code
2211 @item @w{@xref{ede-project}.}
2212 @table @code
2213 @item ede-step-project
2214 No children
2215 @end table
2216 @end table
2217 @end table
2218 @end table
2219 @end table
2220 @end table
2221
2222 @table @asis
2223 @item Slots:
2224
2225 @table @code
2226 @item :init-variables
2227 Type: @code{list} @*
2228 Default Value: @code{nil}
2229
2230 Variables to set in this Makefile, at top of file.
2231
2232 @item :additional-variables
2233 Type: @code{(or null list)} @*
2234 Default Value: @code{nil}
2235
2236 Arbitrary variables needed from this project.
2237 It is safe to leave this blank.
2238
2239 @item :additional-rules
2240 Type: @code{(or null list)} @*
2241 Default Value: @code{nil}
2242
2243 Arbitrary rules and dependencies needed to make this target.
2244 It is safe to leave this blank.
2245
2246 @item :installation-domain
2247 Type: @code{symbol} @*
2248 Default Value: @code{user}
2249
2250 Installation domain specification.
2251 The variable GNUSTEP_INSTALLATION_DOMAIN is set at this value.
2252
2253 @item :preamble
2254 Type: @code{(or null list)} @*
2255 Default Value: @code{(quote ("GNUmakefile.preamble"))}
2256
2257 The auxiliary makefile for additional variables.
2258 Included just before the specific target files.
2259
2260 @item :postamble
2261 Type: @code{(or null list)} @*
2262 Default Value: @code{(quote ("GNUmakefile.postamble"))}
2263
2264 The auxiliary makefile for additional rules.
2265 Included just after the specific target files.
2266
2267 @item :metasubproject
2268 Type: @code{boolean} @*
2269 Default Value: @code{nil}
2270
2271 Non-@code{nil} if this is a metasubproject.
2272 Usually, a subproject is determined by a parent project. If multiple top level
2273 projects are grouped into a large project not maintained by EDE, then you need
2274 to set this to non-nil. The only effect is that the @code{dist} rule will then avoid
2275 making a tar file.
2276
2277 @end table
2278
2279 @end table
2280 @subsubsection Specialized Methods
2281
2282 @deffn Method ede-proj-makefile-create :AFTER this mfilename
2283 Create a GNUmakefile for all Makefile targets in @var{THIS}.
2284 @var{MFILENAME} is the makefile to generate.
2285 @end deffn
2286
2287 @deffn Method project-make-dist :AFTER this
2288 Build a distribution for the project based on @var{THIS} target.
2289 @end deffn
2290
2291 @deffn Method ede-proj-makefile-create-maybe :AFTER this mfilename
2292 Create a Makefile for all Makefile targets in @var{THIS} if needed.
2293 @var{MFILENAME} is the makefile to generate.
2294 @end deffn
2295
2296 @deffn Method ede-proj-setup-buildenvironment :AFTER this &optional force
2297 Setup the build environment for project @var{THIS}.
2298 Handles the Makefile, or a Makefile.am configure.ac combination.
2299 Optional argument @var{FORCE} will force items to be regenerated.
2300 @end deffn
2301
2302 @deffn Method eieio-done-customizing :AFTER proj
2303 Call this when a user finishes customizing this object.
2304 Argument @var{PROJ} is the project to save.
2305 @end deffn
2306
2307 @deffn Method ede-proj-dist-makefile :AFTER this
2308 Return the name of the Makefile with the DIST target in it for @var{THIS}.
2309 @end deffn
2310
2311 @deffn Method ede-commit-project :AFTER proj
2312 Commit any change to @var{PROJ} to its file.
2313 @end deffn
2314
2315 @deffn Method project-dist-files :AFTER this
2316 Return a list of files that constitutes a distribution of @var{THIS} project.
2317 @end deffn
2318
2319 @deffn Method ede-commit-local-variables :AFTER proj
2320 Commit change to local variables in @var{PROJ}.
2321 @end deffn
2322
2323 @node Targets, Sourcecode, Project, Extending EDE
2324 @section Targets
2325
2326 @menu
2327 * ede-target::
2328 * ede-proj-target::
2329 * ede-proj-target-makefile::
2330 * semantic-ede-proj-target-grammar::
2331 * ede-proj-target-makefile-objectcode::
2332 * ede-proj-target-makefile-archive::
2333 * ede-proj-target-makefile-program::
2334 * ede-proj-target-makefile-shared-object::
2335 * ede-proj-target-elisp::
2336 * ede-proj-target-elisp-autoloads::
2337 * ede-proj-target-makefile-miscelaneous::
2338 * ede-proj-target-makefile-info::
2339 * ede-proj-target-scheme::
2340 * project-am-target::
2341 * project-am-objectcode::
2342 * project-am-program::
2343 * project-am-header-noinst::
2344 * project-am-header-inst::
2345 * project-am-lisp::
2346 * project-am-texinfo::
2347 * project-am-man::
2348 @end menu
2349
2350
2351 @node ede-target, ede-proj-target, Targets, Targets
2352 @subsection ede-target
2353 @tgindex ede-target
2354
2355 @table @asis
2356 @item Inheritance Tree:
2357 @table @code
2358 @item eieio-speedbar
2359 @table @code
2360 @item eieio-speedbar-directory-button
2361 @table @code
2362 @item ede-target
2363 @table @asis
2364 @item Children:
2365 @w{ede-cpp-root-target,} @w{ede-emacs-target-c,} @w{ede-emacs-target-el,} @w{ede-emacs-target-misc,} @w{ede-linux-target-c,} @w{ede-linux-target-misc,} @w{ede-maven-target-java,} @w{ede-maven-target-c,} @w{ede-maven-target-misc,} @w{ede-simple-target,} @w{@xref{ede-proj-target},} @w{@xref{project-am-target}.}
2366 @end table
2367 @end table
2368 @end table
2369 @end table
2370 @end table
2371
2372 @table @asis
2373 @item Slots:
2374
2375 @table @code
2376 @item :name
2377 Type: @code{string}
2378
2379 Name of this target.
2380
2381 @item :path
2382 Type: @code{string}
2383
2384 The path to the sources of this target.
2385 Relative to the path of the project it belongs to.
2386
2387 @item :source
2388 Type: @code{list} @*
2389 Default Value: @code{nil}
2390
2391 Source files in this target.
2392
2393 @item :versionsource
2394 Type: @code{list} @*
2395 Default Value: @code{nil}
2396
2397 Source files with a version string in them.
2398 These files are checked for a version string whenever the EDE version
2399 of the master project is changed. When strings are found, the version
2400 previously there is updated.
2401
2402 @end table
2403
2404 @end table
2405 @subsubsection Specialized Methods
2406
2407 @deffn Method ede-preprocessor-map :AFTER this
2408 Get the pre-processor map for project @var{THIS}.
2409 @end deffn
2410
2411 @deffn Method eieio-speedbar-description :AFTER obj
2412 Provide a speedbar description for @var{OBJ}.
2413 @end deffn
2414
2415 @deffn Method project-compile-target :AFTER obj &optional command
2416 Compile the current target @var{OBJ}.
2417 Argument @var{COMMAND} is the command to use for compiling the target.
2418 @end deffn
2419
2420 @deffn Method project-debug-target :AFTER obj
2421 Run the current project target @var{OBJ} in a debugger.
2422 @end deffn
2423
2424 @deffn Method ede-convert-path :AFTER this path
2425 Convert path in a standard way for a given project.
2426 Default to making it project relative.
2427 Argument @var{THIS} is the project to convert @var{PATH} to.
2428 @end deffn
2429
2430 @deffn Method ede-name :AFTER this
2431 Return the name of @var{THIS} targt.
2432 @end deffn
2433
2434 @deffn Method ede-target-buffer-in-sourcelist :AFTER this buffer source
2435 Return non-@code{nil} if object @var{THIS} is in @var{BUFFER} to a @var{SOURCE} list.
2436 Handles complex path issues.
2437 @end deffn
2438
2439 @deffn Method eieio-speedbar-derive-line-path :AFTER obj &optional depth
2440 Return the path to @var{OBJ}.
2441 Optional @var{DEPTH} is the depth we start at.
2442 @end deffn
2443
2444 @deffn Method ede-buffer-header-file :AFTER this buffer
2445 There are no default header files in EDE@.
2446 Do a quick check to see if there is a Header tag in this buffer.
2447 @end deffn
2448
2449 @deffn Method project-remove-file :AFTER ot fnnd
2450 Remove the current buffer from project target @var{OT}.
2451 Argument @var{FNND} is an argument.
2452 @end deffn
2453
2454 @deffn Method ede-buffer-documentation-files :AFTER this buffer
2455 Check for some documentation files for @var{THIS}.
2456 Also do a quick check to see if there is a Documentation tag in this @var{BUFFER}.
2457 @end deffn
2458
2459 @deffn Method ede-map-target-buffers :AFTER this proc
2460 For @var{THIS}, execute @var{PROC} on all buffers belonging to @var{THIS}.
2461 @end deffn
2462
2463 @deffn Method eieio-speedbar-child-description :AFTER obj
2464 Provide a speedbar description for a plain-child of @var{OBJ}.
2465 A plain child is a child element which is not an EIEIO object.
2466 @end deffn
2467
2468 @deffn Method ede-object-keybindings :BEFORE this
2469 Retrieves the slot @code{keybindings} from an object of class @code{ede-target}
2470 @end deffn
2471
2472 @deffn Method ede-description :AFTER this
2473 Return a description suitable for the minibuffer about @var{THIS}.
2474 @end deffn
2475
2476 @deffn Method eieio-speedbar-object-children :AFTER this
2477 Return the list of speedbar display children for @var{THIS}.
2478 @end deffn
2479
2480 @deffn Method ede-system-include-path :AFTER this
2481 Get the system include path used by project @var{THIS}.
2482 @end deffn
2483
2484 @deffn Method ede-object-sourcecode :BEFORE this
2485 Retrieves the slot @code{sourcetype} from an object of class @code{ede-target}
2486 @end deffn
2487
2488 @deffn Method ede-expand-filename :AFTER this filename &optional force
2489 Return a fully qualified file name based on target @var{THIS}.
2490 @var{FILENAME} should be a filename which occurs in a directory in which @var{THIS} works.
2491 Optional argument @var{FORCE} forces the default filename to be provided even if it
2492 doesn't exist.
2493 @end deffn
2494
2495 @deffn Method ede-menu-items-build :AFTER obj &optional current
2496 Return a list of menu items for building target @var{OBJ}.
2497 If optional argument @var{CURRENT} is non-@code{nil}, return sub-menu code.
2498 @end deffn
2499
2500 @deffn Method ede-want-file-p :AFTER this file
2501 Return non-@code{nil} if @var{THIS} target wants @var{FILE}.
2502 @end deffn
2503
2504 @deffn Method ede-update-version-in-source :AFTER this version
2505 In sources for @var{THIS}, change version numbers to @var{VERSION}.
2506 @end deffn
2507
2508 @deffn Method project-delete-target :AFTER ot
2509 Delete the current target @var{OT} from it's parent project.
2510 @end deffn
2511
2512 @deffn Method ede-target-sourcecode :AFTER this
2513 Return the sourcecode objects which @var{THIS} permits.
2514 @end deffn
2515
2516 @deffn Method eieio-speedbar-child-make-tag-lines :AFTER this depth
2517 Create a speedbar tag line for a child of @var{THIS}.
2518 It has depth @var{DEPTH}.
2519 @end deffn
2520
2521 @deffn Method eieio-speedbar-object-buttonname :AFTER object
2522 Return a string to use as a speedbar button for @var{OBJECT}.
2523 @end deffn
2524
2525 @deffn Method eieio-done-customizing :AFTER target
2526 Call this when a user finishes customizing @var{TARGET}.
2527 @end deffn
2528
2529 @deffn Method project-edit-file-target :AFTER ot
2530 Edit the target @var{OT} associated w/ this file.
2531 @end deffn
2532
2533 @deffn Method ede-documentation :AFTER this
2534 Return a list of files that provides documentation.
2535 Documentation is not for object @var{THIS}, but is provided by @var{THIS} for other
2536 files in the project.
2537 @end deffn
2538
2539 @deffn Method ede-want-file-source-p :AFTER this file
2540 Return non-@code{nil} if @var{THIS} target wants @var{FILE}.
2541 @end deffn
2542
2543 @deffn Method ede-want-file-auxiliary-p :AFTER this file
2544 Return non-@code{nil} if @var{THIS} target wants @var{FILE}.
2545 @end deffn
2546
2547 @deffn Method project-add-file :AFTER ot file
2548 Add the current buffer into project project target @var{OT}.
2549 Argument @var{FILE} is the file to add.
2550 @end deffn
2551
2552 @deffn Method ede-target-name :AFTER this
2553 Return the name of @var{THIS} target, suitable for make or debug style commands.
2554 @end deffn
2555
2556 @deffn Method ede-object-menu :BEFORE this
2557 Retrieves the slot @code{menu} from an object of class @code{ede-target}
2558 @end deffn
2559
2560 @node ede-proj-target, ede-proj-target-makefile, ede-target, Targets
2561 @subsection ede-proj-target
2562 @tgindex ede-proj-target
2563
2564 @table @asis
2565 @item Inheritance Tree:
2566 @table @code
2567 @item eieio-speedbar
2568 @table @code
2569 @item eieio-speedbar-directory-button
2570 @table @code
2571 @item @w{@xref{ede-target}.}
2572 @table @code
2573 @item ede-proj-target
2574 @table @asis
2575 @item Children:
2576 @w{@xref{ede-proj-target-makefile},} @w{ede-proj-target-aux,} @w{@xref{ede-proj-target-scheme}.}
2577 @end table
2578 @end table
2579 @end table
2580 @end table
2581 @end table
2582 @end table
2583
2584 @table @asis
2585 @item Slots:
2586
2587 @table @code
2588 @item :name
2589 Type: @code{string}
2590
2591 Name of this target.
2592
2593 @item :path
2594 Type: @code{string}
2595
2596 The path to the sources of this target.
2597 Relative to the path of the project it belongs to.
2598
2599 @item :auxsource
2600 Type: @code{list} @*
2601 Default Value: @code{nil}
2602
2603 Auxiliary source files included in this target.
2604 Each of these is considered equivalent to a source file, but it is not
2605 distributed, and each should have a corresponding rule to build it.
2606
2607 @item :compiler
2608 Type: @code{(or null symbol)} @*
2609 Default Value: @code{nil}
2610
2611 The compiler to be used to compile this object.
2612 This should be a symbol, which contains the object defining the compiler.
2613 This enables save/restore to do so by name, permitting the sharing
2614 of these compiler resources, and global customization thereof.
2615
2616 @item :linker
2617 Type: @code{(or null symbol)} @*
2618 Default Value: @code{nil}
2619
2620 The linker to be used to link compiled sources for this object.
2621 This should be a symbol, which contains the object defining the linker.
2622 This enables save/restore to do so by name, permitting the sharing
2623 of these linker resources, and global customization thereof.
2624
2625 @end table
2626
2627 @end table
2628 @subsubsection Specialized Methods
2629
2630 @deffn Method project-compile-target :AFTER obj &optional command
2631 Compile the current target @var{OBJ}.
2632 Argument @var{COMMAND} is the command to use for compiling the target.
2633 @end deffn
2634
2635 @deffn Method project-debug-target :AFTER obj
2636 Run the current project target @var{OBJ} in a debugger.
2637 @end deffn
2638
2639 @deffn Method ede-proj-configure-add-missing :AFTER this
2640 Query if any files needed by @var{THIS} provided by automake are missing.
2641 Results in --add-missing being passed to automake.
2642 @end deffn
2643
2644 @deffn Method ede-proj-flush-autoconf :AFTER this
2645 Flush the configure file (current buffer) to accommodate @var{THIS}.
2646 By flushing, remove any cruft that may be in the file. Subsequent
2647 calls to @dfn{ede-proj-tweak-autoconf} can restore items removed by flush.
2648 @end deffn
2649
2650 @deffn Method ede-proj-makefile-insert-rules :AFTER this
2651 Insert rules needed by @var{THIS} target.
2652 @end deffn
2653
2654 @deffn Method project-remove-file :AFTER target file
2655 For @var{TARGET}, remove @var{FILE}.
2656 @var{FILE} must be massaged by @dfn{ede-convert-path}.
2657 @end deffn
2658
2659 @deffn Method ede-proj-configure-create-missing :AFTER this
2660 Add any missing files for @var{THIS} by creating them.
2661 @end deffn
2662
2663 @deffn Method ede-proj-makefile-sourcevar :AFTER this
2664 Return the variable name for @var{THIS}'s sources.
2665 @end deffn
2666
2667 @deffn Method ede-proj-makefile-insert-variables :AFTER this &optional moresource
2668 Insert variables needed by target @var{THIS}.
2669 Optional argument @var{MORESOURCE} is a list of additional sources to add to the
2670 sources variable.
2671 @end deffn
2672
2673 @deffn Method ede-proj-makefile-insert-automake-post-variables :AFTER this
2674 Insert variables needed by target @var{THIS} in Makefile.am after SOURCES.
2675 @end deffn
2676
2677 @deffn Method ede-proj-makefile-insert-dist-dependencies :AFTER this
2678 Insert any symbols that the DIST rule should depend on.
2679 Argument @var{THIS} is the target that should insert stuff.
2680 @end deffn
2681
2682 @deffn Method ede-proj-linkers :AFTER obj
2683 List of linkers being used by @var{OBJ}.
2684 If the @code{linker} slot is empty, concoct one on a first match found
2685 basis for any given type from the @code{availablelinkers} slot.
2686 Otherwise, return the @code{linker} slot.
2687 Converts all symbols into the objects to be used.
2688 @end deffn
2689
2690 @deffn Method ede-proj-makefile-garbage-patterns :AFTER this
2691 Return a list of patterns that are considered garbage to @var{THIS}.
2692 These are removed with make clean.
2693 @end deffn
2694
2695 @deffn Method ede-proj-tweak-autoconf :AFTER this
2696 Tweak the configure file (current buffer) to accommodate @var{THIS}.
2697 @end deffn
2698
2699 @deffn Method ede-proj-compilers :AFTER obj
2700 List of compilers being used by @var{OBJ}.
2701 If the @code{compiler} slot is empty, concoct one on a first match found
2702 basis for any given type from the @code{availablecompilers} slot.
2703 Otherwise, return the @code{compiler} slot.
2704 Converts all symbols into the objects to be used.
2705 @end deffn
2706
2707 @deffn Method project-delete-target :AFTER this
2708 Delete the current target @var{THIS} from it's parent project.
2709 @end deffn
2710
2711 @deffn Method ede-proj-makefile-target-name :AFTER this
2712 Return the name of the main target for @var{THIS} target.
2713 @end deffn
2714
2715 @deffn Method eieio-done-customizing :AFTER target
2716 Call this when a user finishes customizing this object.
2717 Argument @var{TARGET} is the project we are completing customization on.
2718 @end deffn
2719
2720 @deffn Method ede-proj-makefile-insert-user-rules :AFTER this
2721 Insert user specified rules needed by @var{THIS} target.
2722 @end deffn
2723
2724 @deffn Method project-add-file :AFTER this file
2725 Add to target @var{THIS} the current buffer represented as @var{FILE}.
2726 @end deffn
2727
2728 @deffn Method ede-proj-makefile-insert-automake-pre-variables :AFTER this
2729 Insert variables needed by target @var{THIS} in Makefile.am before SOURCES.
2730 @end deffn
2731
2732 @deffn Method ede-proj-makefile-insert-dist-filepatterns :AFTER this
2733 Insert any symbols that the DIST rule should depend on.
2734 Argument @var{THIS} is the target that should insert stuff.
2735 @end deffn
2736
2737 @deffn Method ede-proj-makefile-dependency-files :AFTER this
2738 Return a list of source files to convert to dependencies.
2739 Argument @var{THIS} is the target to get sources from.
2740 @end deffn
2741
2742 @deffn Method ede-proj-makefile-insert-source-variables :AFTER this &optional moresource
2743 Insert the source variables needed by @var{THIS}.
2744 Optional argument @var{MORESOURCE} is a list of additional sources to add to the
2745 sources variable.
2746 @end deffn
2747
2748
2749 @node ede-proj-target-makefile, semantic-ede-proj-target-grammar, ede-proj-target, Targets
2750 @subsection ede-proj-target-makefile
2751 @tgindex ede-proj-target-makefile
2752
2753 @table @asis
2754 @item Inheritance Tree:
2755 @table @code
2756 @item eieio-speedbar
2757 @table @code
2758 @item eieio-speedbar-directory-button
2759 @table @code
2760 @item @w{@xref{ede-target}.}
2761 @table @code
2762 @item @w{@xref{ede-proj-target}.}
2763 @table @code
2764 @item ede-proj-target-makefile
2765 @table @asis
2766 @item Children:
2767 @w{@xref{semantic-ede-proj-target-grammar},} @w{@xref{ede-proj-target-makefile-objectcode},} @w{@xref{ede-proj-target-elisp},} @w{@xref{ede-proj-target-makefile-miscelaneous},} @w{@xref{ede-proj-target-makefile-info}.}
2768 @end table
2769 @end table
2770 @end table
2771 @end table
2772 @end table
2773 @end table
2774 @end table
2775
2776 @table @asis
2777 @item Slots:
2778
2779 @table @code
2780 @item :makefile
2781 Type: @code{string} @*
2782 Default Value: @code{"Makefile"}
2783
2784 File name of generated Makefile.
2785
2786 @item :partofall
2787 Type: @code{boolean} @*
2788 Default Value: @code{t}
2789
2790 Non @code{nil} means the rule created is part of the all target.
2791 Setting this to @code{nil} creates the rule to build this item, but does not
2792 include it in the ALL`all:' rule.
2793
2794 @item :configuration-variables
2795 Type: @code{list} @*
2796 Default Value: @code{nil}
2797
2798 Makefile variables appended to use in different configurations.
2799 These variables are used in the makefile when a configuration becomes active.
2800 Target variables are always renamed such as foo_CFLAGS, then included into
2801 commands where the variable would usually appear.
2802
2803 @item :rules
2804 Type: @code{list} @*
2805 Default Value: @code{nil}
2806
2807 Arbitrary rules and dependencies needed to make this target.
2808 It is safe to leave this blank.
2809
2810 @end table
2811
2812 @end table
2813 @subsubsection Specialized Methods
2814
2815 @deffn Method ede-proj-makefile-dependencies :AFTER this
2816 Return a string representing the dependencies for @var{THIS}.
2817 Some compilers only use the first element in the dependencies, others
2818 have a list of intermediates (object files), and others don't care.
2819 This allows customization of how these elements appear.
2820 @end deffn
2821
2822 @deffn Method project-compile-target :AFTER obj &optional command
2823 Compile the current target program @var{OBJ}.
2824 Optional argument @var{COMMAND} is the s the alternate command to use.
2825 @end deffn
2826
2827 @deffn Method ede-proj-makefile-insert-rules :AFTER this
2828 Insert rules needed by @var{THIS} target.
2829 @end deffn
2830
2831 @deffn Method ede-proj-makefile-insert-variables :AFTER this &optional moresource
2832 Insert variables needed by target @var{THIS}.
2833 Optional argument @var{MORESOURCE} is a list of additional sources to add to the
2834 sources variable.
2835 @end deffn
2836
2837 @deffn Method ede-proj-makefile-insert-commands :AFTER this
2838 Insert the commands needed by target @var{THIS}.
2839 For targets, insert the commands needed by the chosen compiler.
2840 @end deffn
2841
2842 @deffn Method ede-proj-makefile-configuration-variables :AFTER this configuration
2843 Return a list of configuration variables from @var{THIS}.
2844 Use @var{CONFIGURATION} as the current configuration to query.
2845 @end deffn
2846
2847 @node semantic-ede-proj-target-grammar, ede-proj-target-makefile-objectcode, ede-proj-target-makefile, Targets
2848 @subsection semantic-ede-proj-target-grammar
2849 @tgindex semantic-ede-proj-target-grammar
2850
2851 @table @asis
2852 @item Inheritance Tree:
2853 @table @code
2854 @item eieio-speedbar
2855 @table @code
2856 @item eieio-speedbar-directory-button
2857 @table @code
2858 @item @w{@xref{ede-target}.}
2859 @table @code
2860 @item @w{@xref{ede-proj-target}.}
2861 @table @code
2862 @item @w{@xref{ede-proj-target-makefile}.}
2863 @table @code
2864 @item semantic-ede-proj-target-grammar
2865 No children
2866 @end table
2867 @end table
2868 @end table
2869 @end table
2870 @end table
2871 @end table
2872 @end table
2873
2874 @subsubsection Specialized Methods
2875
2876 @deffn Method project-compile-target :AFTER obj
2877 Compile all sources in a Lisp target @var{OBJ}.
2878 @end deffn
2879
2880 @deffn Method ede-proj-makefile-insert-rules :AFTER this
2881 Insert rules needed by @var{THIS} target.
2882 @end deffn
2883
2884 @deffn Method ede-buffer-mine :AFTER this buffer
2885 Return @code{t} if object @var{THIS} lays claim to the file in @var{BUFFER}.
2886 Lays claim to all -by.el, and -wy.el files.
2887 @end deffn
2888
2889 @deffn Method ede-proj-makefile-sourcevar :AFTER this
2890 Return the variable name for @var{THIS}'s sources.
2891 @end deffn
2892
2893 @deffn Method ede-proj-makefile-insert-dist-dependencies :AFTER this
2894 Insert dist dependencies, or intermediate targets.
2895 This makes sure that all grammar lisp files are created before the dist
2896 runs, so they are always up to date.
2897 Argument @var{THIS} is the target that should insert stuff.
2898 @end deffn
2899
2900
2901 @node ede-proj-target-makefile-objectcode, ede-proj-target-makefile-archive, semantic-ede-proj-target-grammar, Targets
2902 @subsection ede-proj-target-makefile-objectcode
2903 @tgindex ede-proj-target-makefile-objectcode
2904
2905 @table @asis
2906 @item Inheritance Tree:
2907 @table @code
2908 @item eieio-speedbar
2909 @table @code
2910 @item eieio-speedbar-directory-button
2911 @table @code
2912 @item @w{@xref{ede-target}.}
2913 @table @code
2914 @item @w{@xref{ede-proj-target}.}
2915 @table @code
2916 @item @w{@xref{ede-proj-target-makefile}.}
2917 @table @code
2918 @item ede-proj-target-makefile-objectcode
2919 @table @asis
2920 @item Children:
2921 @w{@xref{ede-proj-target-makefile-archive},} @w{@xref{ede-proj-target-makefile-program}.}
2922 @end table
2923 @end table
2924 @end table
2925 @end table
2926 @end table
2927 @end table
2928 @end table
2929 @end table
2930
2931 @table @asis
2932 @item Slots:
2933
2934 @table @code
2935 @item :configuration-variables
2936 Type: @code{list} @*
2937 Default Value: @code{("debug" ("CFLAGS" . "-g") ("LDFLAGS" . "-g"))}
2938
2939 @xref{ede-proj-target-makefile}.
2940 @end table
2941 @end table
2942 @subsubsection Specialized Methods
2943
2944 @deffn Method ede-buffer-header-file :AFTER this buffer
2945 There are no default header files.
2946 @end deffn
2947
2948 @deffn Method ede-proj-makefile-sourcevar :AFTER this
2949 Return the variable name for @var{THIS}'s sources.
2950 @end deffn
2951
2952 @deffn Method ede-proj-makefile-insert-variables :AFTER this &optional moresource
2953 Insert variables needed by target @var{THIS}.
2954 Optional argument @var{MORESOURCE} is not used.
2955 @end deffn
2956
2957 @deffn Method ede-proj-makefile-dependency-files :AFTER this
2958 Return a list of source files to convert to dependencies.
2959 Argument @var{THIS} is the target to get sources from.
2960 @end deffn
2961
2962
2963 @node ede-proj-target-makefile-archive, ede-proj-target-makefile-program, ede-proj-target-makefile-objectcode, Targets
2964 @subsection ede-proj-target-makefile-archive
2965 @tgindex ede-proj-target-makefile-archive
2966
2967 @table @asis
2968 @item Inheritance Tree:
2969 @table @code
2970 @item eieio-speedbar
2971 @table @code
2972 @item eieio-speedbar-directory-button
2973 @table @code
2974 @item @w{@xref{ede-target}.}
2975 @table @code
2976 @item @w{@xref{ede-proj-target}.}
2977 @table @code
2978 @item @w{@xref{ede-proj-target-makefile}.}
2979 @table @code
2980 @item @w{@xref{ede-proj-target-makefile-objectcode}.}
2981 @table @code
2982 @item ede-proj-target-makefile-archive
2983 No children
2984 @end table
2985 @end table
2986 @end table
2987 @end table
2988 @end table
2989 @end table
2990 @end table
2991 @end table
2992
2993 @subsubsection Specialized Methods
2994
2995 @deffn Method ede-proj-makefile-insert-rules :AFTER this
2996 Create the make rule needed to create an archive for @var{THIS}.
2997 @end deffn
2998
2999 @deffn Method ede-proj-makefile-insert-source-variables :PRIMARY this
3000 Insert bin_PROGRAMS variables needed by target @var{THIS}.
3001 We aren't actually inserting SOURCE details, but this is used by the
3002 Makefile.am generator, so use it to add this important bin program.
3003 @end deffn
3004
3005
3006 @node ede-proj-target-makefile-program, ede-proj-target-makefile-shared-object, ede-proj-target-makefile-archive, Targets
3007 @subsection ede-proj-target-makefile-program
3008 @tgindex ede-proj-target-makefile-program
3009
3010 @table @asis
3011 @item Inheritance Tree:
3012 @table @code
3013 @item eieio-speedbar
3014 @table @code
3015 @item eieio-speedbar-directory-button
3016 @table @code
3017 @item @w{@xref{ede-target}.}
3018 @table @code
3019 @item @w{@xref{ede-proj-target}.}
3020 @table @code
3021 @item @w{@xref{ede-proj-target-makefile}.}
3022 @table @code
3023 @item @w{@xref{ede-proj-target-makefile-objectcode}.}
3024 @table @code
3025 @item ede-proj-target-makefile-program
3026 @table @asis
3027 @item Children:
3028 @w{@xref{ede-proj-target-makefile-shared-object}.}
3029 @end table
3030 @end table
3031 @end table
3032 @end table
3033 @end table
3034 @end table
3035 @end table
3036 @end table
3037 @end table
3038
3039 @table @asis
3040 @item Slots:
3041
3042 @table @code
3043 @item :ldlibs
3044 Type: @code{list} @*
3045 Default Value: @code{nil}
3046
3047 Libraries, such as "m" or "Xt" which this program depends on.
3048 The linker flag "-l" is automatically prepended. Do not include a "lib"
3049 prefix, or a ".so" suffix.
3050
3051 Note: Currently only used for Automake projects.
3052
3053 @item :ldflags
3054 Type: @code{list} @*
3055 Default Value: @code{nil}
3056
3057 Additional flags to add when linking this target.
3058 Use ldlibs to add addition libraries. Use this to specify specific
3059 options to the linker.
3060
3061 Note: Not currently used. This bug needs to be fixed.
3062
3063 @end table
3064
3065 @end table
3066 @subsubsection Specialized Methods
3067
3068 @deffn Method project-debug-target :AFTER obj
3069 Debug a program target @var{OBJ}.
3070 @end deffn
3071
3072 @deffn Method ede-proj-makefile-insert-rules :AFTER this
3073 Insert rules needed by @var{THIS} target.
3074 @end deffn
3075
3076 @deffn Method ede-proj-makefile-insert-automake-post-variables :AFTER this
3077 Insert bin_PROGRAMS variables needed by target @var{THIS}.
3078 @end deffn
3079
3080 @deffn Method ede-proj-makefile-insert-automake-pre-variables :AFTER this
3081 Insert bin_PROGRAMS variables needed by target @var{THIS}.
3082 @end deffn
3083
3084
3085 @node ede-proj-target-makefile-shared-object, ede-proj-target-elisp, ede-proj-target-makefile-program, Targets
3086 @subsection ede-proj-target-makefile-shared-object
3087 @tgindex ede-proj-target-makefile-shared-object
3088
3089 @table @asis
3090 @item Inheritance Tree:
3091 @table @code
3092 @item eieio-speedbar
3093 @table @code
3094 @item eieio-speedbar-directory-button
3095 @table @code
3096 @item @w{@xref{ede-target}.}
3097 @table @code
3098 @item @w{@xref{ede-proj-target}.}
3099 @table @code
3100 @item @w{@xref{ede-proj-target-makefile}.}
3101 @table @code
3102 @item @w{@xref{ede-proj-target-makefile-objectcode}.}
3103 @table @code
3104 @item @w{@xref{ede-proj-target-makefile-program}.}
3105 @table @code
3106 @item ede-proj-target-makefile-shared-object
3107 No children
3108 @end table
3109 @end table
3110 @end table
3111 @end table
3112 @end table
3113 @end table
3114 @end table
3115 @end table
3116 @end table
3117
3118 @subsubsection Specialized Methods
3119
3120 @deffn Method ede-proj-configure-add-missing :AFTER this
3121 Query if any files needed by @var{THIS} provided by automake are missing.
3122 Results in --add-missing being passed to automake.
3123 @end deffn
3124
3125 @deffn Method ede-proj-makefile-sourcevar :AFTER this
3126 Return the variable name for @var{THIS}'s sources.
3127 @end deffn
3128
3129 @deffn Method ede-proj-makefile-insert-automake-post-variables :AFTER this
3130 Insert bin_PROGRAMS variables needed by target @var{THIS}.
3131 We need to override -program which has an LDADD element.
3132 @end deffn
3133
3134 @deffn Method ede-proj-makefile-target-name :AFTER this
3135 Return the name of the main target for @var{THIS} target.
3136 @end deffn
3137
3138 @deffn Method ede-proj-makefile-insert-automake-pre-variables :AFTER this
3139 Insert bin_PROGRAMS variables needed by target @var{THIS}.
3140 We aren't actually inserting SOURCE details, but this is used by the
3141 Makefile.am generator, so use it to add this important bin program.
3142 @end deffn
3143
3144
3145 @node ede-proj-target-elisp, ede-proj-target-elisp-autoloads, ede-proj-target-makefile-shared-object, Targets
3146 @subsection ede-proj-target-elisp
3147 @tgindex ede-proj-target-elisp
3148
3149 @table @asis
3150 @item Inheritance Tree:
3151 @table @code
3152 @item eieio-speedbar
3153 @table @code
3154 @item eieio-speedbar-directory-button
3155 @table @code
3156 @item @w{@xref{ede-target}.}
3157 @table @code
3158 @item @w{@xref{ede-proj-target}.}
3159 @table @code
3160 @item @w{@xref{ede-proj-target-makefile}.}
3161 @table @code
3162 @item ede-proj-target-elisp
3163 @table @asis
3164 @item Children:
3165 @w{@xref{ede-proj-target-elisp-autoloads}.}
3166 @end table
3167 @end table
3168 @end table
3169 @end table
3170 @end table
3171 @end table
3172 @end table
3173 @end table
3174
3175 @table @asis
3176 @item Slots:
3177
3178 @table @code
3179 @item :aux-packages
3180 Type: @code{list} @*
3181 Default Value: @code{nil}
3182
3183 Additional packages needed.
3184 There should only be one toplevel package per auxiliary tool needed.
3185 These packages location is found, and added to the compile time
3186 load path.
3187
3188 @end table
3189
3190 @end table
3191 @subsubsection Specialized Methods
3192
3193 @deffn Method project-compile-target :AFTER obj
3194 Compile all sources in a Lisp target @var{OBJ}.
3195 Bonus: Return a cons cell: (COMPILED . UPTODATE).
3196 @end deffn
3197
3198 @deffn Method ede-proj-flush-autoconf :AFTER this
3199 Flush the configure file (current buffer) to accommodate @var{THIS}.
3200 @end deffn
3201
3202 @deffn Method ede-buffer-mine :AFTER this buffer
3203 Return @code{t} if object @var{THIS} lays claim to the file in @var{BUFFER}.
3204 Lays claim to all .elc files that match .el files in this target.
3205 @end deffn
3206
3207 @deffn Method ede-proj-makefile-sourcevar :AFTER this
3208 Return the variable name for @var{THIS}'s sources.
3209 @end deffn
3210
3211 @deffn Method ede-proj-tweak-autoconf :AFTER this
3212 Tweak the configure file (current buffer) to accommodate @var{THIS}.
3213 @end deffn
3214
3215 @deffn Method ede-update-version-in-source :AFTER this version
3216 In a Lisp file, updated a version string for @var{THIS} to @var{VERSION}.
3217 There are standards in Elisp files specifying how the version string
3218 is found, such as a @code{-version} variable, or the standard header.
3219 @end deffn
3220
3221 @node ede-proj-target-elisp-autoloads, ede-proj-target-makefile-miscelaneous, ede-proj-target-elisp, Targets
3222 @subsection ede-proj-target-elisp-autoloads
3223 @tgindex ede-proj-target-elisp-autoloads
3224
3225 @table @asis
3226 @item Inheritance Tree:
3227 @table @code
3228 @item eieio-speedbar
3229 @table @code
3230 @item eieio-speedbar-directory-button
3231 @table @code
3232 @item @w{@xref{ede-target}.}
3233 @table @code
3234 @item @w{@xref{ede-proj-target}.}
3235 @table @code
3236 @item @w{@xref{ede-proj-target-makefile}.}
3237 @table @code
3238 @item @w{@xref{ede-proj-target-elisp}.}
3239 @table @code
3240 @item ede-proj-target-elisp-autoloads
3241 No children
3242 @end table
3243 @end table
3244 @end table
3245 @end table
3246 @end table
3247 @end table
3248 @end table
3249 @end table
3250
3251 @table @asis
3252 @item Slots:
3253
3254 @table @code
3255 @item :aux-packages
3256 Type: @code{list} @*
3257 Default Value: @code{("cedet-autogen")}
3258
3259 @xref{ede-proj-target-elisp}.
3260 @item :autoload-file
3261 Type: @code{string} @*
3262 Default Value: @code{"loaddefs.el"}
3263
3264 The file that autoload definitions are placed in.
3265 There should be one load defs file for a given package. The load defs are created
3266 for all Emacs Lisp sources that exist in the directory of the created target.
3267
3268 @item :autoload-dirs
3269 Type: @code{list} @*
3270 Default Value: @code{nil}
3271
3272 The directories to scan for autoload definitions.
3273 If @code{nil} defaults to the current directory.
3274
3275 @end table
3276
3277 @end table
3278 @subsubsection Specialized Methods
3279
3280 @deffn Method ede-proj-makefile-dependencies :AFTER this
3281 Return a string representing the dependencies for @var{THIS}.
3282 Always return an empty string for an autoloads generator.
3283 @end deffn
3284
3285 @deffn Method project-compile-target :AFTER obj
3286 Create or update the autoload target.
3287 @end deffn
3288
3289 @deffn Method ede-proj-flush-autoconf :AFTER this
3290 Flush the configure file (current buffer) to accommodate @var{THIS}.
3291 @end deffn
3292
3293 @deffn Method ede-buffer-mine :AFTER this buffer
3294 Return @code{t} if object @var{THIS} lays claim to the file in @var{BUFFER}.
3295 Lays claim to all .elc files that match .el files in this target.
3296 @end deffn
3297
3298 @deffn Method ede-proj-makefile-sourcevar :AFTER this
3299 Return the variable name for @var{THIS}'s sources.
3300 @end deffn
3301
3302 @deffn Method ede-proj-makefile-insert-dist-dependencies :AFTER this
3303 Insert any symbols that the DIST rule should depend on.
3304 Emacs Lisp autoload files ship the generated .el files.
3305 Argument @var{THIS} is the target which needs to insert an info file.
3306 @end deffn
3307
3308 @deffn Method ede-proj-tweak-autoconf :AFTER this
3309 Tweak the configure file (current buffer) to accommodate @var{THIS}.
3310 @end deffn
3311
3312 @deffn Method ede-update-version-in-source :AFTER this version
3313 In a Lisp file, updated a version string for @var{THIS} to @var{VERSION}.
3314 There are standards in Elisp files specifying how the version string
3315 is found, such as a @code{-version} variable, or the standard header.
3316 @end deffn
3317
3318 @deffn Method ede-proj-compilers :AFTER obj
3319 List of compilers being used by @var{OBJ}.
3320 If the @code{compiler} slot is empty, get the car of the compilers list.
3321 @end deffn
3322
3323 @deffn Method ede-proj-makefile-insert-dist-filepatterns :AFTER this
3324 Insert any symbols that the DIST rule should distribute.
3325 Emacs Lisp autoload files ship the generated .el files.
3326 Argument @var{THIS} is the target which needs to insert an info file.
3327 @end deffn
3328
3329 @deffn Method ede-proj-makefile-insert-source-variables :AFTER this &optional moresource
3330 Insert the source variables needed by @var{THIS}.
3331 Optional argument @var{MORESOURCE} is a list of additional sources to add to the
3332 sources variable.
3333 @end deffn
3334
3335
3336 @node ede-proj-target-makefile-miscelaneous, ede-proj-target-makefile-info, ede-proj-target-elisp-autoloads, Targets
3337 @subsection ede-proj-target-makefile-miscelaneous
3338 @tgindex ede-proj-target-makefile-miscelaneous
3339
3340 @table @asis
3341 @item Inheritance Tree:
3342 @table @code
3343 @item eieio-speedbar
3344 @table @code
3345 @item eieio-speedbar-directory-button
3346 @table @code
3347 @item @w{@xref{ede-target}.}
3348 @table @code
3349 @item @w{@xref{ede-proj-target}.}
3350 @table @code
3351 @item @w{@xref{ede-proj-target-makefile}.}
3352 @table @code
3353 @item ede-proj-target-makefile-miscelaneous
3354 No children
3355 @end table
3356 @end table
3357 @end table
3358 @end table
3359 @end table
3360 @end table
3361 @end table
3362
3363 @table @asis
3364 @item Slots:
3365
3366 @table @code
3367 @item :submakefile
3368 Type: @code{string} @*
3369 Default Value: @code{""}
3370
3371 Miscellaneous sources which have a specialized makefile.
3372 The sub-makefile is used to build this target.
3373
3374 @end table
3375
3376 @end table
3377 @subsubsection Specialized Methods
3378
3379 @deffn Method ede-proj-makefile-insert-rules :AFTER this
3380 Create the make rule needed to create an archive for @var{THIS}.
3381 @end deffn
3382
3383 @deffn Method ede-proj-makefile-sourcevar :AFTER this
3384 Return the variable name for @var{THIS}'s sources.
3385 @end deffn
3386
3387 @deffn Method ede-proj-makefile-dependency-files :AFTER this
3388 Return a list of files which @var{THIS} target depends on.
3389 @end deffn
3390
3391
3392 @node ede-proj-target-makefile-info, ede-proj-target-scheme, ede-proj-target-makefile-miscelaneous, Targets
3393 @subsection ede-proj-target-makefile-info
3394 @tgindex ede-proj-target-makefile-info
3395
3396 @table @asis
3397 @item Inheritance Tree:
3398 @table @code
3399 @item eieio-speedbar
3400 @table @code
3401 @item eieio-speedbar-directory-button
3402 @table @code
3403 @item @w{@xref{ede-target}.}
3404 @table @code
3405 @item @w{@xref{ede-proj-target}.}
3406 @table @code
3407 @item @w{@xref{ede-proj-target-makefile}.}
3408 @table @code
3409 @item ede-proj-target-makefile-info
3410 No children
3411 @end table
3412 @end table
3413 @end table
3414 @end table
3415 @end table
3416 @end table
3417 @end table
3418
3419 @table @asis
3420 @item Slots:
3421
3422 @table @code
3423 @item :mainmenu
3424 Type: @code{string} @*
3425 Default Value: @code{""}
3426
3427 The main menu resides in this file.
3428 All other sources should be included independently.
3429
3430 @end table
3431
3432 @end table
3433 @subsubsection Specialized Methods
3434
3435 @deffn Method ede-proj-configure-add-missing :AFTER this
3436 Query if any files needed by @var{THIS} provided by automake are missing.
3437 Results in --add-missing being passed to automake.
3438 @end deffn
3439
3440 @deffn Method object-write :AFTER this
3441 Before committing any change to @var{THIS}, make sure the mainmenu is first.
3442 @end deffn
3443
3444 @deffn Method ede-proj-makefile-sourcevar :AFTER this
3445 Return the variable name for @var{THIS}'s sources.
3446 @end deffn
3447
3448 @deffn Method ede-proj-makefile-insert-dist-dependencies :AFTER this
3449 Insert any symbols that the DIST rule should depend on.
3450 Texinfo files want to insert generated `.info' files.
3451 Argument @var{THIS} is the target which needs to insert an info file.
3452 @end deffn
3453
3454 @deffn Method ede-proj-makefile-target-name :AFTER this
3455 Return the name of the main target for @var{THIS} target.
3456 @end deffn
3457
3458 @deffn Method ede-documentation :AFTER this
3459 Return a list of files that provides documentation.
3460 Documentation is not for object @var{THIS}, but is provided by @var{THIS} for other
3461 files in the project.
3462 @end deffn
3463
3464 @deffn Method ede-proj-makefile-insert-dist-filepatterns :AFTER this
3465 Insert any symbols that the DIST rule should depend on.
3466 Texinfo files want to insert generated `.info' files.
3467 Argument @var{THIS} is the target which needs to insert an info file.
3468 @end deffn
3469
3470 @deffn Method ede-proj-makefile-insert-source-variables :AFTER this &optional moresource
3471 Insert the source variables needed by @var{THIS} info target.
3472 Optional argument @var{MORESOURCE} is a list of additional sources to add to the
3473 sources variable.
3474 Does the usual for Makefile mode, but splits source into two variables
3475 when working in Automake mode.
3476 @end deffn
3477
3478 @node ede-proj-target-scheme, project-am-target, ede-proj-target-makefile-info, Targets
3479 @subsection ede-proj-target-scheme
3480 @tgindex ede-proj-target-scheme
3481
3482 @table @asis
3483 @item Inheritance Tree:
3484 @table @code
3485 @item eieio-speedbar
3486 @table @code
3487 @item eieio-speedbar-directory-button
3488 @table @code
3489 @item @w{@xref{ede-target}.}
3490 @table @code
3491 @item @w{@xref{ede-proj-target}.}
3492 @table @code
3493 @item ede-proj-target-scheme
3494 No children
3495 @end table
3496 @end table
3497 @end table
3498 @end table
3499 @end table
3500 @end table
3501
3502 @table @asis
3503 @item Slots:
3504
3505 @table @code
3506 @item :interpreter
3507 Type: @code{string} @*
3508 Default Value: @code{"guile"}
3509
3510 The preferred interpreter for this code.
3511
3512 @end table
3513
3514 @end table
3515 @subsubsection Specialized Methods
3516
3517 @deffn Method ede-proj-tweak-autoconf :AFTER this
3518 Tweak the configure file (current buffer) to accommodate @var{THIS}.
3519 @end deffn
3520
3521
3522 @node project-am-target, project-am-objectcode, ede-proj-target-scheme, Targets
3523 @subsection project-am-target
3524 @tgindex project-am-target
3525
3526 @table @asis
3527 @item Inheritance Tree:
3528 @table @code
3529 @item eieio-speedbar
3530 @table @code
3531 @item eieio-speedbar-directory-button
3532 @table @code
3533 @item @w{@xref{ede-target}.}
3534 @table @code
3535 @item project-am-target
3536 @table @asis
3537 @item Children:
3538 @w{@xref{project-am-objectcode},} @w{project-am-header,} @w{@xref{project-am-lisp},} @w{@xref{project-am-texinfo},} @w{@xref{project-am-man}.}
3539 @end table
3540 @end table
3541 @end table
3542 @end table
3543 @end table
3544 @end table
3545
3546 @subsubsection Specialized Methods
3547
3548 @deffn Method project-compile-target-command :AFTER this
3549 Default target to use when compiling a given target.
3550 @end deffn
3551
3552 @deffn Method project-make-dist :AFTER this
3553 Run the current project in the debugger.
3554 @end deffn
3555
3556 @deffn Method project-edit-file-target :AFTER obj
3557 Edit the target associated w/ this file.
3558 @end deffn
3559
3560 @node project-am-objectcode, project-am-program, project-am-target, Targets
3561 @subsection project-am-objectcode
3562 @tgindex project-am-objectcode
3563
3564 @table @asis
3565 @item Inheritance Tree:
3566 @table @code
3567 @item eieio-speedbar
3568 @table @code
3569 @item eieio-speedbar-directory-button
3570 @table @code
3571 @item @w{@xref{ede-target}.}
3572 @table @code
3573 @item @w{@xref{project-am-target}.}
3574 @table @code
3575 @item project-am-objectcode
3576 @table @asis
3577 @item Children:
3578 @w{@xref{project-am-program},} @w{project-am-lib.}
3579 @end table
3580 @end table
3581 @end table
3582 @end table
3583 @end table
3584 @end table
3585 @end table
3586
3587 @subsubsection Specialized Methods
3588
3589 @deffn Method project-am-macro :AFTER this
3590 Return the default macro to 'edit' for this object type.
3591 @end deffn
3592
3593 @deffn Method project-debug-target :AFTER obj
3594 Run the current project target in a debugger.
3595 @end deffn
3596
3597 @deffn Method project-compile-target-command :AFTER this
3598 Default target to use when compiling an object code target.
3599 @end deffn
3600
3601 @deffn Method ede-buffer-header-file :AFTER this buffer
3602 There are no default header files.
3603 @end deffn
3604
3605 @node project-am-program, project-am-header-noinst, project-am-objectcode, Targets
3606 @subsection project-am-program
3607 @tgindex project-am-program
3608
3609 @table @asis
3610 @item Inheritance Tree:
3611 @table @code
3612 @item eieio-speedbar
3613 @table @code
3614 @item eieio-speedbar-directory-button
3615 @table @code
3616 @item @w{@xref{ede-target}.}
3617 @table @code
3618 @item @w{@xref{project-am-target}.}
3619 @table @code
3620 @item @w{@xref{project-am-objectcode}.}
3621 @table @code
3622 @item project-am-program
3623 No children
3624 @end table
3625 @end table
3626 @end table
3627 @end table
3628 @end table
3629 @end table
3630 @end table
3631
3632 @table @asis
3633 @item Slots:
3634
3635 @table @code
3636 @item :ldadd @*
3637 Default Value: @code{nil}
3638
3639 Additional LD args.
3640 @end table
3641 @end table
3642
3643 @node project-am-header-noinst, project-am-header-inst, project-am-program, Targets
3644 @subsection project-am-header-noinst
3645 @tgindex project-am-header-noinst
3646
3647 @table @asis
3648 @item Inheritance Tree:
3649 @table @code
3650 @item eieio-speedbar
3651 @table @code
3652 @item eieio-speedbar-directory-button
3653 @table @code
3654 @item @w{@xref{ede-target}.}
3655 @table @code
3656 @item @w{@xref{project-am-target}.}
3657 @table @code
3658 @item @w{project-am-header.}
3659 @table @code
3660 @item project-am-header-noinst
3661 No children
3662 @end table
3663 @end table
3664 @end table
3665 @end table
3666 @end table
3667 @end table
3668 @end table
3669
3670 @subsubsection Specialized Methods
3671
3672 @deffn Method project-am-macro :AFTER this
3673 Return the default macro to 'edit' for this object.
3674 @end deffn
3675
3676 @node project-am-header-inst, project-am-lisp, project-am-header-noinst, Targets
3677 @subsection project-am-header-inst
3678 @tgindex project-am-header-inst
3679
3680 @table @asis
3681 @item Inheritance Tree:
3682 @table @code
3683 @item eieio-speedbar
3684 @table @code
3685 @item eieio-speedbar-directory-button
3686 @table @code
3687 @item @w{@xref{ede-target}.}
3688 @table @code
3689 @item @w{@xref{project-am-target}.}
3690 @table @code
3691 @item @w{project-am-header.}
3692 @table @code
3693 @item project-am-header-inst
3694 No children
3695 @end table
3696 @end table
3697 @end table
3698 @end table
3699 @end table
3700 @end table
3701 @end table
3702
3703 @subsubsection Specialized Methods
3704
3705 @deffn Method project-am-macro :AFTER this
3706 Return the default macro to 'edit' for this object.
3707 @end deffn
3708
3709 @node project-am-lisp, project-am-texinfo, project-am-header-inst, Targets
3710 @subsection project-am-lisp
3711 @tgindex project-am-lisp
3712
3713 @table @asis
3714 @item Inheritance Tree:
3715 @table @code
3716 @item eieio-speedbar
3717 @table @code
3718 @item eieio-speedbar-directory-button
3719 @table @code
3720 @item @w{@xref{ede-target}.}
3721 @table @code
3722 @item @w{@xref{project-am-target}.}
3723 @table @code
3724 @item project-am-lisp
3725 No children
3726 @end table
3727 @end table
3728 @end table
3729 @end table
3730 @end table
3731 @end table
3732
3733 @subsubsection Specialized Methods
3734
3735 @deffn Method project-am-macro :AFTER this
3736 Return the default macro to 'edit' for this object.
3737 @end deffn
3738
3739 @node project-am-texinfo, project-am-man, project-am-lisp, Targets
3740 @subsection project-am-texinfo
3741 @tgindex project-am-texinfo
3742
3743 @table @asis
3744 @item Inheritance Tree:
3745 @table @code
3746 @item eieio-speedbar
3747 @table @code
3748 @item eieio-speedbar-directory-button
3749 @table @code
3750 @item @w{@xref{ede-target}.}
3751 @table @code
3752 @item @w{@xref{project-am-target}.}
3753 @table @code
3754 @item project-am-texinfo
3755 No children
3756 @end table
3757 @end table
3758 @end table
3759 @end table
3760 @end table
3761 @end table
3762
3763 @table @asis
3764 @item Slots:
3765
3766 @table @code
3767 @item :include @*
3768 Default Value: @code{nil}
3769
3770 Additional texinfo included in this one.
3771
3772 @end table
3773 @end table
3774 @subsubsection Specialized Methods
3775
3776 @deffn Method project-am-macro :AFTER this
3777 Return the default macro to 'edit' for this object type.
3778 @end deffn
3779
3780 @deffn Method project-compile-target-command :AFTER this
3781 Default target to use when compiling a texinfo file.
3782 @end deffn
3783
3784 @deffn Method ede-documentation :AFTER this
3785 Return a list of files that provides documentation.
3786 Documentation is not for object @var{THIS}, but is provided by @var{THIS} for other
3787 files in the project.
3788 @end deffn
3789
3790 @node project-am-man, , project-am-texinfo, Targets
3791 @comment node-name, next, previous, up
3792 @subsection project-am-man
3793 @tgindex project-am-man
3794
3795 @table @asis
3796 @item Inheritance Tree:
3797 @table @code
3798 @item eieio-speedbar
3799 @table @code
3800 @item eieio-speedbar-directory-button
3801 @table @code
3802 @item @w{@xref{ede-target}.}
3803 @table @code
3804 @item @w{@xref{project-am-target}.}
3805 @table @code
3806 @item project-am-man
3807 No children
3808 @end table
3809 @end table
3810 @end table
3811 @end table
3812 @end table
3813 @end table
3814
3815 @subsubsection Specialized Methods
3816
3817 @deffn Method project-am-macro :AFTER this
3818 Return the default macro to 'edit' for this object type.
3819 @end deffn
3820
3821 @node Sourcecode, Compilers, Targets, Extending EDE
3822 @section Sourcecode
3823
3824 The source code type is an object designed to associated files with
3825 targets.
3826
3827 @menu
3828 * ede-sourcecode::
3829 @end menu
3830
3831
3832 @node ede-sourcecode, , Sourcecode, Sourcecode
3833 @subsection ede-sourcecode
3834 @scindex ede-sourcecode
3835
3836 @table @asis
3837 @item Inheritance Tree:
3838 @table @code
3839 @item eieio-instance-inheritor
3840 @table @code
3841 @item ede-sourcecode
3842 No children
3843 @end table
3844 @end table
3845 @end table
3846
3847 @table @asis
3848 @item Slots:
3849
3850 @table @code
3851 @item :parent-instance
3852 Type: @code{eieio-instance-inheritor-child}
3853
3854 The parent of this instance.
3855 If a slot of this class is reference, and is unbound, then the parent
3856 is checked for a value.
3857
3858 @item :name
3859 Type: @code{string}
3860
3861 The name of this type of source code.
3862 Such as "C" or "Emacs Lisp"
3863
3864 @item :sourcepattern
3865 Type: @code{string} @*
3866 Default Value: @code{".*"}
3867
3868 Emacs regex matching sourcecode this target accepts.
3869
3870 @item :auxsourcepattern
3871 Type: @code{(or null string)} @*
3872 Default Value: @code{nil}
3873
3874 Emacs regex matching auxiliary source code this target accepts.
3875 Aux source are source code files needed for compilation, which are not compiled
3876 themselves.
3877
3878 @item :enable-subdirectories
3879 Type: @code{boolean} @*
3880 Default Value: @code{nil}
3881
3882 Non @code{nil} if this sourcecode type uses subdirectores.
3883 If sourcecode always lives near the target creating it, this should be nil.
3884 If sourcecode can, or typically lives in a subdirectory of the owning
3885 target, set this to t.
3886
3887 @item :garbagepattern
3888 Type: @code{list} @*
3889 Default Value: @code{nil}
3890
3891 Shell file regex matching files considered as garbage.
3892 This is a list of items added to an @code{rm} command when executing a @code{clean}
3893 type directive.
3894
3895 @end table
3896
3897 @end table
3898 @subsubsection Specialized Methods
3899
3900 @deffn Method ede-want-any-files-p :AFTER this filenames
3901 Return non-@code{nil} if @var{THIS} will accept any files in @var{FILENAMES}.
3902 @end deffn
3903
3904 @deffn Method ede-want-any-source-files-p :AFTER this filenames
3905 Return non-@code{nil} if @var{THIS} will accept any source files in @var{FILENAMES}.
3906 @end deffn
3907
3908 @deffn Method ede-want-any-auxiliary-files-p :AFTER this filenames
3909 Return non-@code{nil} if @var{THIS} will accept any aux files in @var{FILENAMES}.
3910 @end deffn
3911
3912 @deffn Method ede-buffer-header-file :AFTER this filename
3913 Return a list of file names of header files for @var{THIS} with @var{FILENAME}.
3914 Used to guess header files, but uses the auxsource regular expression.
3915 @end deffn
3916
3917 @deffn Method ede-want-file-p :AFTER this filename
3918 Return non-@code{nil} if sourcecode definition @var{THIS} will take @var{FILENAME}.
3919 @end deffn
3920
3921 @deffn Method ede-want-file-source-p :AFTER this filename
3922 Return non-@code{nil} if @var{THIS} will take @var{FILENAME} as an auxiliary .
3923 @end deffn
3924
3925 @deffn Method ede-want-file-auxiliary-p :AFTER this filename
3926 Return non-@code{nil} if @var{THIS} will take @var{FILENAME} as an auxiliary .
3927 @end deffn
3928
3929 @node Compilers, , Sourcecode, Extending EDE
3930 @section Compilers
3931
3932 The compiler object is designed to associate source code with
3933 compilers. The target then references the compilers it can use.
3934 When the makefile is created, this object type knows how to create
3935 compile commands.
3936
3937 @menu
3938 * ede-compilation-program::
3939 * ede-compiler::
3940 * ede-object-compiler::
3941 * ede-linker::
3942 @end menu
3943
3944
3945 @node ede-compilation-program, ede-compiler, Compilers, Compilers
3946 @subsection ede-compilation-program
3947 @cmindex ede-compilation-program
3948
3949 @table @asis
3950 @item Inheritance Tree:
3951 @table @code
3952 @item eieio-instance-inheritor
3953 @table @code
3954 @item ede-compilation-program
3955 @table @asis
3956 @item Children:
3957 @w{@xref{ede-compiler},} @w{@xref{ede-linker}.}
3958 @end table
3959 @end table
3960 @end table
3961 @end table
3962
3963 @table @asis
3964 @item Slots:
3965
3966 @table @code
3967 @item :parent-instance
3968 Type: @code{eieio-instance-inheritor-child}
3969
3970 The parent of this instance.
3971 If a slot of this class is reference, and is unbound, then the parent
3972 is checked for a value.
3973
3974 @item :name
3975 Type: @code{string}
3976
3977 Name of this type of compiler.
3978
3979 @item :variables
3980 Type: @code{list}
3981
3982 Variables needed in the Makefile for this compiler.
3983 An assoc list where each element is (VARNAME . VALUE) where VARNAME
3984 is a string, and VALUE is either a string, or a list of strings.
3985 For example, GCC would define CC=gcc, and emacs would define EMACS=emacs.
3986
3987 @item :sourcetype
3988 Type: @code{list}
3989
3990 A list of @code{ede-sourcecode} @xref{ede-sourcecode}. objects this class will handle.
3991 This is used to match target objects with the compilers and linkers
3992 they can use, and which files this object is interested in.
3993
3994 @item :rules
3995 Type: @code{list} @*
3996 Default Value: @code{nil}
3997
3998 Auxiliary rules needed for this compiler to run.
3999 For example, yacc/lex files need additional chain rules, or inferences.
4000
4001 @item :commands
4002 Type: @code{list}
4003
4004 The commands used to execute this compiler.
4005 The object which uses this compiler will place these commands after
4006 it's rule definition.
4007
4008 @item :autoconf
4009 Type: @code{list} @*
4010 Default Value: @code{nil}
4011
4012 Autoconf function to call if this type of compiler is used.
4013 When a project is in Automake mode, this defines the autoconf function to
4014 call to initialize automake to use this compiler.
4015 For example, there may be multiple C compilers, but they all probably
4016 use the same autoconf form.
4017
4018 @item :objectextention
4019 Type: @code{string}
4020
4021 A string which is the extension used for object files.
4022 For example, C code uses .o on unix, and Emacs Lisp uses .elc.
4023
4024 @end table
4025
4026 @end table
4027 @subsubsection Specialized Methods
4028
4029 @deffn Method ede-proj-flush-autoconf :AFTER this
4030 Flush the configure file (current buffer) to accommodate @var{THIS}.
4031 @end deffn
4032
4033 @deffn Method ede-proj-makefile-insert-rules :AFTER this
4034 Insert rules needed for @var{THIS} compiler object.
4035 @end deffn
4036
4037 @deffn Method ede-proj-makefile-insert-variables :AFTER this
4038 Insert variables needed by the compiler @var{THIS}.
4039 @end deffn
4040
4041 @deffn Method ede-proj-makefile-insert-commands :AFTER this
4042 Insert the commands needed to use compiler @var{THIS}.
4043 The object creating makefile rules must call this method for the
4044 compiler it decides to use after inserting in the rule.
4045 @end deffn
4046
4047 @deffn Method ede-object-sourcecode :AFTER this
4048 Retrieves the slot @code{sourcetype} from an object of class @code{ede-compilation-program}
4049 @end deffn
4050
4051 @deffn Method ede-proj-tweak-autoconf :AFTER this
4052 Tweak the configure file (current buffer) to accommodate @var{THIS}.
4053 @end deffn
4054
4055
4056 @node ede-compiler, ede-object-compiler, ede-compilation-program, Compilers
4057 @subsection ede-compiler
4058 @cmindex ede-compiler
4059
4060 @table @asis
4061 @item Inheritance Tree:
4062 @table @code
4063 @item eieio-instance-inheritor
4064 @table @code
4065 @item @w{@xref{ede-compilation-program}.}
4066 @table @code
4067 @item ede-compiler
4068 @table @asis
4069 @item Children:
4070 @w{@xref{ede-object-compiler},} @w{semantic-ede-grammar-compiler-class.}
4071 @end table
4072
4073 @end table
4074
4075 @end table
4076
4077 @end table
4078 @end table
4079
4080 Create a new object with name NAME of class type ede-compiler
4081
4082 @table @asis
4083 @item Slots:
4084
4085 @table @code
4086 @item :parent-instance
4087 Type: @code{eieio-instance-inheritor-child}
4088
4089 The parent of this instance.
4090 If a slot of this class is reference, and is unbound, then the parent
4091 is checked for a value.
4092
4093 @item :name
4094 Type: @code{string}
4095
4096 Name of this type of compiler.
4097
4098 @item :variables
4099 Type: @code{list}
4100
4101 Variables needed in the Makefile for this compiler.
4102 An assoc list where each element is (VARNAME . VALUE) where VARNAME
4103 is a string, and VALUE is either a string, or a list of strings.
4104 For example, GCC would define CC=gcc, and emacs would define EMACS=emacs.
4105
4106 @item :sourcetype
4107 Type: @code{list}
4108
4109 A list of @code{ede-sourcecode} @xref{ede-sourcecode}. objects this class will handle.
4110 This is used to match target objects with the compilers and linkers
4111 they can use, and which files this object is interested in.
4112
4113 @item :commands
4114 Type: @code{list}
4115
4116 The commands used to execute this compiler.
4117 The object which uses this compiler will place these commands after
4118 it's rule definition.
4119
4120 @item :objectextention
4121 Type: @code{string}
4122
4123 A string which is the extension used for object files.
4124 For example, C code uses .o on unix, and Emacs Lisp uses .elc.
4125
4126 @item :makedepends
4127 Type: @code{boolean} @*
4128 Default Value: @code{nil}
4129
4130 Non-@code{nil} if this compiler can make dependencies.
4131
4132 @item :uselinker
4133 Type: @code{boolean} @*
4134 Default Value: @code{nil}
4135
4136 Non-@code{nil} if this compiler creates code that can be linked.
4137 This requires that the containing target also define a list of available
4138 linkers that can be used.
4139
4140 @end table
4141
4142 @end table
4143 @subsubsection Specialized Methods
4144
4145 @deffn Method ede-proj-makefile-insert-object-variables :AFTER this targetname sourcefiles
4146 Insert an OBJ variable to specify object code to be generated for @var{THIS}.
4147 The name of the target is @var{TARGETNAME} as a string. @var{SOURCEFILES} is the list of
4148 files to be objectified.
4149 Not all compilers do this.
4150 @end deffn
4151
4152 @deffn Method ede-compiler-intermediate-objects-p :AFTER this
4153 Return non-@code{nil} if @var{THIS} has intermediate object files.
4154 If this compiler creates code that can be linked together,
4155 then the object files created by the compiler are considered intermediate.
4156 @end deffn
4157
4158 @deffn Method ede-compiler-intermediate-object-variable :AFTER this targetname
4159 Return a string based on @var{THIS} representing a make object variable.
4160 @var{TARGETNAME} is the name of the target that these objects belong to.
4161 @end deffn
4162
4163
4164 @node ede-object-compiler, ede-linker, ede-compiler, Compilers
4165 @subsection ede-object-compiler
4166 @cmindex ede-object-compiler
4167
4168 @table @asis
4169 @item Inheritance Tree:
4170 @table @code
4171 @item eieio-instance-inheritor
4172 @table @code
4173 @item @w{@xref{ede-compilation-program}.}
4174 @table @code
4175 @item @w{@xref{ede-compiler}.}
4176 @table @code
4177 @item ede-object-compiler
4178 No children
4179 @end table
4180 @end table
4181 @end table
4182 @end table
4183 @end table
4184
4185 @table @asis
4186 @item Slots:
4187
4188 @table @code
4189 @item :uselinker
4190 Type: @code{boolean} @*
4191 Default Value: @code{t}
4192
4193 @xref{ede-compiler}.
4194 @item :dependencyvar
4195 Type: @code{list}
4196
4197 A variable dedicated to dependency generation.
4198 @end table
4199 @end table
4200
4201 @subsubsection Specialized Methods
4202
4203 @deffn Method ede-proj-makefile-insert-variables :AFTER this
4204 Insert variables needed by the compiler @var{THIS}.
4205 @end deffn
4206
4207 @node ede-linker, , ede-object-compiler, Compilers
4208 @subsection ede-linker
4209 @cmindex ede-linker
4210
4211 @table @asis
4212 @item Inheritance Tree:
4213 @table @code
4214 @item eieio-instance-inheritor
4215 @table @code
4216 @item @w{@xref{ede-compilation-program}.}
4217 @table @code
4218 @item ede-linker
4219 No children
4220 @end table
4221
4222 @end table
4223
4224 @end table
4225 @end table
4226
4227 Create a new object with name NAME of class type ede-linker
4228
4229 @table @asis
4230 @item Slots:
4231
4232 @table @code
4233 @item :name
4234 Type: @code{string}
4235
4236 Name of this type of compiler.
4237
4238 @item :variables
4239 Type: @code{list}
4240
4241 Variables needed in the Makefile for this compiler.
4242 An assoc list where each element is (VARNAME . VALUE) where VARNAME
4243 is a string, and VALUE is either a string, or a list of strings.
4244 For example, GCC would define CC=gcc, and emacs would define EMACS=emacs.
4245
4246 @item :sourcetype
4247 Type: @code{list}
4248
4249 A list of @code{ede-sourcecode} @xref{ede-sourcecode}. objects this class will handle.
4250 This is used to match target objects with the compilers and linkers
4251 they can use, and which files this object is interested in.
4252
4253 @item :commands
4254 Type: @code{list}
4255
4256 The commands used to execute this compiler.
4257 The object which uses this compiler will place these commands after
4258 it's rule definition.
4259
4260 @item :objectextention
4261 Type: @code{string}
4262
4263 A string which is the extension used for object files.
4264 For example, C code uses .o on unix, and Emacs Lisp uses .elc.
4265
4266 @end table
4267 @end table
4268
4269 @node GNU Free Documentation License, , Extending EDE, Top
4270 @appendix GNU Free Documentation License
4271 @include doclicense.texi
4272
4273 @bye