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