aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog8
-rw-r--r--lisp/cedet/ede/pmake.el12
-rw-r--r--lisp/cedet/ede/proj-comp.el16
3 files changed, 19 insertions, 17 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 95a8cd0f926..61bdbf43c2d 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,7 +1,11 @@
12009-10-04 Chong Yidong <cyd@stupidchicken.com> 12009-10-04 Chong Yidong <cyd@stupidchicken.com>
2 2
3 * cedet/ede/proj-comp.el: Don't require ede/pmake at toplevel. 3 * cedet/ede/pmake.el (ede-pmake-insert-variable-once): Delete.
4 (ede-proj-makefile-insert-variables): Require ede/pmake. 4
5 * cedet/ede/proj-comp.el: Don't require ede/pmake at toplevel.
6 (proj-comp-insert-variable-once): New macro, renamed from
7 ede-pmake-insert-variable-once in ede/pmake.edl.
8 (ede-proj-makefile-insert-variables): Use it.
5 9
62009-10-04 Michael Albinus <michael.albinus@gmx.de> 102009-10-04 Michael Albinus <michael.albinus@gmx.de>
7 11
diff --git a/lisp/cedet/ede/pmake.el b/lisp/cedet/ede/pmake.el
index 79775429130..a8b16dce139 100644
--- a/lisp/cedet/ede/pmake.el
+++ b/lisp/cedet/ede/pmake.el
@@ -255,18 +255,6 @@ Execute BODY in a location where a value can be placed."
255 (goto-char (point-max)))) 255 (goto-char (point-max))))
256(put 'ede-pmake-insert-variable-shared 'lisp-indent-function 1) 256(put 'ede-pmake-insert-variable-shared 'lisp-indent-function 1)
257 257
258(defmacro ede-pmake-insert-variable-once (varname &rest body)
259 "Add VARNAME into the current Makefile if it doesn't exist.
260Execute BODY in a location where a value can be placed."
261 `(let ((addcr t) (v ,varname))
262 (unless (re-search-backward (concat "^" v "\\s-*=") nil t)
263 (insert v "=")
264 ,@body
265 (if addcr (insert "\n"))
266 (goto-char (point-max)))
267 ))
268(put 'ede-pmake-insert-variable-once 'lisp-indent-function 1)
269
270;;; SOURCE VARIABLE NAME CONSTRUCTION 258;;; SOURCE VARIABLE NAME CONSTRUCTION
271 259
272(defsubst ede-pmake-varname (obj) 260(defsubst ede-pmake-varname (obj)
diff --git a/lisp/cedet/ede/proj-comp.el b/lisp/cedet/ede/proj-comp.el
index 378d299cc9e..376c48f9c10 100644
--- a/lisp/cedet/ede/proj-comp.el
+++ b/lisp/cedet/ede/proj-comp.el
@@ -46,7 +46,6 @@
46 46
47(require 'ede) ;source object 47(require 'ede) ;source object
48(require 'ede/autoconf-edit) 48(require 'ede/autoconf-edit)
49(declare-function ede-pmake-insert-variable-once "ede/pmake")
50 49
51;;; Types: 50;;; Types:
52(defclass ede-compilation-program (eieio-instance-inheritor) 51(defclass ede-compilation-program (eieio-instance-inheritor)
@@ -251,14 +250,25 @@ This will prevent rules from creating duplicate variables or rules."
251 "Flush the configure file (current buffer) to accomodate THIS." 250 "Flush the configure file (current buffer) to accomodate THIS."
252 nil) 251 nil)
253 252
253(defmacro proj-comp-insert-variable-once (varname &rest body)
254 "Add VARNAME into the current Makefile if it doesn't exist.
255Execute BODY in a location where a value can be placed."
256 `(let ((addcr t) (v ,varname))
257 (unless (re-search-backward (concat "^" v "\\s-*=") nil t)
258 (insert v "=")
259 ,@body
260 (if addcr (insert "\n"))
261 (goto-char (point-max)))
262 ))
263(put 'proj-comp-insert-variable-once 'lisp-indent-function 1)
264
254(defmethod ede-proj-makefile-insert-variables ((this ede-compilation-program)) 265(defmethod ede-proj-makefile-insert-variables ((this ede-compilation-program))
255 "Insert variables needed by the compiler THIS." 266 "Insert variables needed by the compiler THIS."
256 (require 'ede/pmake)
257 (if (eieio-instance-inheritor-slot-boundp this 'variables) 267 (if (eieio-instance-inheritor-slot-boundp this 'variables)
258 (with-slots (variables) this 268 (with-slots (variables) this
259 (mapcar 269 (mapcar
260 (lambda (var) 270 (lambda (var)
261 (ede-pmake-insert-variable-once (car var) 271 (proj-comp-insert-variable-once (car var)
262 (let ((cd (cdr var))) 272 (let ((cd (cdr var)))
263 (if (listp cd) 273 (if (listp cd)
264 (mapc (lambda (c) (insert " " c)) cd) 274 (mapc (lambda (c) (insert " " c)) cd)