annotate lisp/cedet/ede/proj.el @ 110590:21047b3216d2

Don't break the build if we don't have the gnutls libraries.
author Lars Magne Ingebrigtsen <larsi@gnus.org>
date Sun, 26 Sep 2010 17:18:47 +0200
parents b150a06c6999
children 376148b31b5e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
105260
bbd7017a25d9 CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents: 104496
diff changeset
1 ;;; ede/proj.el --- EDE Generic Project file driver
104496
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
2
106815
1d1d5d9bd884 Add 2010 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 105799
diff changeset
3 ;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2007, 2008, 2009, 2010
105311
2659dc83c95c (ede-proj-target-makefile-miscelaneous): Fix doc typo.
Glenn Morris <rgm@gnu.org>
parents: 105260
diff changeset
4 ;; Free Software Foundation, Inc.
104496
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
5
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
6 ;; Author: Eric M. Ludlam <zappo@gnu.org>
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
7 ;; Keywords: project, make
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
8
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
9 ;; This file is part of GNU Emacs.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
10
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
11 ;; GNU Emacs is free software: you can redistribute it and/or modify
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
12 ;; it under the terms of the GNU General Public License as published by
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
13 ;; the Free Software Foundation, either version 3 of the License, or
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
14 ;; (at your option) any later version.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
15
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
16 ;; GNU Emacs is distributed in the hope that it will be useful,
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
19 ;; GNU General Public License for more details.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
20
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
21 ;; You should have received a copy of the GNU General Public License
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
22 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
23
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
24 ;;; Commentary:
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
25 ;;
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
26 ;; EDE defines a method for managing a project. EDE-PROJ aims to be a
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
27 ;; generic project file format based on the EIEIO object stream
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
28 ;; methods. Changes in the project structure will require Makefile
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
29 ;; rebuild. The targets provided in ede-proj can be augmented with
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
30 ;; additional target types inherited directly from `ede-proj-target'.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
31
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
32 (require 'ede/proj-comp)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
33 (require 'ede/make)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
34
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
35 (declare-function ede-proj-makefile-create "ede/pmake")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
36 (declare-function ede-proj-configure-synchronize "ede/pconf")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
37
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
38 (autoload 'ede-proj-target-aux "ede/proj-aux"
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
39 "Target class for a group of lisp files." nil nil)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
40 (autoload 'ede-proj-target-elisp "ede/proj-elisp"
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
41 "Target class for a group of lisp files." nil nil)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
42 (autoload 'ede-proj-target-elisp-autoloads "ede/proj-elisp"
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
43 "Target class for generating autoload files." nil nil)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
44 (autoload 'ede-proj-target-scheme "ede/proj-scheme"
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
45 "Target class for a group of lisp files." nil nil)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
46 (autoload 'ede-proj-target-makefile-miscelaneous "ede/proj-misc"
105311
2659dc83c95c (ede-proj-target-makefile-miscelaneous): Fix doc typo.
Glenn Morris <rgm@gnu.org>
parents: 105260
diff changeset
47 "Target class for a group of miscellaneous w/ a special makefile." nil nil)
104496
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
48 (autoload 'ede-proj-target-makefile-program "ede/proj-prog"
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
49 "Target class for building a program." nil nil)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
50 (autoload 'ede-proj-target-makefile-archive "ede/proj-archive"
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
51 "Target class for building an archive of object code." nil nil)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
52 (autoload 'ede-proj-target-makefile-shared-object "ede/proj-shared"
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
53 "Target class for building a shared object." nil nil)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
54 (autoload 'ede-proj-target-makefile-info "ede/proj-info"
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
55 "Target class for info files." nil nil)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
56
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
57 ;;; Class Definitions:
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
58 (defclass ede-proj-target (ede-target)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
59 ((auxsource :initarg :auxsource
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
60 :initform nil
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
61 :type list
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
62 :custom (repeat (string :tag "File"))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
63 :label "Auxiliary Source Files"
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
64 :group (default source)
105333
51ba3b848c03 Doc/message fixes.
Glenn Morris <rgm@gnu.org>
parents: 105311
diff changeset
65 :documentation "Auxiliary source files included in this target.
104496
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
66 Each of these is considered equivalent to a source file, but it is not
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
67 distributed, and each should have a corresponding rule to build it.")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
68 (dirty :initform nil
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
69 :type boolean
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
70 :documentation "Non-nil when generated files needs updating.")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
71 (compiler :initarg :compiler
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
72 :initform nil
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
73 :type (or null symbol)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
74 :custom (choice (const :tag "None" nil)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
75 :slotofchoices availablecompilers)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
76 :label "Compiler for building sources"
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
77 :group make
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
78 :documentation
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
79 "The compiler to be used to compile this object.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
80 This should be a symbol, which contains the object defining the compiler.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
81 This enables save/restore to do so by name, permitting the sharing
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
82 of these compiler resources, and global customization thereof.")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
83 (linker :initarg :linker
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
84 :initform nil
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
85 :type (or null symbol)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
86 :custom (choice (const :tag "None" nil)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
87 :slotofchoices availablelinkers)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
88 :label "Linker for combining intermediate object files."
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
89 :group make
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
90 :documentation
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
91 "The linker to be used to link compiled sources for this object.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
92 This should be a symbol, which contains the object defining the linker.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
93 This enables save/restore to do so by name, permitting the sharing
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
94 of these linker resources, and global customization thereof.")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
95 ;; Class allocated slots
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
96 (phony :allocation :class
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
97 :initform nil
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
98 :type boolean
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
99 :documentation
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
100 "A phony target is one where the build target does not relate to a file.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
101 Such targets are always built, but make knows how to deal with them..")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
102 (availablecompilers :allocation :class
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
103 :initform nil
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
104 :type (or null list)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
105 :documentation
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
106 "A list of `ede-compiler' objects.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
107 These are the compilers the user can choose from when setting the
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
108 `compiler' slot.")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
109 (availablelinkers :allocation :class
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
110 :initform nil
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
111 :type (or null list)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
112 :documentation
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
113 "A list of `ede-linker' objects.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
114 These are the linkers the user can choose from when setting the
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
115 `linker' slot.")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
116 )
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
117 "Abstract class for ede-proj targets.")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
118
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
119 (defclass ede-proj-target-makefile (ede-proj-target)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
120 ((makefile :initarg :makefile
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
121 :initform "Makefile"
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
122 :type string
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
123 :custom string
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
124 :label "Parent Makefile"
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
125 :group make
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
126 :documentation "File name of generated Makefile.")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
127 (partofall :initarg :partofall
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
128 :initform t
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
129 :type boolean
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
130 :custom boolean
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
131 :label "Part of `all:' target"
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
132 :group make
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
133 :documentation
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
134 "Non nil means the rule created is part of the all target.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
135 Setting this to nil creates the rule to build this item, but does not
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
136 include it in the ALL`all:' rule.")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
137 (configuration-variables
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
138 :initarg :configuration-variables
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
139 :initform nil
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
140 :type list
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
141 :custom (repeat (cons (string :tag "Configuration")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
142 (repeat
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
143 (cons (string :tag "Name")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
144 (string :tag "Value")))))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
145 :label "Environment Variables for configurations"
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
146 :group make
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
147 :documentation "Makefile variables appended to use in different configurations.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
148 These variables are used in the makefile when a configuration becomes active.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
149 Target variables are always renamed such as foo_CFLAGS, then included into
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
150 commands where the variable would usually appear.")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
151 (rules :initarg :rules
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
152 :initform nil
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
153 :type list
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
154 :custom (repeat (object :objecttype ede-makefile-rule))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
155 :label "Additional Rules"
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
156 :group (make)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
157 :documentation
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
158 "Arbitrary rules and dependencies needed to make this target.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
159 It is safe to leave this blank.")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
160 )
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
161 "Abstract class for Makefile based targets.")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
162
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
163 (defvar ede-proj-target-alist
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
164 '(("program" . ede-proj-target-makefile-program)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
165 ("archive" . ede-proj-target-makefile-archive)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
166 ("sharedobject" . ede-proj-target-makefile-shared-object)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
167 ("emacs lisp" . ede-proj-target-elisp)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
168 ("emacs lisp autoloads" . ede-proj-target-elisp-autoloads)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
169 ("info" . ede-proj-target-makefile-info)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
170 ("auxiliary" . ede-proj-target-aux)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
171 ("scheme" . ede-proj-target-scheme)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
172 ("miscellaneous" . ede-proj-target-makefile-miscelaneous)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
173 )
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
174 "Alist of names to class types for available project target classes.")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
175
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
176 (defun ede-proj-register-target (name class)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
177 "Register a new target class with NAME and class symbol CLASS.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
178 This enables the creation of your target type."
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
179 (let ((a (assoc name ede-proj-target-alist)))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
180 (if a
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
181 (setcdr a class)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
182 (setq ede-proj-target-alist
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
183 (cons (cons name class) ede-proj-target-alist)))))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
184
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
185 (defclass ede-proj-project (ede-project)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
186 ((makefile-type :initarg :makefile-type
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
187 :initform Makefile
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
188 :type symbol
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
189 :custom (choice (const Makefile)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
190 ;(const Makefile.in)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
191 (const Makefile.am)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
192 ;(const cook)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
193 )
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
194 :documentation "The type of Makefile to generate.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
195 Can be one of 'Makefile, 'Makefile.in, or 'Makefile.am.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
196 If this value is NOT 'Makefile, then that overrides the :makefile slot
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
197 in targets.")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
198 (variables :initarg :variables
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
199 :initform nil
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
200 :type list
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
201 :custom (repeat (cons (string :tag "Name")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
202 (string :tag "Value")))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
203 :group (settings)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
204 :documentation "Variables to set in this Makefile.")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
205 (configuration-variables
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
206 :initarg :configuration-variables
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
207 :initform ("debug" (("DEBUG" . "1")))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
208 :type list
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
209 :custom (repeat (cons (string :tag "Configuration")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
210 (repeat
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
211 (cons (string :tag "Name")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
212 (string :tag "Value")))))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
213 :group (settings)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
214 :documentation "Makefile variables to use in different configurations.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
215 These variables are used in the makefile when a configuration becomes active.")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
216 (inference-rules :initarg :inference-rules
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
217 :initform nil
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
218 :custom (repeat
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
219 (object :objecttype ede-makefile-rule))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
220 :documentation "Inference rules to add to the makefile.")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
221 (include-file :initarg :include-file
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
222 :initform nil
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
223 :custom (repeat
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
224 (string :tag "Include File"))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
225 :documentation "Additional files to include.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
226 These files can contain additional rules, variables, and customizations.")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
227 (automatic-dependencies
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
228 :initarg :automatic-dependencies
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
229 :initform t
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
230 :type boolean
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
231 :custom boolean
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
232 :group (default settings)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
233 :documentation
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
234 "Non-nil to do implement automatic dependencies in the Makefile.")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
235 (menu :initform
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
236 (
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
237 [ "Regenerate Makefiles" ede-proj-regenerate t ]
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
238 [ "Upload Distribution" ede-upload-distribution t ]
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
239 )
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
240 )
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
241 (metasubproject
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
242 :initarg :metasubproject
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
243 :initform nil
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
244 :type boolean
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
245 :custom boolean
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
246 :group (default settings)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
247 :documentation
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
248 "Non-nil if this is a metasubproject.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
249 Usually, a subproject is determined by a parent project. If multiple top level
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
250 projects are grouped into a large project not maintained by EDE, then you need
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
251 to set this to non-nil. The only effect is that the `dist' rule will then avoid
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
252 making a tar file.")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
253 )
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
254 "The EDE-PROJ project definition class.")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
255
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
256 ;;; Code:
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
257 (defun ede-proj-load (project &optional rootproj)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
258 "Load a project file from PROJECT directory.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
259 If optional ROOTPROJ is provided then ROOTPROJ is the root project
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
260 for the tree being read in. If ROOTPROJ is nil, then assume that
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
261 the PROJECT being read in is the root project."
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
262 (save-excursion
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
263 (let ((ret nil)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
264 (subdirs (directory-files project nil "[^.].*" nil)))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
265 (set-buffer (get-buffer-create " *tmp proj read*"))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
266 (unwind-protect
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
267 (progn
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
268 (insert-file-contents (concat project "Project.ede")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
269 nil nil nil t)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
270 (goto-char (point-min))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
271 (setq ret (read (current-buffer)))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
272 (if (not (eq (car ret) 'ede-proj-project))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
273 (error "Corrupt project file"))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
274 (setq ret (eval ret))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
275 (oset ret file (concat project "Project.ede"))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
276 (oset ret directory project)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
277 (oset ret rootproject rootproj)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
278 )
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
279 (kill-buffer " *tmp proj read*"))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
280 (while subdirs
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
281 (let ((sd (file-name-as-directory
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
282 (expand-file-name (car subdirs) project))))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
283 (if (and (file-directory-p sd)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
284 (ede-directory-project-p sd))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
285 (oset ret subproj
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
286 (cons (ede-proj-load sd (or rootproj ret))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
287 (oref ret subproj))))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
288 (setq subdirs (cdr subdirs))))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
289 ret)))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
290
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
291 (defun ede-proj-save (&optional project)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
292 "Write out object PROJECT into its file."
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
293 (save-excursion
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
294 (if (not project) (setq project (ede-current-project)))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
295 (let ((b (set-buffer (get-buffer-create " *tmp proj write*")))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
296 (cfn (oref project file))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
297 (cdir (oref project directory)))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
298 (unwind-protect
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
299 (save-excursion
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
300 (erase-buffer)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
301 (let ((standard-output (current-buffer)))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
302 (oset project file (file-name-nondirectory cfn))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
303 (slot-makeunbound project :directory)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
304 (object-write project ";; EDE project file."))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
305 (write-file cfn nil)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
306 )
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
307 ;; Restore the :file on exit.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
308 (oset project file cfn)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
309 (oset project directory cdir)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
310 (kill-buffer b)))))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
311
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
312 (defmethod ede-commit-local-variables ((proj ede-proj-project))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
313 "Commit change to local variables in PROJ."
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
314 (ede-proj-save proj))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
315
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
316 (defmethod eieio-done-customizing ((proj ede-proj-project))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
317 "Call this when a user finishes customizing this object.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
318 Argument PROJ is the project to save."
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
319 (call-next-method)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
320 (ede-proj-save proj))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
321
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
322 (defmethod eieio-done-customizing ((target ede-proj-target))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
323 "Call this when a user finishes customizing this object.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
324 Argument TARGET is the project we are completing customization on."
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
325 (call-next-method)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
326 (ede-proj-save (ede-current-project)))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
327
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
328 (defmethod ede-commit-project ((proj ede-proj-project))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
329 "Commit any change to PROJ to its file."
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
330 (ede-proj-save proj))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
331
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
332 (defmethod ede-buffer-mine ((this ede-proj-project) buffer)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
333 "Return t if object THIS lays claim to the file in BUFFER."
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
334 (let ((f (ede-convert-path this (buffer-file-name buffer))))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
335 (or (string= (file-name-nondirectory (oref this file)) f)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
336 (string= (ede-proj-dist-makefile this) f)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
337 (string-match "Makefile\\(\\.\\(in\\|am\\)\\)?$" f)
110526
b150a06c6999 Synch EDE to CEDET 1.0.
Chong Yidong <cyd@stupidchicken.com>
parents: 106815
diff changeset
338 (string-match "config\\(ure\\.\\(in\\|ac\\)\\|\\.status\\)?$" f)
b150a06c6999 Synch EDE to CEDET 1.0.
Chong Yidong <cyd@stupidchicken.com>
parents: 106815
diff changeset
339 (string-match "config.h\\(\\.in\\)?" f)
b150a06c6999 Synch EDE to CEDET 1.0.
Chong Yidong <cyd@stupidchicken.com>
parents: 106815
diff changeset
340 (member f '("AUTHORS" "NEWS" "COPYING" "INSTALL" "README"))
104496
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
341 )))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
342
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
343 (defmethod ede-buffer-mine ((this ede-proj-target) buffer)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
344 "Return t if object THIS lays claim to the file in BUFFER."
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
345 (or (call-next-method)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
346 (ede-target-buffer-in-sourcelist this buffer (oref this auxsource))))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
347
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
348
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
349 ;;; EDE command functions
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
350 ;;
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
351 (defvar ede-proj-target-history nil
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
352 "History when querying for a target type.")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
353
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
354 (defmethod project-new-target ((this ede-proj-project)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
355 &optional name type autoadd)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
356 "Create a new target in THIS based on the current buffer."
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
357 (let* ((name (or name (read-string "Name: " "")))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
358 (type (or type
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
359 (completing-read "Type: " ede-proj-target-alist
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
360 nil t nil '(ede-proj-target-history . 1))))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
361 (ot nil)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
362 (src (if (and (buffer-file-name)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
363 (if (and autoadd (stringp autoadd))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
364 (string= autoadd "y")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
365 (y-or-n-p (format "Add %s to %s? " (buffer-name) name))))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
366 (buffer-file-name)))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
367 (fcn (cdr (assoc type ede-proj-target-alist)))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
368 )
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
369
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
370 (when (not fcn)
105333
51ba3b848c03 Doc/message fixes.
Glenn Morris <rgm@gnu.org>
parents: 105311
diff changeset
371 (error "Unknown target type %s for EDE Project" type))
104496
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
372
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
373 (setq ot (funcall fcn name :name name
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
374 :path (ede-convert-path this default-directory)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
375 :source (if src
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
376 (list (file-name-nondirectory src))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
377 nil)))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
378 ;; If we added it, set the local buffer's object.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
379 (if src (progn
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
380 (setq ede-object ot)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
381 (ede-apply-object-keymap)))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
382 ;; Add it to the project object
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
383 ;;(oset this targets (cons ot (oref this targets)))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
384 ;; New form: Add to the end using fancy eieio function.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
385 ;; @todone - Some targets probably want to be in the front.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
386 ;; How to do that?
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
387 ;; @ans - See elisp autoloads for answer
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
388 (object-add-to-list this 'targets ot t)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
389 ;; And save
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
390 (ede-proj-save this)))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
391
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
392 (defmethod project-new-target-custom ((this ede-proj-project))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
393 "Create a new target in THIS for custom."
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
394 (let* ((name (read-string "Name: " ""))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
395 (type (completing-read "Type: " ede-proj-target-alist
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
396 nil t nil '(ede-proj-target-history . 1))))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
397 (funcall (cdr (assoc type ede-proj-target-alist)) name :name name
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
398 :path (ede-convert-path this default-directory)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
399 :source nil)))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
400
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
401 (defmethod project-delete-target ((this ede-proj-target))
110526
b150a06c6999 Synch EDE to CEDET 1.0.
Chong Yidong <cyd@stupidchicken.com>
parents: 106815
diff changeset
402 "Delete the current target THIS from its parent project."
104496
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
403 (let ((p (ede-current-project))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
404 (ts (oref this source)))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
405 ;; Loop across all sources. If it exists in a buffer,
110526
b150a06c6999 Synch EDE to CEDET 1.0.
Chong Yidong <cyd@stupidchicken.com>
parents: 106815
diff changeset
406 ;; clear its object.
104496
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
407 (while ts
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
408 (let* ((default-directory (oref this path))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
409 (b (get-file-buffer (car ts))))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
410 (if b
105799
3fe6da4a95a9 * cedet/srecode/srt-mode.el (semantic-analyze-possible-completions):
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 105652
diff changeset
411 (with-current-buffer b
104496
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
412 (if (eq ede-object this)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
413 (progn
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
414 (setq ede-object nil)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
415 (ede-apply-object-keymap))))))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
416 (setq ts (cdr ts)))
110526
b150a06c6999 Synch EDE to CEDET 1.0.
Chong Yidong <cyd@stupidchicken.com>
parents: 106815
diff changeset
417 ;; Remove THIS from its parent.
104496
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
418 ;; The two vectors should be pointer equivalent.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
419 (oset p targets (delq this (oref p targets)))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
420 (ede-proj-save (ede-current-project))))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
421
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
422 (defmethod project-add-file ((this ede-proj-target) file)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
423 "Add to target THIS the current buffer represented as FILE."
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
424 (let ((file (ede-convert-path this file))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
425 (src (ede-target-sourcecode this)))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
426 (while (and src (not (ede-want-file-p (car src) file)))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
427 (setq src (cdr src)))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
428 (when src
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
429 (setq src (car src))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
430 (cond ((ede-want-file-source-p this file)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
431 (object-add-to-list this 'source file t))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
432 ((ede-want-file-auxiliary-p this file)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
433 (object-add-to-list this 'auxsource file t))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
434 (t (error "`project-add-file(ede-target)' source mismatch error")))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
435 (ede-proj-save))))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
436
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
437 (defmethod project-remove-file ((target ede-proj-target) file)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
438 "For TARGET, remove FILE.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
439 FILE must be massaged by `ede-convert-path'."
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
440 ;; Speedy delete should be safe.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
441 (object-remove-from-list target 'source (ede-convert-path target file))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
442 (object-remove-from-list target 'auxsource (ede-convert-path target file))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
443 (ede-proj-save))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
444
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
445 (defmethod project-update-version ((this ede-proj-project))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
446 "The :version of project THIS has changed."
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
447 (ede-proj-save))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
448
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
449 (defmethod project-make-dist ((this ede-proj-project))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
450 "Build a distribution for the project based on THIS target."
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
451 (let ((pm (ede-proj-dist-makefile this))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
452 (df (project-dist-files this)))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
453 (if (and (file-exists-p (car df))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
454 (not (y-or-n-p "Dist file already exists. Rebuild? ")))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
455 (error "Try `ede-update-version' before making a distribution"))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
456 (ede-proj-setup-buildenvironment this)
110526
b150a06c6999 Synch EDE to CEDET 1.0.
Chong Yidong <cyd@stupidchicken.com>
parents: 106815
diff changeset
457 (if (ede-proj-automake-p this)
105526
e0aaf562a485 * cedet/ede/proj.el (project-make-dist): Fix filename test.
Chong Yidong <cyd@stupidchicken.com>
parents: 105377
diff changeset
458 (setq pm (expand-file-name "Makefile"
e0aaf562a485 * cedet/ede/proj.el (project-make-dist): Fix filename test.
Chong Yidong <cyd@stupidchicken.com>
parents: 105377
diff changeset
459 (file-name-directory pm))))
e0aaf562a485 * cedet/ede/proj.el (project-make-dist): Fix filename test.
Chong Yidong <cyd@stupidchicken.com>
parents: 105377
diff changeset
460 (compile (concat ede-make-command " -f " pm " dist"))))
104496
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
461
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
462 (defmethod project-dist-files ((this ede-proj-project))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
463 "Return a list of files that constitutes a distribution of THIS project."
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
464 (list
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
465 ;; Note to self, keep this first for the above fn to check against.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
466 (concat (oref this name) "-" (oref this version) ".tar.gz")
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
467 ))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
468
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
469 (defmethod project-compile-project ((proj ede-proj-project) &optional command)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
470 "Compile the entire current project PROJ.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
471 Argument COMMAND is the command to use when compiling."
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
472 (let ((pm (ede-proj-dist-makefile proj))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
473 (default-directory (file-name-directory (oref proj file))))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
474 (ede-proj-setup-buildenvironment proj)
110526
b150a06c6999 Synch EDE to CEDET 1.0.
Chong Yidong <cyd@stupidchicken.com>
parents: 106815
diff changeset
475 (if (ede-proj-automake-p proj)
105527
96d5c9bceae9 * cedet/ede/proj.el (project-compile-project): Fix filename test.
Chong Yidong <cyd@stupidchicken.com>
parents: 105526
diff changeset
476 (setq pm (expand-file-name "Makefile"
96d5c9bceae9 * cedet/ede/proj.el (project-compile-project): Fix filename test.
Chong Yidong <cyd@stupidchicken.com>
parents: 105526
diff changeset
477 (file-name-directory pm))))
104496
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
478 (compile (concat ede-make-command" -f " pm " all"))))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
479
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
480 ;;; Target type specific compilations/debug
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
481 ;;
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
482 (defmethod project-compile-target ((obj ede-proj-target) &optional command)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
483 "Compile the current target OBJ.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
484 Argument COMMAND is the command to use for compiling the target."
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
485 (project-compile-project (ede-current-project) command))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
486
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
487 (defmethod project-compile-target ((obj ede-proj-target-makefile)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
488 &optional command)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
489 "Compile the current target program OBJ.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
490 Optional argument COMMAND is the s the alternate command to use."
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
491 (ede-proj-setup-buildenvironment (ede-current-project))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
492 (compile (concat ede-make-command " -f " (oref obj makefile) " "
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
493 (ede-proj-makefile-target-name obj))))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
494
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
495 (defmethod project-debug-target ((obj ede-proj-target))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
496 "Run the current project target OBJ in a debugger."
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
497 (error "Debug-target not supported by %s" (object-name obj)))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
498
105652
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105527
diff changeset
499 (defmethod project-run-target ((obj ede-proj-target))
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105527
diff changeset
500 "Run the current project target OBJ."
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105527
diff changeset
501 (error "Run-target not supported by %s" (object-name obj)))
51bc239bdc37 * cedet/srecode/srt.el:
Chong Yidong <cyd@stupidchicken.com>
parents: 105527
diff changeset
502
104496
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
503 (defmethod ede-proj-makefile-target-name ((this ede-proj-target))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
504 "Return the name of the main target for THIS target."
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
505 (ede-name this))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
506
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
507 ;;; Compiler and source code generators
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
508 ;;
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
509 (defmethod ede-want-file-auxiliary-p ((this ede-target) file)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
510 "Return non-nil if THIS target wants FILE."
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
511 ;; By default, all targets reference the source object, and let it decide.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
512 (let ((src (ede-target-sourcecode this)))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
513 (while (and src (not (ede-want-file-auxiliary-p (car src) file)))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
514 (setq src (cdr src)))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
515 src))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
516
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
517 (defmethod ede-proj-compilers ((obj ede-proj-target))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
518 "List of compilers being used by OBJ.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
519 If the `compiler' slot is empty, concoct one on a first match found
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
520 basis for any given type from the `availablecompilers' slot.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
521 Otherwise, return the `compiler' slot.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
522 Converts all symbols into the objects to be used."
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
523 (when (slot-exists-p obj 'compiler)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
524 (let ((comp (oref obj compiler)))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
525 (if comp
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
526 ;; Now that we have a pre-set compilers to use, convert tye symbols
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
527 ;; into objects for ease of use
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
528 (if (listp comp)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
529 (setq comp (mapcar 'symbol-value comp))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
530 (setq comp (list (symbol-value comp))))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
531 (let* ((acomp (oref obj availablecompilers))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
532 (avail (mapcar 'symbol-value acomp))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
533 (st (oref obj sourcetype))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
534 (sources (oref obj source)))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
535 ;; COMP is not specified, so generate a list from the available
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
536 ;; compilers list.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
537 (while st
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
538 (if (ede-want-any-source-files-p (symbol-value (car st)) sources)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
539 (let ((c (ede-proj-find-compiler avail (car st))))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
540 (if c (setq comp (cons c comp)))))
110526
b150a06c6999 Synch EDE to CEDET 1.0.
Chong Yidong <cyd@stupidchicken.com>
parents: 106815
diff changeset
541 (setq st (cdr st)))
b150a06c6999 Synch EDE to CEDET 1.0.
Chong Yidong <cyd@stupidchicken.com>
parents: 106815
diff changeset
542 ;; Provide a good error msg.
b150a06c6999 Synch EDE to CEDET 1.0.
Chong Yidong <cyd@stupidchicken.com>
parents: 106815
diff changeset
543 (unless comp
b150a06c6999 Synch EDE to CEDET 1.0.
Chong Yidong <cyd@stupidchicken.com>
parents: 106815
diff changeset
544 (error "Could not find compiler match for source code extension \"%s\".
b150a06c6999 Synch EDE to CEDET 1.0.
Chong Yidong <cyd@stupidchicken.com>
parents: 106815
diff changeset
545 You may need to add support for this type of file."
b150a06c6999 Synch EDE to CEDET 1.0.
Chong Yidong <cyd@stupidchicken.com>
parents: 106815
diff changeset
546 (if sources
b150a06c6999 Synch EDE to CEDET 1.0.
Chong Yidong <cyd@stupidchicken.com>
parents: 106815
diff changeset
547 (file-name-extension (car sources))
b150a06c6999 Synch EDE to CEDET 1.0.
Chong Yidong <cyd@stupidchicken.com>
parents: 106815
diff changeset
548 "")))
b150a06c6999 Synch EDE to CEDET 1.0.
Chong Yidong <cyd@stupidchicken.com>
parents: 106815
diff changeset
549 ))
104496
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
550 ;; Return the disovered compilers
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
551 comp)))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
552
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
553 (defmethod ede-proj-linkers ((obj ede-proj-target))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
554 "List of linkers being used by OBJ.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
555 If the `linker' slot is empty, concoct one on a first match found
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
556 basis for any given type from the `availablelinkers' slot.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
557 Otherwise, return the `linker' slot.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
558 Converts all symbols into the objects to be used."
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
559 (when (slot-exists-p obj 'linker)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
560 (let ((link (oref obj linker)))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
561 (if link
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
562 ;; Now that we have a pre-set linkers to use, convert type symbols
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
563 ;; into objects for ease of use
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
564 (if (symbolp link)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
565 (setq link (list (symbol-value link)))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
566 (error ":linker is not a symbol. Howd you do that?"))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
567 (let* ((alink (oref obj availablelinkers))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
568 (avail (mapcar 'symbol-value alink))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
569 (st (oref obj sourcetype))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
570 (sources (oref obj source)))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
571 ;; LINKER is not specified, so generate a list from the available
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
572 ;; compilers list.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
573 (while st
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
574 (if (ede-want-any-source-files-p (symbol-value (car st)) sources)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
575 (let ((c (ede-proj-find-linker avail (car st))))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
576 (if c (setq link (cons c link)))))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
577 (setq st (cdr st)))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
578 (unless link
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
579 ;; No linker stands out! Loop over our linkers and pull out
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
580 ;; the first that has no source type requirement.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
581 (while (and avail (not (eieio-instance-inheritor-slot-boundp (car avail) 'sourcetype)))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
582 (setq avail (cdr avail)))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
583 (setq link (cdr avail)))))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
584 ;; Return the disovered linkers
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
585 link)))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
586
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
587
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
588 ;;; Target type specific autogenerating gobbldegook.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
589 ;;
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
590
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
591 (defun ede-proj-makefile-type (&optional proj)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
592 "Makefile type of the current project PROJ."
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
593 (oref (or proj (ede-current-project)) makefile-type))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
594
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
595 (defun ede-proj-automake-p (&optional proj)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
596 "Return non-nil if the current project PROJ is automake mode."
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
597 (eq (ede-proj-makefile-type proj) 'Makefile.am))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
598
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
599 (defun ede-proj-autoconf-p (&optional proj)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
600 "Return non-nil if the current project PROJ is automake mode."
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
601 (eq (ede-proj-makefile-type proj) 'Makefile.in))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
602
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
603 (defun ede-proj-make-p (&optional proj)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
604 "Return non-nil if the current project PROJ is automake mode."
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
605 (eq (ede-proj-makefile-type proj) 'Makefile))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
606
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
607 (defmethod ede-proj-dist-makefile ((this ede-proj-project))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
608 "Return the name of the Makefile with the DIST target in it for THIS."
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
609 (cond ((eq (oref this makefile-type) 'Makefile.am)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
610 (concat (file-name-directory (oref this file))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
611 "Makefile.am"))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
612 ((eq (oref this makefile-type) 'Makefile.in)
105526
e0aaf562a485 * cedet/ede/proj.el (project-make-dist): Fix filename test.
Chong Yidong <cyd@stupidchicken.com>
parents: 105377
diff changeset
613 (expand-file-name "Makefile.in"
e0aaf562a485 * cedet/ede/proj.el (project-make-dist): Fix filename test.
Chong Yidong <cyd@stupidchicken.com>
parents: 105377
diff changeset
614 (file-name-directory (oref this file))))
104496
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
615 ((object-assoc "Makefile" 'makefile (oref this targets))
105526
e0aaf562a485 * cedet/ede/proj.el (project-make-dist): Fix filename test.
Chong Yidong <cyd@stupidchicken.com>
parents: 105377
diff changeset
616 (expand-file-name "Makefile"
e0aaf562a485 * cedet/ede/proj.el (project-make-dist): Fix filename test.
Chong Yidong <cyd@stupidchicken.com>
parents: 105377
diff changeset
617 (file-name-directory (oref this file))))
104496
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
618 (t
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
619 (let ((targets (oref this targets)))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
620 (while (and targets
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
621 (not (obj-of-class-p
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
622 (car targets)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
623 'ede-proj-target-makefile)))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
624 (setq targets (cdr targets)))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
625 (if targets (oref (car targets) makefile)
105526
e0aaf562a485 * cedet/ede/proj.el (project-make-dist): Fix filename test.
Chong Yidong <cyd@stupidchicken.com>
parents: 105377
diff changeset
626 (expand-file-name "Makefile"
e0aaf562a485 * cedet/ede/proj.el (project-make-dist): Fix filename test.
Chong Yidong <cyd@stupidchicken.com>
parents: 105377
diff changeset
627 (file-name-directory (oref this file))))))))
104496
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
628
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
629 (defun ede-proj-regenerate ()
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
630 "Regenerate Makefiles for and edeproject project."
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
631 (interactive)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
632 (ede-proj-setup-buildenvironment (ede-current-project) t))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
633
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
634 (defmethod ede-proj-makefile-create-maybe ((this ede-proj-project) mfilename)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
635 "Create a Makefile for all Makefile targets in THIS if needed.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
636 MFILENAME is the makefile to generate."
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
637 ;; For now, pass through until dirty is implemented.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
638 (require 'ede/pmake)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
639 (if (or (not (file-exists-p mfilename))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
640 (file-newer-than-file-p (oref this file) mfilename))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
641 (ede-proj-makefile-create this mfilename)))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
642
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
643 (defmethod ede-proj-setup-buildenvironment ((this ede-proj-project)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
644 &optional force)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
645 "Setup the build environment for project THIS.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
646 Handles the Makefile, or a Makefile.am configure.in combination.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
647 Optional argument FORCE will force items to be regenerated."
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
648 (if (not force)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
649 (ede-proj-makefile-create-maybe this (ede-proj-dist-makefile this))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
650 (require 'ede/pmake)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
651 (ede-proj-makefile-create this (ede-proj-dist-makefile this)))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
652 ;; Rebuild all subprojects
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
653 (ede-map-subprojects
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
654 this (lambda (sproj) (ede-proj-setup-buildenvironment sproj force)))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
655 ;; Autoconf projects need to do other kinds of initializations.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
656 (when (and (ede-proj-automake-p this)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
657 (eq this (ede-toplevel this)))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
658 (require 'ede/pconf)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
659 ;; If the user wants to force this, do it some other way?
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
660 (ede-proj-configure-synchronize this)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
661 ;; Now run automake to fill in the blanks, autoconf, and other
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
662 ;; auto thingies so that we can just say "make" when done.
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
663 )
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
664 )
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
665
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
666
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
667 ;;; Lower level overloads
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
668 ;;
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
669 (defmethod project-rescan ((this ede-proj-project))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
670 "Rescan the EDE proj project THIS."
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
671 (let ((root (or (ede-project-root this) this))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
672 )
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
673 (setq ede-projects (delq root ede-projects))
110526
b150a06c6999 Synch EDE to CEDET 1.0.
Chong Yidong <cyd@stupidchicken.com>
parents: 106815
diff changeset
674 (ede-load-project-file (ede-project-root-directory root))
104496
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
675 ))
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
676
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
677 (provide 'ede/proj)
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
678
105377
7f4c7f5c0eba Add arch tagline
Miles Bader <miles@gnu.org>
parents: 105333
diff changeset
679 ;; arch-tag: eb8a40f8-0d2c-41c4-b273-af04101d1cdf
104496
8c4870c15962 * cedet/ede.el, cedet/ede/*.el: New files.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
680 ;;; ede/proj.el ends here