* admin/notes/copyright: Remove comments about deleted files in src/{m,s}.
[emacs.git] / lisp / cedet / ede / proj-misc.el
blob4d68e1544a7f2bd82e187c69a7a555f740aae2e8
1 ;;; ede-proj-misc.el --- EDE Generic Project Emacs Lisp support
3 ;; Copyright (C) 1998-2001, 2008-2011 Free Software Foundation, Inc.
5 ;; Author: Eric M. Ludlam <zappo@gnu.org>
6 ;; Keywords: project, make
8 ;; This file is part of GNU Emacs.
10 ;; GNU Emacs is free software: you can redistribute it and/or modify
11 ;; it under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation, either version 3 of the License, or
13 ;; (at your option) any later version.
15 ;; GNU Emacs is distributed in the hope that it will be useful,
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;; GNU General Public License for more details.
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
23 ;;; Commentary:
25 ;; Handle miscellaneous compilable projects in and EDE Project file.
26 ;; This misc target lets the user link in custom makefiles to an EDE
27 ;; project.
29 (eval-when-compile (require 'cl))
30 (require 'ede/pmake)
31 (require 'ede/proj-comp)
33 ;;; Code:
35 ;; FIXME this isn't how you spell "miscellaneous". :(
36 (defclass ede-proj-target-makefile-miscelaneous (ede-proj-target-makefile)
37 ((sourcetype :initform '(ede-misc-source))
38 (availablecompilers :initform '(ede-misc-compile))
39 (submakefile :initarg :submakefile
40 :initform ""
41 :type string
42 :custom string
43 :documentation
44 "Miscellaneous sources which have a specialized makefile.
45 The sub-makefile is used to build this target.")
47 "Miscellaneous target type.
48 A user-written makefile is used to build this target.
49 All listed sources are included in the distribution.")
51 (defvar ede-misc-source
52 (ede-sourcecode "ede-misc-source"
53 :name "Miscelaneous"
54 :sourcepattern ".*")
55 "Miscellaneous field definition.")
57 (defvar ede-misc-compile
58 (ede-compiler "ede-misc-compile"
59 :name "Sub Makefile"
60 :commands
63 :autoconf nil
64 :sourcetype '(ede-misc-source)
66 "Compile code via a sub-makefile.")
68 (defmethod ede-proj-makefile-sourcevar ((this ede-proj-target-makefile-miscelaneous))
69 "Return the variable name for THIS's sources."
70 (concat (ede-pmake-varname this) "_MISC"))
72 (defmethod ede-proj-makefile-dependency-files
73 ((this ede-proj-target-makefile-miscelaneous))
74 "Return a list of files which THIS target depends on."
75 (with-slots (submakefile) this
76 (cond ((string= submakefile "")
77 nil)
78 ((not submakefile)
79 nil)
80 (t (list submakefile)))))
82 (defmethod ede-proj-makefile-insert-rules ((this ede-proj-target-makefile-miscelaneous))
83 "Create the make rule needed to create an archive for THIS."
84 ;; DO NOT call the next method. We will never have any compilers,
85 ;; or any dependencies, or stuff like this. This rule will let us
86 ;; deal with it in a nice way.
87 (insert (ede-name this) ": ")
88 (with-slots (submakefile) this
89 (if (string= submakefile "")
90 (insert "\n\t@\n\n")
91 (insert submakefile "\n" "\t$(MAKE) -f " submakefile "\n\n"))))
93 (provide 'ede/proj-misc)
95 ;;; ede/proj-misc.el ends here