Next: , Previous: , Up: Simple Projects   [Contents]

7.3.4 ede-generic-project

The 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 ede-emacs require coding skills to create. Generic projects also require writing Emacs Lisp code, but the requirements are minimal. You can then use customize-project to configure build commands, includes, and other options for that project. The configuration is saved in 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.

Command: ede-enable-generic-projects

Enable generic project loaders.

This enables generic loaders for projects that are detected using either a Makefile, SConstruct, or CMakeLists.

You do not need to use this command if you create your own generic project type.

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:

;;; MAKEFILE

(defclass ede-generic-makefile-project (ede-generic-project)
  ((buildfile :initform "Makefile"))
  "Generic Project for makefiles.")

(cl-defmethod ede-generic-setup-configuration ((proj ede-generic-makefile-project) config)
  "Set up 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)

This example project will detect any directory with the 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.