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