ede: Extending EDE

 
 8 Extending EDE
 ***************
 
 This chapter is intended for users who want to write new parts or fix
 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 EDE
 are usually meant to address the current project, or current target.
 
    All specific projects in EDE derive subclasses of the EDE
 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.  See(eieio)Top.  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 needed in one of the existing project types.  The rest of this
 chapter will discuss extending the ‘ede-project’ class, and it’s
 targets.  See ‘project-am.el’ for basic details on adding targets to it.
 
    For the ‘ede-project’ type, the core target class is called
 ‘ede-proj-target’.  Inheriting from this will give you everything you
 need to start, including adding your sources into the makefile.  If you
 also need additional rules in the makefile, you will want to inherit
 from ‘ede-proj-target-makefile’ instead.  You may want to also add new
 fields to track important information.
 
    If you are building currently unsupported code into a program or
 shared library, it is unlikely you need a new target at all.  Instead
 you would need to create a new compiler or linker object that compiles
 source code of the desired type.  SeeCompiler and Linker objects.
 
    Once your new class exists, you will want to fill in some basic
 methods.  See the ‘ede-skel.el’ file for examples of these.  The files
 ‘ede-proj-info.el’ and ‘ede-proj-elisp.el’ are two interesting examples.
 

Menu