]> code.delx.au - gnu-emacs/blobdiff - doc/misc/ede.texi
* configure.ac (HAVE_DATA_START): Fix test. (Bug#13818)
[gnu-emacs] / doc / misc / ede.texi
index 1299f2ff0625c3e5f71c9ae69fba6def0767c96d..f2e787fd5888965a1195fa231e0937712cadcc45 100644 (file)
@@ -5,7 +5,8 @@
 @copying
 This file describes EDE, the Emacs Development Environment.
 
-Copyright @copyright{} 1998-2001, 2004-2005, 2008-2012  Free Software Foundation, Inc.
+Copyright @copyright{} 1998--2001, 2004--2005, 2008--2013
+Free Software Foundation, Inc.
 
 @quotation
 Permission is granted to copy, distribute and/or modify this document
@@ -16,8 +17,7 @@ and with the Back-Cover Texts as in (a) below.  A copy of the license
 is included in the section entitled ``GNU Free Documentation License.''
 
 (a) The FSF's Back-Cover Text is: ``You have the freedom to copy and
-modify this GNU manual.  Buying copies from the FSF supports it in
-developing GNU and promoting software freedom.''
+modify this GNU manual.''
 @end quotation
 @end copying
 
@@ -63,7 +63,7 @@ developing GNU and promoting software freedom.''
 
 @contents
 
-@node top, EDE Project Concepts, (dir), (dir)
+@node Top, EDE Project Concepts, (dir), (dir)
 @top EDE
 @comment  node-name,  next,  previous,  up
 
@@ -88,9 +88,10 @@ learn and adopt GNU ways of doing things.
 * Building and Debugging::      Initiating a build or debug session.
 * Miscellaneous commands::      Other project related commands.
 * Extending EDE::               Programming and extending @ede{}.
+* GNU Free Documentation License::  The license for this documentation.
 @end menu
 
-@node EDE Project Concepts, EDE Mode, top, top
+@node EDE Project Concepts, EDE Mode, Top, Top
 @chapter @ede{} Project Concepts
 
 @ede{} is a generic interface for managing projects.  It specifies a
@@ -125,7 +126,7 @@ of search to files in a single target, or to discover the location of
 documentation or interface files.  @ede{} can provide this
 information.
 
-@node EDE Mode, Quick Start, EDE Project Concepts, top
+@node EDE Mode, Quick Start, EDE Project Concepts, Top
 @chapter @ede{} Mode
 
 @ede{} is implemented as a minor mode, which augments other modes such
@@ -142,7 +143,7 @@ bar.  This menu provides several menu items for high-level @ede{}
 commands.  These menu items, and their corresponding keybindings, are
 independent of the type of project you are actually working on.
 
-@node Quick Start, Creating a project, EDE Mode, top
+@node Quick Start, Creating a project, EDE Mode, Top
 @chapter Quick Start
 
 Once you have @ede{} enabled, you can create a project.  This chapter
@@ -438,7 +439,7 @@ C-c . R RET RET
 If your program takes command line arguments, you can type them in
 when it offers the command line you want to use to run your program.
 
-@node Creating a project, Modifying your project, Quick Start, top
+@node Creating a project, Modifying your project, Quick Start, Top
 @chapter Creating a project
 
 To create a new project, first visit a file that you want to include
@@ -449,9 +450,11 @@ ede-new}, or click on the @samp{Create Project} item in the
 
 The @command{ede-new} command prompts for the type of project you
 would like to create.  Each project type has its own benefits or
-language specific enhancements.  @ede{} supports four different
-project types: @samp{Make}, @samp{Automake}, @samp{direct Automake},
-and @samp{Simple}.
+language specific enhancements.  Not all projects that @ede{} supports
+also allow creating a new project.  Projects such as @code{emacs}
+or @code{linux} are designed to recognize existing projects only.
+Project types such as @samp{Make} and @samp{Automake} do support
+creating new project types with @command{ede-new}.
 
 @itemize
 @item
@@ -467,21 +470,6 @@ Unlike a @samp{Make} project, this project autogenerates a
 @file{Makefile.am} file.  @ede{} handles the Automake bootstrapping
 routines, which import and maintain a @file{configure.am} script and
 other required files.
-
-@item
-For the @samp{direct Automake} project type, @ede{} reads directly
-from the Automake files.
-
-You cannot create direct Automake projects with the @command{ede-new}
-command.  Instead, when you visit a project with existing Automake
-files, @ede{} automatically detects them.
-
-@item
-The @samp{Simple} project type provides light-weight constructs for
-identifying a project root and looking up files.  If you already have
-a non-@ede{} project infrastructure, you can use a @samp{Simple}
-project to provide other Emacs packages, such as Semantic, with some
-information about the project.  @xref{Simple projects}.
 @end itemize
 
 A subproject is merely a project in a subdirectory of another project.
@@ -496,7 +484,7 @@ the top-most project's makefile as a starting place for the build.  How
 the toplevel project handles subprojects in the build process is
 dependent on that project's type.
 
-@node Modifying your project, Building and Debugging, Creating a project, top
+@node Modifying your project, Building and Debugging, Creating a project, Top
 @chapter Modifying your project
 
 In this chapter, we describe the generic features for manipulating
@@ -677,7 +665,7 @@ block for ``configurations''.  Add a new named configuration here.
 To switch between different active configurations, modify the
 ``configuration default'' slot.
 
-@node Building and Debugging, Miscellaneous commands, Modifying your project, top
+@node Building and Debugging, Miscellaneous commands, Modifying your project, Top
 @chapter Building and Debugging
 
 @ede{} provides the following ``project-aware'' compilation and
@@ -696,7 +684,7 @@ Build a distribution file for your project.
 
 These commands are also available from the @samp{Development} menu.
 
-@node Miscellaneous commands, Extending EDE, Building and Debugging, top
+@node Miscellaneous commands, Extending EDE, Building and Debugging, Top
 @chapter Miscellaneous commands
 
 If you opt to go in and edit @ede{} project files directly---for
@@ -794,24 +782,19 @@ able to find your SDK and compile your programs.
 @node Simple projects
 @section Simple Projects
 
-There is a wide array of Simple projects.  The root for simple
-projects is the class @code{ede-simple-project}.  This handles the
-infrastructure of storing a .ede file if needed.
-
-The class @code{ede-simple-project} is designed to be subclassed.
-Then key @ede{} methods can be overridden to provide a quick wrapper
-over any project.
+There is a wide array of simple projects.  In this case a simple
+project is one that detects, or is directed to identify a directory as
+belonging to a project, but doesn't provide many features of a typical
+@ede{} project.  Having the project however allows tools such as
+@semantic{} to find sources and perform project level completions.
 
-A second project type is @code{ede-cpp-root}.  This project type is
-designed to be created for a directory hierarchy full of C/C++ code.
-It can be configured with minimal lisp knowledge to do header file
-lookup for @semantic{}, improving code completion performance.
 
 @menu
 * ede-cpp-root::                This project marks the root of a C/C++ code project.
 * ede-java-root::               This project marks the root of a Java project.
 * ede-emacs::                   A project for working with Emacs.
 * ede-linux::                   A project for working with Linux kernels.
+* ede-generic-project::         A project type for wrapping build systems with EDE.
 * Custom Locate::               Customizing how to locate files in a simple project
 @end menu
 
@@ -1044,7 +1027,7 @@ tree, and enables EDE project mode for it.
 It pre-populates the C Preprocessor symbol map for correct parsing,
 and has an optimized include file identification function.
 
-@node ede-linux, Custom Locate, ede-emacs, Simple projects
+@node ede-linux, ede-generic-project, ede-emacs, Simple projects
 @subsection ede-linux
 
 The @code{ede-linux} project will automatically identify a Linux
@@ -1053,16 +1036,67 @@ Kernel source tree, and enable EDE project mode for it.
 It pre-populates the C Preprocessor symbol map for reasonable parsing,
 and has an optimized include file identification function.
 
