From: Eric Ludlam Date: Sun, 9 Aug 2015 15:03:09 +0000 (-0400) Subject: EDE: Improve Emacs project type X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6d6b045ab6a64480fd8266f7a727174cfec397e7;p=emacs.git EDE: Improve Emacs project type * lisp/cedet/ede/emacs.el (ede-emacs-target-texi): New. (ede-find-target): Add texi support. (project-compile-project) (ede-compile-target) (ede-compile-target) (ede-compile-target): New --- diff --git a/lisp/cedet/ede/emacs.el b/lisp/cedet/ede/emacs.el index cac66fa7348..2797533f197 100644 --- a/lisp/cedet/ede/emacs.el +++ b/lisp/cedet/ede/emacs.el @@ -136,6 +136,11 @@ All directories need at least one target.") "EDE Emacs Project target for Emacs Lisp code. All directories need at least one target.") +(defclass ede-emacs-target-texi (ede-target) + () + "EDE Emacs Project target for Emacs Lisp code. +All directories need at least one target.") + (defclass ede-emacs-target-misc (ede-target) () "EDE Emacs Project target for Misc files. @@ -186,6 +191,8 @@ If one doesn't exist, create a new one for this directory." 'ede-emacs-target-c) ((string-match "elc?" ext) 'ede-emacs-target-el) + ((string-match "texi" ext) + 'ede-emacs-target-texi) (t 'ede-emacs-target-misc))) (targets (oref proj targets)) (dir default-directory) @@ -282,6 +289,40 @@ Knows about how the Emacs source tree is organized." (oset this version (cdr ver)) )) +;;; Compile Support +;; +(defmethod project-compile-project ((proj ede-emacs-project) &optional command) + "Compile the Emacs project. +Argument COMMAND is the command to use when compiling." + (let ((default-directory (ede-project-root-directory proj))) + (require 'compile) + (compile "make all"))) + +(defmethod project-compile-target ((proj ede-emacs-target-texi) &optional command) + "Compile the doc target for Emacs. +Argument COMMAND is the command to use for compiling the target." + (let* ((default-directory (ede-project-root-directory (ede-current-project))) + (command "make docs")) + (require 'compile) + (compile command))) + +(defmethod project-compile-target ((proj ede-emacs-target-el) &optional command) + "Compile the doc target for Emacs. +Argument COMMAND is the command to use for compiling the target." + (let* ((default-directory (ede-project-root-directory (ede-current-project))) + (command "make lisp")) + (require 'compile) + (compile command))) + +(defmethod project-compile-target ((proj ede-emacs-target-c) &optional command) + "Compile the doc target for Emacs. +Argument COMMAND is the command to use for compiling the target." + (let* ((default-directory (ede-project-root-directory (ede-current-project))) + (command "make src")) + (require 'compile) + (compile command))) + + (provide 'ede/emacs) ;; Local variables: