1 ;;; ede-proj-nusc.el --- EDE Generic Project Emacs Lisp support
3 ;; Copyright (C) 1998, 1999, 2000, 2001, 2008, 2009
4 ;; Free Software Foundation, Inc.
6 ;; Author: Eric M. Ludlam <zappo@gnu.org>
7 ;; Keywords: project, make
9 ;; This file is part of GNU Emacs.
11 ;; GNU Emacs is free software: you can redistribute it and/or modify
12 ;; it under the terms of the GNU General Public License as published by
13 ;; the Free Software Foundation, either version 3 of the License, or
14 ;; (at your option) any later version.
16 ;; GNU Emacs is distributed in the hope that it will be useful,
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;; GNU General Public License for more details.
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
26 ;; Handle miscelaneous compilable projects in and EDE Project file.
27 ;; This misc target lets the user link in custom makefiles to an EDE
31 (require 'ede
/proj-comp
)
34 (defclass ede-proj-target-makefile-miscelaneous
(ede-proj-target-makefile)
35 ((sourcetype :initform
(ede-misc-source))
36 (availablecompilers :initform
(ede-misc-compile))
37 (submakefile :initarg
:submakefile
42 "Miscellaneous sources which have a specialized makefile.
43 The sub-makefile is used to build this target.")
45 "Miscelaneous target type.
46 A user-written makefile is used to build this target.
47 All listed sources are included in the distribution.")
49 (defvar ede-misc-source
50 (ede-sourcecode "ede-misc-source"
53 "Miscelaneous fiels definition.")
55 (defvar ede-misc-compile
56 (ede-compiler "ede-misc-compile"
62 :sourcetype
'(ede-misc-source)
64 "Compile code via a sub-makefile.")
66 (defmethod ede-proj-makefile-sourcevar ((this ede-proj-target-makefile-miscelaneous
))
67 "Return the variable name for THIS's sources."
68 (concat (ede-pmake-varname this
) "_MISC"))
70 (defmethod ede-proj-makefile-dependency-files
71 ((this ede-proj-target-makefile-miscelaneous
))
72 "Return a list of files which THIS target depends on."
73 (with-slots (submakefile) this
74 (cond ((string= submakefile
"")
78 (t (list submakefile
)))))
80 (defmethod ede-proj-makefile-insert-rules ((this ede-proj-target-makefile-miscelaneous
))
81 "Create the make rule needed to create an archive for THIS."
82 ;; DO NOT call the next method. We will never have any compilers,
83 ;; or any dependencies, or stuff like this. This rull will lets us
84 ;; deal with it in a nice way.
85 (insert (ede-name this
) ": ")
86 (with-slots (submakefile) this
87 (if (string= submakefile
"")
89 (insert submakefile
"\n" "\t$(MAKE) -f " submakefile
"\n\n"))))
91 (provide 'ede
/proj-misc
)
93 ;;; ede/proj-misc.el ends here