-@node Custom Locate,  , ede-linux, Simple projects
+@node ede-generic-project, Custom Locate, ede-linux, Simple projects
+@subsection ede-generic-project
+
+The @code{ede-generic-project} is a project system that makes it easy
+to wrap up different kinds of build systems as an EDE project.
+Projects such as @ref{ede-emacs} require coding skills to create.
+Generic projects also require writing Emacs Lisp code, but the
+requirements are minimal.  You can then use
+@command{customize-project} to configure build commands, includes, and
+other options for that project.  The configuration is saved in
+@file{EDEConfig.el}.
+
+Generic projects are disabled by default because they have the
+potential to interfere with other projects.  To use the generic
+project system to start detecting projects, you need to enable it.
+
+@deffn Command ede-enable-generic-projects
+Enable generic project loaders.
+
+This enables generic loaders for projects that are detected using
+either a @file{Makefile}, @file{SConstruct}, or @file{CMakeLists}.
+
+You do not need to use this command if you create your own generic
+project type.
+@end deffn
+
+If you want to create your own generic project loader, you need to
+define your own project and target classes, and create an autoloader.
+The example for Makefiles looks like this:
+
+@example
+;;; MAKEFILE
+
+(defclass ede-generic-makefile-project (ede-generic-project)
+  ((buildfile :initform "Makefile")
+   )
+  "Generic Project for makefiles.")
+
+(defmethod ede-generic-setup-configuration ((proj ede-generic-makefile-project) config)
+  "Setup a configuration for Make."
+  (oset config build-command "make -k")
+  (oset config debug-command "gdb ")
+  )
+
+(ede-generic-new-autoloader "generic-makefile" "Make"
+                           "Makefile" 'ede-generic-makefile-project)
+@end example
+
+This example project will detect any directory with the file
+@file{Makefile} in it as belonging to this project type.
+Customization of the project will allow you to make build and debug
+commands more precise.
+
+@node Custom Locate,  , ede-generic-project, Simple projects
 @subsection Custom Locate
 
 The various simple project styles all have one major drawback, which
-is that the files in the project are not completely known to EDE.
+is that the files in the project are not completely known to EDE@.
 When the EDE API is used to try and file files by some reference name
 in the project, then that could fail.
 
-@@TODO - Add ID Utils and CScope examples
-
 @ede{} can therefore use some external locate commands, such as the unix
 ``locate'' command, or ``GNU Global''.
 
@@ -1074,7 +1108,7 @@ To enable one of these tools, set the variable
 @code{ede-locate-setup-options} with the names of different locate
 objects.  @ref{Miscellaneous commands}.
 
-Configure this in your @file{.emacs} before loading in CEDET or EDE.
+Configure this in your @file{.emacs} before loading in CEDET or EDE@.
 If you want to add support for GNU Global, your configuration would
 look like this:
 
@@ -1083,7 +1117,7 @@ look like this:
 @end example
 
 That way, when a search needs to be done, it will first try using
-GLOBAL.  If global is not available for that directory, then it will
+GLOBAL@.  If global is not available for that directory, then it will
 revert to the base locate object.  The base object always fails to
 find a file.
 
@@ -1092,7 +1126,12 @@ You can add your own locate tool but subclassing from
 methods.  See the code in @file{ede-locate.el} for GNU Global as a
 simple example.
 
-@node Extending EDE,  , Miscellaneous commands, top
+@@TODO - Add ID Utils and CScope examples
+
+More on idutils and cscope is in the CEDET manual, and they each have
+their own section.
+
+@node Extending EDE, GNU Free Documentation License, Miscellaneous commands, Top
 @chapter Extending @ede{}
 
 This chapter is intended for users who want to write new parts or fix
@@ -1100,7 +1139,7 @@ bugs in @ede{}.  A knowledge of Emacs Lisp, and some @eieio{}(CLOS) is
 required.
 
 @ede{} uses @eieio{}, the CLOS package for Emacs, to define two object
-superclasses, specifically the PROJECT and TARGET.  All commands in
+superclasses, specifically the PROJECT and TARGET@.  All commands in
 @ede{} are usually meant to address the current project, or current
 target.
 
@@ -1109,7 +1148,7 @@ superclasses.  In this way, specific behaviors such as how a project
 is saved, or how a target is compiled can be customized by a project
 author in detail.  @ede{} communicates to these project objects via an
 API using methods.  The commands you use in @ede{} mode are high-level
-functional wrappers over these methods.  @xref{(eieio)Top}. For
+functional wrappers over these methods.  @xref{Top,,, eieio, EIEIO manual}. For
 details on using @eieio{} to extending classes, and writing methods.
 
 If you intend to extend @ede{}, it is most likely that a new target type is
@@ -1273,7 +1312,7 @@ The function @code{ede-directory-project-p} will call
 @code{ede-dir-to-projectfile} on every @code{ede-project-autoload}
 until one of them returns true.  The method
 @code{ede-dir-to-projectfile} in turn gets the @code{:proj-file} slot
-from the autoload.  If it is a string (ie, a project file name), it
+from the autoload.  If it is a string (i.e., a project file name), it
 checks to see if that exists in BUFFER's directory.  If it is a
 function, then it calls that function and expects it to return a file
 name or nil.  If the file exists, then this directory is assumed to be
@@ -1360,7 +1399,8 @@ association when a file is loaded.  It is generally unnecessary to
 override this unless you keep auxiliary files.
 @end table
 
-These methods are used by the semantic package extensions @xref{(semantic)Top}.
+These methods are used by the semantic package extensions.
+@xref{Top,,, semantic, Semantic manual}.
 
 @table @code
 @item ede-buffer-header-file
@@ -1379,7 +1419,7 @@ List all documentation a project or target is responsible for.
 @ede{} projects track source file / target associates via source code
 objects.  The definitions for this is in @file{ede-source.el}.  A source
 code object contains methods that know how to identify a file as being
-of that class, (ie, a C file ends with @file{.c}).  Some targets can
+of that class, (i.e., a C file ends with @file{.c}).  Some targets can
 handle many different types of sources which must all be compiled
 together.  For example, a mixed C and C++ program would have
 instantiations of both sourcecode types.
@@ -1635,7 +1675,7 @@ This is a URL to be sent to a web site for documentation.
 @item :web-site-directory @*
 
 A directory where web pages can be found by Emacs.
-For remote locations use a path compatible with ange-ftp or EFS.
+For remote locations use a path compatible with ange-ftp or EFS@.
 You can also use TRAMP for use with rcp & scp.
 @refill
 
@@ -1916,7 +1956,7 @@ Type: @code{list} @*
 Default Value: @code{(quote ("/include" "../include/"))}
 
 The default locate function expands filenames within a project.
-If a header file (.h, .hh, etc) name is expanded, and
+If a header file (.h, .hh, etc.)@: name is expanded, and
 the @code{:locate-fcn} slot is @code{nil}, then the include path is checked
 first, and other directories are ignored.  For very large
 projects, this optimization can save a lot of time.
@@ -1978,7 +2018,7 @@ The function symbol must take two arguments:
   NAME - The name of the file to find.
   DIR - The directory root for this cpp-root project.
 
-It should return the fully qualified file name passed in from NAME.  If that file does not
+It should return the fully qualified file name passed in from NAME@.  If that file does not
 exist, it should return nil.
 @refill
 
@@ -2565,7 +2605,7 @@ Optional @var{DEPTH} is the depth we start at.
 @end deffn
 
 @deffn Method ede-buffer-header-file :AFTER this buffer
-There are no default header files in EDE.
+There are no default header files in EDE@.
 Do a quick check to see if there is a Header tag in this buffer.
 @end deffn
 
@@ -4436,4 +4476,8 @@ For example, C code uses .o on unix, and Emacs Lisp uses .elc.
 @end table
 @end table
 
+@node GNU Free Documentation License, , Extending EDE, Top
+@appendix GNU Free Documentation License
+@include doclicense.texi
+
 @bye