1 ;;; ede-proj-misc.el --- EDE Generic Project Emacs Lisp support
3 ;; Copyright (C) 1998, 1999, 2000, 2001, 2008, 2009, 2010, 2011
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 miscellaneous compilable projects in and EDE Project file.
27 ;; This misc target lets the user link in custom makefiles to an EDE
30 (eval-when-compile (require 'cl
))
32 (require 'ede
/proj-comp
)
36 ;; FIXME this isn't how you spell "miscellaneous". :(
37 (defclass ede-proj-target-makefile-miscelaneous
(ede-proj-target-makefile)
38 ((sourcetype :initform
'(ede-misc-source))
39 (availablecompilers :initform
'(ede-misc-compile))
40 (submakefile :initarg
:submakefile
45 "Miscellaneous sources which have a specialized makefile.
46 The sub-makefile is used to build this target.")
48 "Miscellaneous target type.
49 A user-written makefile is used to build this target.
50 All listed sources are included in the distribution.")
52 (defvar ede-misc-source
53 (ede-sourcecode "ede-misc-source"
56 "Miscellaneous field definition.")
58 (defvar ede-misc-compile
59 (ede-compiler "ede-misc-compile"
65 :sourcetype
'(ede-misc-source)
67 "Compile code via a sub-makefile.")
69 (defmethod ede-proj-makefile-sourcevar ((this ede-proj-target-makefile-miscelaneous
))
70 "Return the variable name for THIS's sources."
71 (concat (ede-pmake-varname this
) "_MISC"))
73 (defmethod ede-proj-makefile-dependency-files
74 ((this ede-proj-target-makefile-miscelaneous
))
75 "Return a list of files which THIS target depends on."
76 (with-slots (submakefile) this
77 (cond ((string= submakefile
"")
81 (t (list submakefile
)))))
83 (defmethod ede-proj-makefile-insert-rules ((this ede-proj-target-makefile-miscelaneous
))
84 "Create the make rule needed to create an archive for THIS."
85 ;; DO NOT call the next method. We will never have any compilers,
86 ;; or any dependencies, or stuff like this. This rule will let us
87 ;; deal with it in a nice way.
88 (insert (ede-name this
) ": ")
89 (with-slots (submakefile) this
90 (if (string= submakefile
"")
92 (insert submakefile
"\n" "\t$(MAKE) -f " submakefile
"\n\n"))))
94 (provide 'ede
/proj-misc
)
96 ;; arch-tag: e5e5f8d2-9897-4a1b-8a29-5944ec5a892d
97 ;;; ede/proj-misc.el ends here