changeset 105652:51bc239bdc37

* cedet/srecode/srt.el: * cedet/srecode/compile.el: * cedet/semantic/mru-bookmark.el: * cedet/semantic/debug.el: * cedet/semantic/complete.el: * cedet/semantic/analyze.el: Require CL when compiling. * cedet/semantic/scope.el (semantic-analyze-scoped-inherited-tag-map): Wrap calculation of tmpscope so that the regular scope will continue to work. * cedet/semantic/idle.el (semantic-idle-tag-highlight): Use semantic-idle-summary-highlight-face as the highlighting. * emacs-lisp/eieio-base.el (eieio-persistent-save): If buffer contains multibyte characters, choose first applicable coding system automatically. * cedet/ede/project-am.el (project-run-target): New method. (project-run-target): New method. * cedet/ede.el (ede-target): Add run target menu item. (ede-project, ede-minor-keymap): Add ede-run-target binding. (ede-run-target): New function. (ede-target::project-run-target): New method. * cedet/ede/proj.el (project-run-target): New method. * cedet/ede/proj-shared.el (ede-gcc-libtool-shared-compiler) (ede-g++-libtool-shared-compiler): Remove SHELL. Remove COMMANDS. Add :rules. (ede-proj-target-makefile-shared-object): Only libtool compilers now available. Add linkers for libtool. (ede-cc-linker-libtool, ede-g++-linker-libtool): New. (ede-proj-makefile-target-name): Always use .la extension. * cedet/ede/proj-prog.el (project-run-target): New method. * cedet/ede/proj-obj.el (ede-cc-linker): Rename from ede-gcc-linker. (ede-g++-linker): Change Change link lines. * cedet/ede/pmake.el (ede-pmake-insert-variable-shared): When searching for old variables, go to the end of the buffer and search backward from there. (ede-proj-makefile-automake-insert-subdirs) (ede-proj-makefile-automake-insert-extradist): New methods. (ede-proj-makefile-create): Use them. * cedet/ede/pconf.el (ede-proj-configure-test-required-file): Force FILE to expand to the current target. Use file-exists-p to check that it exists. * cedet/ede/linux.el (ede-linux-version): Don't call "head". (ede-linux-load): Wrap dir in file-name-as-directory. Set :version slot. * cedet/ede/files.el (ede-get-locator-object): When enabling locate, do so on "top". * cedet/ede/emacs.el (ede-emacs-file-existing): Wrap "dir" in file-name-as-directory during compare. (ede-emacs-version): Return Emacs/XEmacs differentiator. Get version number from different places. Don't call egrep. (ede-emacs-load): Set :version slot. Call file-name-as-directory to set the directory. * cedet/ede/shell.el: New file. * cedet/inversion.el (inversion-decoders): Allow for stray . in alpha/beta variants.
author Chong Yidong <cyd@stupidchicken.com>
date Sat, 17 Oct 2009 04:18:31 +0000
parents 1bab58491dc5
children 8177db6744a6
files lisp/ChangeLog lisp/cedet/ede.el lisp/cedet/ede/emacs.el lisp/cedet/ede/files.el lisp/cedet/ede/linux.el lisp/cedet/ede/pconf.el lisp/cedet/ede/pmake.el lisp/cedet/ede/proj-comp.el lisp/cedet/ede/proj-misc.el lisp/cedet/ede/proj-obj.el lisp/cedet/ede/proj-prog.el lisp/cedet/ede/proj-shared.el lisp/cedet/ede/proj.el lisp/cedet/ede/project-am.el lisp/cedet/ede/shell.el lisp/cedet/ede/speedbar.el lisp/cedet/inversion.el lisp/cedet/semantic/analyze.el lisp/cedet/semantic/complete.el lisp/cedet/semantic/debug.el lisp/cedet/semantic/idle.el lisp/cedet/semantic/mru-bookmark.el lisp/cedet/semantic/scope.el lisp/cedet/srecode/compile.el lisp/cedet/srecode/dictionary.el lisp/cedet/srecode/srt.el lisp/emacs-lisp/eieio-base.el
diffstat 27 files changed, 405 insertions(+), 80 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sat Oct 17 03:59:45 2009 +0000
+++ b/lisp/ChangeLog	Sat Oct 17 04:18:31 2009 +0000
@@ -1,3 +1,79 @@
+2009-10-17  Chong Yidong  <cyd@stupidchicken.com>
+
+	* cedet/srecode/srt.el:
+	* cedet/srecode/compile.el:
+	* cedet/semantic/mru-bookmark.el:
+	* cedet/semantic/debug.el:
+	* cedet/semantic/complete.el:
+	* cedet/semantic/analyze.el: Require CL when compiling.
+
+2009-10-17  Eric Ludlam  <zappo@gnu.org>
+
+	* cedet/semantic/scope.el
+	(semantic-analyze-scoped-inherited-tag-map): Wrap calculation of
+	tmpscope so that the regular scope will continue to work.
+
+	* cedet/semantic/idle.el (semantic-idle-tag-highlight): Use
+	semantic-idle-summary-highlight-face as the highlighting.
+
+	* emacs-lisp/eieio-base.el (eieio-persistent-save): If buffer
+	contains multibyte characters, choose first applicable coding
+	system automatically.
+
+	* cedet/ede/project-am.el (project-run-target): New method.
+	(project-run-target): New method.
+
+	* cedet/ede.el (ede-target): Add run target menu item.
+	(ede-project, ede-minor-keymap): Add ede-run-target binding.
+	(ede-run-target): New function.
+	(ede-target::project-run-target): New method.
+
+	* cedet/ede/proj.el (project-run-target): New method.
+
+	* cedet/ede/proj-shared.el (ede-gcc-libtool-shared-compiler)
+	(ede-g++-libtool-shared-compiler): Remove SHELL.  Remove COMMANDS.
+	Add :rules.
+	(ede-proj-target-makefile-shared-object): Only libtool compilers
+	now available.  Add linkers for libtool.
+	(ede-cc-linker-libtool, ede-g++-linker-libtool): New.
+	(ede-proj-makefile-target-name): Always use .la extension.
+
+	* cedet/ede/proj-prog.el (project-run-target): New method.
+
+	* cedet/ede/proj-obj.el (ede-cc-linker): Rename from
+	ede-gcc-linker.
+	(ede-g++-linker): Change Change link lines.
+
+	* cedet/ede/pmake.el (ede-pmake-insert-variable-shared): When
+	searching for old variables, go to the end of the buffer and
+	search backward from there.
+	(ede-proj-makefile-automake-insert-subdirs)
+	(ede-proj-makefile-automake-insert-extradist): New methods.
+	(ede-proj-makefile-create): Use them.
+
+	* cedet/ede/pconf.el (ede-proj-configure-test-required-file):
+	Force FILE to expand to the current target.  Use file-exists-p to
+	check that it exists.
+
+	* cedet/ede/linux.el (ede-linux-version): Don't call "head".
+	(ede-linux-load): Wrap dir in file-name-as-directory.  Set
+	:version slot.
+
+	* cedet/ede/files.el (ede-get-locator-object): When enabling
+	locate, do so on "top".
+
+	* cedet/ede/emacs.el (ede-emacs-file-existing): Wrap "dir" in
+	file-name-as-directory during compare.
+	(ede-emacs-version): Return Emacs/XEmacs differentiator.  Get
+	version number from different places.  Don't call egrep.
+	(ede-emacs-load): Set :version slot.  Call file-name-as-directory
+	to set the directory.
+
+	* cedet/ede/shell.el: New file.
+
+	* cedet/inversion.el (inversion-decoders): Allow for stray . in
+	alpha/beta variants.
+
 2009-10-17  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* international/mule-cmds.el (select-safe-coding-system): If the file
--- a/lisp/cedet/ede.el	Sat Oct 17 03:59:45 2009 +0000
+++ b/lisp/cedet/ede.el	Sat Oct 17 04:18:31 2009 +0000
@@ -239,6 +239,9 @@
 		       (and ede-object
 			    (obj-of-class-p ede-object ede-target)) ]
 		     )
+		     [ "Run target" ede-run-target
+		       (and ede-object
+			    (obj-of-class-p ede-object ede-target)) ]
 	 :documentation "Menu specialized to this type of target."
 	 :accessor ede-object-menu)
    )
@@ -373,7 +376,8 @@
 		    :group (settings)
 		    :documentation "Project local variables")
    (keybindings :allocation :class
-		:initform (("D" . ede-debug-target))
+		:initform (("D" . ede-debug-target)
+			   ("R" . ede-run-target))
 		:documentation "Keybindings specialized to this type of target."
 		:accessor ede-object-keybindings)
    (menu :allocation :class
@@ -565,6 +569,7 @@
     (define-key pmap "c" 'ede-compile-target)
     (define-key pmap "\C-c" 'ede-compile-selected)
     (define-key pmap "D" 'ede-debug-target)
+    (define-key pmap "R" 'ede-run-target)
     ;; bind our submap into map
     (define-key map "\C-c." pmap)
     map)
@@ -1142,6 +1147,11 @@
   (interactive)
   (ede-invoke-method 'project-debug-target))
 
+(defun ede-run-target ()
+  "Debug the current buffer's assocated target."
+  (interactive)
+  (ede-invoke-method 'project-run-target))
+
 (defun ede-make-dist ()
   "Create a distribution from the current project."
   (interactive)
@@ -1381,6 +1391,10 @@
   "Run the current project target OBJ in a debugger."
   (error "debug-target not supported by %s" (object-name obj)))
 
+(defmethod project-run-target ((obj ede-target))
+  "Run the current project target OBJ."
+  (error "run-target not supported by %s" (object-name obj)))
+
 (defmethod project-make-dist ((this ede-project))
   "Build a distribution for the project based on THIS project."
   (error "Make-dist not supported by %s" (object-name this)))
--- a/lisp/cedet/ede/emacs.el	Sat Oct 17 03:59:45 2009 +0000
+++ b/lisp/cedet/ede/emacs.el	Sat Oct 17 04:18:31 2009 +0000
@@ -48,7 +48,8 @@
 	(ans nil))
     (while (and projs (not ans))
       (let ((root (ede-project-root-directory (car projs))))
-	(when (string-match (concat "^" (regexp-quote root)) dir)
+	(when (string-match (concat "^" (regexp-quote root))
+			    (file-name-as-directory dir))
 	  (setq ans (car projs))))
       (setq projs (cdr projs)))
     ans))
@@ -70,19 +71,44 @@
 	      base))))))
 
 (defun ede-emacs-version (dir)
-  "Find the Emacs version for the Emacs src in DIR."
-  (let ((buff (get-buffer-create " *emacs-query*")))
+  "Find the Emacs version for the Emacs src in DIR.
+Return a tuple of ( EMACSNAME . VERSION )."
+  (let ((buff (get-buffer-create " *emacs-query*"))
+	(emacs "Emacs")
+	(ver ""))
     (save-excursion
       (set-buffer buff)
       (erase-buffer)
       (setq default-directory (file-name-as-directory dir))
-      (call-process "egrep" nil buff nil "-n" "-e" "^version=" "Makefile")
+      ;(call-process "egrep" nil buff nil "-n" "-e" "^version=" "Makefile")
+      (call-process "egrep" nil buff nil "-n" "-e" "AC_INIT" "configure.in")
       (goto-char (point-min))
-      (re-search-forward "version=\\([0-9.]+\\)")
-      (prog1
-	  (match-string 1)
-	(kill-buffer buff)
-	))))
+      ;(re-search-forward "version=\\([0-9.]+\\)")
+      (cond
+       ;; Maybe XEmacs?
+       ((file-exists-p "version.sh")
+	(setq emacs "XEmacs")
+	(insert-file-contents "version.sh")
+	(goto-char (point-min))
+	(re-search-forward "emacs_major_version=\\([0-9]+\\)
+emacs_minor_version=\\([0-9]+\\)
+emacs_beta_version=\\([0-9]+\\)")
+	(setq ver (concat (match-string 1) "."
+			  (match-string 2) "."
+			  (match-string 3)))
+	)
+       ;; Insert other Emacs here...
+
+       ;; Vaguely recent version of GNU Emacs?
+       (t
+	(insert-file-contents "configure.in")
+	(goto-char (point-min))
+	(re-search-forward "AC_INIT(emacs,\\s-*\\([0-9.]+\\)\\s-*)")
+	(setq ver (match-string 1))
+	)
+       )
+      ;; Return a tuple
+      (cons emacs ver))))
 
 (defclass ede-emacs-project (ede-project eieio-instance-tracker)
   ((tracking-symbol :initform 'ede-emacs-project-list)
@@ -97,11 +123,13 @@
 ROOTPROJ is nil, since there is only one project."
   (or (ede-emacs-file-existing dir)
       ;; Doesn't already exist, so lets make one.
-      (ede-emacs-project "Emacs"
-			 :name (concat "Emacs" (ede-emacs-version dir))
-			 :directory dir
-			 :file (expand-file-name "src/emacs.c"
-						 dir))
+      (let* ((vertuple (ede-emacs-version dir)))
+	(ede-emacs-project (car vertuple)
+			   :name (car vertuple)
+			   :version (cdr vertuple)
+			   :directory (file-name-as-directory dir)
+			   :file (expand-file-name "src/emacs.c"
+						   dir)))
       (ede-add-project-to-global-list this)
       )
   )
--- a/lisp/cedet/ede/files.el	Sat Oct 17 03:59:45 2009 +0000
+++ b/lisp/cedet/ede/files.el	Sat Oct 17 04:18:31 2009 +0000
@@ -396,7 +396,7 @@
   ;; caching values, and for locating things more robustly.
   (let ((top (ede-toplevel proj)))
     (when (not (slot-boundp top 'locate-obj))
-      (ede-enable-locate-on-project this))
+      (ede-enable-locate-on-project top))
     (oref top locate-obj)
     ))
 
--- a/lisp/cedet/ede/linux.el	Sat Oct 17 03:59:45 2009 +0000
+++ b/lisp/cedet/ede/linux.el	Sat Oct 17 04:18:31 2009 +0000
@@ -76,7 +76,7 @@
       (set-buffer buff)
       (erase-buffer)
       (setq default-directory (file-name-as-directory dir))
-      (call-process "head" nil buff nil "-n" "3" "Makefile")
+      (insert-file-contents "Makefile" nil 0 512)
       (goto-char (point-min))
       (let (major minor sub)
 	(re-search-forward "^VERSION *= *\\([0-9.]+\\)")
@@ -104,8 +104,9 @@
   (or (ede-linux-file-existing dir)
       ;; Doesn't already exist, so lets make one.
       (ede-linux-project "Linux"
-			 :name (concat "Linux" (ede-linux-version dir))
-			 :directory dir
+			 :name "Linux"
+			 :version (ede-linux-version dir)
+			 :directory (file-name-as-directory dir)
 			 :file (expand-file-name "scripts/ver_linux"
 						 dir))
       (ede-add-project-to-global-list this)
--- a/lisp/cedet/ede/pconf.el	Sat Oct 17 03:59:45 2009 +0000
+++ b/lisp/cedet/ede/pconf.el	Sat Oct 17 04:18:31 2009 +0000
@@ -42,21 +42,22 @@
 
 (defmethod ede-proj-configure-test-required-file ((this ede-proj-project) file)
   "For project THIS, test that the file FILE exists, or create it."
-  (when (not (ede-expand-filename (ede-toplevel this) file))
-    (save-excursion
-      (find-file (ede-expand-filename (ede-toplevel this) file t))
-      (cond ((string= file "AUTHORS")
-	     (insert (user-full-name) " <" (user-login-name) ">"))
-	    ((string= file "NEWS")
-	     (insert "NEWS file for " (ede-name this)))
-	    (t (insert "\n")))
-      (save-buffer)
-      (when
-	  (and (eq ede-pconf-create-file-query 'ask)
-	       (not (eq ede-pconf-create-file-query 'never))
-	       (not (y-or-n-p
-		     (format "I had to create the %s file for you.  Ok? " file)))
-	       (error "Quit"))))))
+  (let ((f (ede-expand-filename (ede-toplevel this) file t)))
+    (when (not (file-exists-p f))
+      (save-excursion
+	(find-file f)
+	(cond ((string= file "AUTHORS")
+	       (insert (user-full-name) " <" (user-login-name) ">"))
+	      ((string= file "NEWS")
+	       (insert "NEWS file for " (ede-name this)))
+	      (t (insert "\n")))
+	(save-buffer)
+	(when
+	    (and (eq ede-pconf-create-file-query 'ask)
+		 (not (eq ede-pconf-create-file-query 'never))
+		 (not (y-or-n-p
+		       (format "I had to create the %s file for you.  Ok? " file)))
+		 (error "Quit")))))))
 
 
 (defmethod ede-proj-configure-synchronize ((this ede-proj-project))
@@ -100,6 +101,7 @@
     ;; Now save
     (save-buffer)
     (setq postcmd "autoreconf -i;")
+
     ;; Verify a bunch of files that are required by automake.
     (ede-proj-configure-test-required-file this "AUTHORS")
     (ede-proj-configure-test-required-file this "NEWS")
--- a/lisp/cedet/ede/pmake.el	Sat Oct 17 03:59:45 2009 +0000
+++ b/lisp/cedet/ede/pmake.el	Sat Oct 17 04:18:31 2009 +0000
@@ -44,6 +44,7 @@
 ;;       1) Insert distribution source variables for targets
 ;;       2) Insert user requested rules
 
+(eval-when-compile (require 'cl))
 (require 'ede/proj)
 (require 'ede/proj-obj)
 (require 'ede/proj-comp)
@@ -205,6 +206,9 @@
 	(error "Makefile.in is not supported"))
        ((eq (oref this makefile-type) 'Makefile.am)
 	(require 'ede/pconf)
+	;; Basic vars needed:
+	(ede-proj-makefile-automake-insert-subdirs this)
+	(ede-proj-makefile-automake-insert-extradist this)
 	;; Distribution variables
 	(let ((targ (if isdist (oref this targets) mt)))
 	  (ede-compiler-begin-unique
@@ -240,8 +244,11 @@
   "Add VARNAME into the current Makefile.
 Execute BODY in a location where a value can be placed."
   `(let ((addcr t) (v ,varname))
-     (if (re-search-backward (concat "^" v "\\s-*=") nil t)
+     (if (save-excursion
+	   (goto-char (point-max))
+	   (re-search-backward (concat "^" v "\\s-*=") nil t))
 	 (progn
+	   (goto-char (match-end 0))
 	   (ede-pmake-end-of-variable)
 	   (if (< (current-column) 40)
 	       (if (and (/= (preceding-char) ?=)
@@ -502,6 +509,18 @@
   (ede-proj-makefile-insert-dist-dependencies this)
   )
 
+(defmethod ede-proj-makefile-automake-insert-subdirs ((this ede-proj-project))
+  "Insert a SUBDIRS variable for Automake."
+  (proj-comp-insert-variable-once "SUBDIRS"
+    (ede-map-subprojects
+     this (lambda (sproj)
+	    (insert " " (ede-subproject-relative-path sproj))
+	    ))))
+
+(defmethod ede-proj-makefile-automake-insert-extradist ((this ede-proj-project))
+  "Insert the EXTRADIST variable entries needed for Automake and EDE."
+  (proj-comp-insert-variable-once "EXTRA_DIST" (insert "Project.ede")))
+
 (defmethod ede-proj-makefile-insert-dist-rules ((this ede-proj-project))
   "Insert distribution rules for THIS in a Makefile, such as CLEAN and DIST."
   (let ((junk (ede-proj-makefile-garbage-patterns this))
--- a/lisp/cedet/ede/proj-comp.el	Sat Oct 17 03:59:45 2009 +0000
+++ b/lisp/cedet/ede/proj-comp.el	Sat Oct 17 04:18:31 2009 +0000
@@ -44,6 +44,7 @@
 ;; To write a method that inserts a variable or rule for a compiler
 ;; based object, wrap the body of your call in `ede-compiler-only-once'
 
+(eval-when-compile (require 'cl))
 (require 'ede)				;source object
 (require 'ede/autoconf-edit)
 
--- a/lisp/cedet/ede/proj-misc.el	Sat Oct 17 03:59:45 2009 +0000
+++ b/lisp/cedet/ede/proj-misc.el	Sat Oct 17 04:18:31 2009 +0000
@@ -27,6 +27,7 @@
 ;; This misc target lets the user link in custom makefiles to an EDE
 ;; project.
 
+(eval-when-compile (require 'cl))
 (require 'ede/pmake)
 (require 'ede/proj-comp)
 
--- a/lisp/cedet/ede/proj-obj.el	Sat Oct 17 03:59:45 2009 +0000
+++ b/lisp/cedet/ede/proj-obj.el	Sat Oct 17 04:18:31 2009 +0000
@@ -26,6 +26,7 @@
 ;; Handles a superclass of target types which create object code in
 ;; and EDE Project file.
 
+(eval-when-compile (require 'cl))
 (require 'ede/proj)
 (declare-function ede-pmake-varname "ede/pmake")
 
@@ -46,7 +47,7 @@
 				  ;; fortran or pascal can be added here
 				  ))
    (availablelinkers :initform (ede-g++-linker
-				ede-gcc-linker
+				ede-cc-linker
 				ede-gfortran-linker
 				ede-ld-linker
 				;; Add more linker thingies here.
@@ -108,10 +109,10 @@
    :uselinker t)
   "Compiler for C sourcecode.")
 
-(defvar ede-gcc-linker
+(defvar ede-cc-linker
   (ede-linker
-   "ede-gcc-linker"
-   :name "gcc"
+   "ede-cc-linker"
+   :name "cc"
    :sourcetype '(ede-source-c)
    :variables  '(("C_LINK" . "$(CC) $(CFLAGS) $(LDFLAGS) -L."))
    :commands '("$(C_LINK) -o $@ $^")
--- a/lisp/cedet/ede/proj-prog.el	Sat Oct 17 03:59:45 2009 +0000
+++ b/lisp/cedet/ede/proj-prog.el	Sat Oct 17 04:18:31 2009 +0000
@@ -25,9 +25,12 @@
 ;;
 ;; Handle building programs from object files in and EDE Project file.
 
+(eval-when-compile (require 'cl))
 (require 'ede/pmake)
 (require 'ede/proj-obj)
 
+(declare-function ede-shell-run-something "ede/shell")
+
 ;;; Code:
 (defclass ede-proj-target-makefile-program
   (ede-proj-target-makefile-objectcode)
@@ -107,6 +110,26 @@
 	  (funcall ede-debug-program-function cmd))
       (kill-buffer tb))))
 
+(defmethod project-run-target ((obj ede-proj-target-makefile-program) &optional command)
+  "Run a program target OBJ.
+Optional COMMAND is the command to run in place of asking the user."
+  (require 'ede/shell)
+  (let ((tb (get-buffer-create " *padt*"))
+	(dd (if (not (string= (oref obj path) ""))
+		(oref obj path)
+	      default-directory))
+	(cmd nil))
+    (unwind-protect
+	(progn
+	  (set-buffer tb)
+	  (setq default-directory dd)
+	  (setq cmd (or command
+			(read-from-minibuffer
+			 "Run (like this): "
+			 (concat "./" (ede-target-name obj)))))
+	  (ede-shell-run-something obj cmd)
+	  )
+      (kill-buffer tb))))
 
 (provide 'ede/proj-prog)
 
--- a/lisp/cedet/ede/proj-shared.el	Sat Oct 17 03:59:45 2009 +0000
+++ b/lisp/cedet/ede/proj-shared.el	Sat Oct 17 04:18:31 2009 +0000
@@ -26,6 +26,7 @@
 ;; Tries to deal with libtool and non-libtool situations.
 
 (require 'ede/pmake)
+(require 'ede/proj-obj)
 (require 'ede/proj-prog)
 
 ;;; THIS NEEDS WORK.  SEE ede-proj-obj.
@@ -33,11 +34,15 @@
 ;;; Code:
 (defclass ede-proj-target-makefile-shared-object
   (ede-proj-target-makefile-program)
-  ((availablecompilers :initform (ede-gcc-shared-compiler
-				  ede-gcc-libtool-shared-compiler
-				  ede-g++-shared-compiler
+  ((availablecompilers :initform (ede-gcc-libtool-shared-compiler
+				  ;;ede-gcc-shared-compiler
 				  ede-g++-libtool-shared-compiler
+				  ;;ede-g++-shared-compiler
 				  ))
+   (availablelinkers :initform (ede-cc-linker-libtool
+				ede-g++-linker-libtool
+				;; Add more linker thingies here.
+				))
    (ldflags :custom (repeat (string :tag "Libtool flag"))
 	    :documentation
 	    "Additional flags to add when linking this shared library.
@@ -65,16 +70,37 @@
   (clone ede-gcc-shared-compiler
 	 "ede-c-shared-compiler-libtool"
 	 :name "libtool"
-	 :variables '(("LIBTOOL" . "$(SHELL) libtool")
+	 :variables '(("LIBTOOL" . "libtool")
 		      ("LTCOMPILE" . "$(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)")
 		      ("LTLINK" . "$(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -L. -o $@")
 		      )
-	 :commands '("$(LTLINK) $^"
-		     )
+	 :rules (list (ede-makefile-rule
+		       "cc-inference-rule-libtool"
+		       :target "%.o"
+		       :dependencies "%.c"
+		       :rules '("@echo '$(LTCOMPILE) -o $@ $<'; \\"
+				"$(LTCOMPILE) -o $@ $<"
+				)
+		       ))
 	 :autoconf '("AC_PROG_LIBTOOL")
 	 )
   "Compiler for C sourcecode.")
 
+(defvar ede-cc-linker-libtool
+  (clone ede-cc-linker
+   "ede-cc-linker-libtool"
+   :name "cc shared"
+   ;; Only use this linker when c++ exists.
+   :sourcetype '(ede-source-c++)
+   :variables  '(
+		 ("LIBTOOL" . "libtool")
+		 ("LTLINK" . "$(LIBTOOL) --tag=CPP --mode=link $(CPP) $(CFLAGS) $(LDFLAGS) -L. -o $@")
+		 )
+   :commands '("$(LTLINK) -o $@ $^")
+   :autoconf '("AC_PROG_LIBTOOL")
+   :objectextention ".la")
+  "Linker needed for c++ programs.")
+
 (defvar ede-g++-shared-compiler
   (clone ede-g++-compiler
 	 "ede-c++-shared-compiler"
@@ -92,16 +118,36 @@
 	 "ede-c++-shared-compiler-libtool"
 	 :name "libtool"
 	 :variables '(("CXX" "g++")
-		      ("LIBTOOL" . "$(SHELL) libtool")
-		      ("LTCOMPILE" . "$(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)")
-		      ("LTLINK" . "$(LIBTOOL) --mode=link $(CXX) $(CFLAGS) $(LDFLAGS) -L. -o $@")
+		      ("LIBTOOL" . "libtool")
+		      ("LTCOMPILE" . "$(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)")
 		      )
-	 :commands '("$(LTLINK) $^"
-		     )
+	 :rules (list (ede-makefile-rule
+		       "c++-inference-rule-libtool"
+		       :target "%.o"
+		       :dependencies "%.c"
+		       :rules '("@echo '$(LTCOMPILE) -o $@ $<'; \\"
+				"$(LTCOMPILE) -o $@ $<"
+				)
+		       ))
 	 :autoconf '("AC_PROG_LIBTOOL")
 	 )
   "Compiler for C sourcecode.")
 
+(defvar ede-g++-linker-libtool
+  (clone ede-g++-linker
+   "ede-g++-linker-libtool"
+   :name "g++"
+   ;; Only use this linker when c++ exists.
+   :sourcetype '(ede-source-c++)
+   :variables  '(
+		 ("LIBTOOL" . "libtool")
+		 ("LTLINK" . "$(LIBTOOL) --tag=CXX --mode=link $(CXX) $(CFLAGS) $(LDFLAGS) -L. -o $@")
+		 )
+   :commands '("$(LTLINK) -o $@ $^")
+   :autoconf '("AC_PROG_LIBTOOL")
+   :objectextention ".la")
+  "Linker needed for c++ programs.")
+
 ;;; @TODO - C++ versions of the above.
 
 (when nil
@@ -150,11 +196,7 @@
   "Return the name of the main target for THIS target."
   ;; We need some platform gunk to make the .so change to .sl, or .a,
   ;; depending on the platform we are going to compile against.
-  (concat "lib" (ede-name this)
-	  (if (eq (oref (ede-target-parent this) makefile-type)
-		  'Makefile.am)
-	      ".la"
-	    ".so")))
+  (concat "lib" (ede-name this) ".la"))
 
 (defmethod ede-proj-makefile-sourcevar ((this ede-proj-target-makefile-shared-object))
   "Return the variable name for THIS's sources."
--- a/lisp/cedet/ede/proj.el	Sat Oct 17 03:59:45 2009 +0000
+++ b/lisp/cedet/ede/proj.el	Sat Oct 17 04:18:31 2009 +0000
@@ -498,6 +498,10 @@
   "Run the current project target OBJ in a debugger."
   (error "Debug-target not supported by %s" (object-name obj)))
 
+(defmethod project-run-target ((obj ede-proj-target))
+  "Run the current project target OBJ."
+  (error "Run-target not supported by %s" (object-name obj)))
+
 (defmethod ede-proj-makefile-target-name ((this ede-proj-target))
   "Return the name of the main target for THIS target."
   (ede-name this))
--- a/lisp/cedet/ede/project-am.el	Sat Oct 17 03:59:45 2009 +0000
+++ b/lisp/cedet/ede/project-am.el	Sat Oct 17 04:18:31 2009 +0000
@@ -392,6 +392,7 @@
 	(cmd nil))
     (unwind-protect
 	(progn
+	  (require 'ede/shell)
 	  (set-buffer tb)
 	  (setq default-directory dd)
 	  (setq cmd (read-from-minibuffer
@@ -401,6 +402,21 @@
 	  (funcall project-am-debug-target-function cmd))
       (kill-buffer tb))))
 
+(defmethod project-run-target ((obj project-am-objectcode))
+  "Run the current project target in comint buffer."
+  (let ((tb (get-buffer-create " *padt*"))
+	(dd (oref obj path))
+	(cmd nil))
+    (unwind-protect
+	(progn
+	  (set-buffer tb)
+	  (setq default-directory dd)
+	  (setq cmd (read-from-minibuffer
+		     "Run (like this): "
+		     (concat (ede-target-name obj))))
+	  (ede-shell-run-something obj cmd))
+      (kill-buffer tb))))
+
 (defmethod project-make-dist ((this project-am-target))
   "Run the current project in the debugger."
   (require 'compile)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/cedet/ede/shell.el	Sat Oct 17 04:18:31 2009 +0000
@@ -0,0 +1,83 @@
+;;; ede/shell.el --- A shell controlled by EDE.
+;;
+;; Copyright (C) 2009 Free Software Foundation, Inc.
+;;
+;; Author: Eric M. Ludlam <eric@siege-engine.com>
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+;;
+;; Run commands through a specialized EDE shell buffer.  Commands will
+;; be run as shell commands so users can type in their own thing in
+;; the shells for testing purposes.
+;;
+;; Each thing that EDE wants to use will create a shell to interact with it.
+
+;;; Code:
+
+(require 'ede)
+
+(declare-function comint-send-input "comint")
+
+(defmethod ede-shell-run-something ((target ede-target) command)
+  "Create a shell to run stuff for TARGET.
+COMMAND is a text string representing the thing to be run."
+  (let* ((buff (ede-shell-buffer target))
+	 (cp (ede-target-parent target))
+	 (dd (oref cp :directory)))
+    ;; Show the new buffer.
+    (when (not (get-buffer-window buff))
+      (switch-to-buffer-other-window buff t))
+    ;; Force a shell into the buffer.
+    (shell buff)
+    (while (eq (point-min) (point))
+      (accept-process-output))
+    ;; Change the default directory
+    (if (not (string= (file-name-as-directory (expand-file-name default-directory))
+		      (file-name-as-directory (expand-file-name dd))))
+	;; Go there.
+	(setq command (concat (concat "cd " dd ";" command))))
+    ;; Run the command itself.
+    (ede-shell-run-command command)
+    ))
+
+(defun ede-shell-run-command (command)
+  "Run the COMMAND in the current shell-buffer."
+  (require 'comint)
+  ;; go to end
+  (goto-char (point-max))
+  ;; Insert the stuff.
+  (goto-char (point-max))
+  (insert command)
+  ;; Send the command.
+  (comint-send-input)
+  )
+
+(defmethod ede-shell-buffer ((target ede-target))
+  "Get the buffer for running shell commands for TARGET."
+  (let ((name (ede-name target)))
+    (get-buffer-create (format "*EDE Shell %s" name))))
+
+(provide 'ede/shell)
+
+;; Local variables:
+;; generated-autoload-file: "loaddefs.el"
+;; generated-autoload-feature: ede/loaddefs
+;; generated-autoload-load-name: "ede/shell"
+;; End:
+
+;;; ede/shell.el ends here
--- a/lisp/cedet/ede/speedbar.el	Sat Oct 17 03:59:45 2009 +0000
+++ b/lisp/cedet/ede/speedbar.el	Sat Oct 17 04:18:31 2009 +0000
@@ -27,6 +27,8 @@
 ;;
 
 ;;; Code:
+
+(eval-when-compile (require 'cl))
 (require 'speedbar)
 (require 'eieio-speedbar)
 (require 'ede)
--- a/lisp/cedet/inversion.el	Sat Oct 17 03:59:45 2009 +0000
+++ b/lisp/cedet/inversion.el	Sat Oct 17 04:18:31 2009 +0000
@@ -80,10 +80,10 @@
 
 (defconst inversion-decoders
   '(
-    (alpha  "^\\([0-9]+\\)\\.\\([0-9]+\\)\\s-*alpha\\([0-9]+\\)?$" 3)
-    (beta   "^\\([0-9]+\\)\\.\\([0-9]+\\)\\s-*beta\\([0-9]+\\)?$" 3)
+    (alpha  "^\\([0-9]+\\)\\.\\([0-9]+\\)\\s-*\\.?alpha\\([0-9]+\\)?$" 3)
+    (beta   "^\\([0-9]+\\)\\.\\([0-9]+\\)\\s-*\\.?beta\\([0-9]+\\)?$" 3)
     (beta   "^\\([0-9]+\\)\\.\\([0-9]+\\)\\s-*(beta\\([0-9]+\\)?)" 3)
-    (prerelease "^\\([0-9]+\\)\\.\\([0-9]+\\)\\s-*pre\\([0-9]+\\)?$" 3)
+    (prerelease "^\\([0-9]+\\)\\.\\([0-9]+\\)\\s-*\\.?pre\\([0-9]+\\)?$" 3)
     (full   "^\\([0-9]+\\)\\.\\([0-9]+\\)$" 2)
     (fullsingle "^\\([0-9]+\\)$" 1)
     (patch  "^\\([0-9]+\\)\\.\\([0-9]+\\) (patch \\([0-9]+\\))" 3)
--- a/lisp/cedet/semantic/analyze.el	Sat Oct 17 03:59:45 2009 +0000
+++ b/lisp/cedet/semantic/analyze.el	Sat Oct 17 04:18:31 2009 +0000
@@ -64,6 +64,7 @@
 ;;       constant.  These need to be returned as there would be no
 ;;       other possible completions.
 
+(eval-when-compile (require 'cl))
 (require 'semantic)
 (require 'semantic/format)
 (require 'semantic/ctxt)
--- a/lisp/cedet/semantic/complete.el	Sat Oct 17 03:59:45 2009 +0000
+++ b/lisp/cedet/semantic/complete.el	Sat Oct 17 04:18:31 2009 +0000
@@ -107,6 +107,7 @@
 ;; `semantic-complete-inline-tag-engine' will complete text in
 ;; a buffer.
 
+(eval-when-compile (require 'cl))
 (require 'semantic)
 (require 'eieio-opt)
 (require 'semantic/analyze)
--- a/lisp/cedet/semantic/debug.el	Sat Oct 17 03:59:45 2009 +0000
+++ b/lisp/cedet/semantic/debug.el	Sat Oct 17 04:18:31 2009 +0000
@@ -36,6 +36,7 @@
 ;; Each parser must implement the interface and override any methods as needed.
 ;;
 
+(eval-when-compile (require 'cl))
 (require 'semantic)
 (require 'eieio)
 (eval-when-compile (require 'semantic/find))
--- a/lisp/cedet/semantic/idle.el	Sat Oct 17 03:59:45 2009 +0000
+++ b/lisp/cedet/semantic/idle.el	Sat Oct 17 04:18:31 2009 +0000
@@ -905,7 +905,7 @@
 	   target (lambda (start end prefix)
 		    (when (/= start (car Hbounds))
 		      (pulse-momentary-highlight-region
-		       start end))
+		       start end semantic-idle-summary-highlight-face))
 		    (semantic-throw-on-input 'symref-highlight)
 		    )
 	   (semantic-tag-start tag)
--- a/lisp/cedet/semantic/mru-bookmark.el	Sat Oct 17 03:59:45 2009 +0000
+++ b/lisp/cedet/semantic/mru-bookmark.el	Sat Oct 17 04:18:31 2009 +0000
@@ -45,6 +45,7 @@
 
 ;;; Code:
 
+(eval-when-compile (require 'cl))
 (require 'semantic)
 (require 'eieio-base)
 (require 'ring)
--- a/lisp/cedet/semantic/scope.el	Sat Oct 17 03:59:45 2009 +0000
+++ b/lisp/cedet/semantic/scope.el	Sat Oct 17 04:18:31 2009 +0000
@@ -602,28 +602,29 @@
       ;;         for recycling later?  Should this become a helpful
       ;;         extra routine?
       (when (and parents (semantic-tag-with-position-p type))
-	;; If TYPE has a position, go there and get the scope.
-	(semantic-go-to-tag type)
+	(save-excursion
+	  ;; If TYPE has a position, go there and get the scope.
+	  (semantic-go-to-tag type)
 
-	;; We need to make a mini scope, and only include the misc bits
-	;; that will help in finding the parent.  We don't really need
-	;; to do any of the stuff related to variables and what-not.
-	(setq tmpscope (semantic-scope-cache "mini"))
-	(let* (;; Step 1:
-	       (scopetypes (semantic-analyze-scoped-types (point)))
-	       (parents (semantic-analyze-scope-nested-tags (point) scopetypes))
-	       ;;(parentinherited (semantic-analyze-scope-lineage-tags parents scopetypes))
-	       (lscope nil)
-	       )
-	  (oset tmpscope scopetypes scopetypes)
-	  (oset tmpscope parents parents)
-	  ;;(oset tmpscope parentinheritance parentinherited)
+	  ;; We need to make a mini scope, and only include the misc bits
+	  ;; that will help in finding the parent.  We don't really need
+	  ;; to do any of the stuff related to variables and what-not.
+	  (setq tmpscope (semantic-scope-cache "mini"))
+	  (let* ( ;; Step 1:
+		 (scopetypes (semantic-analyze-scoped-types (point)))
+		 (parents (semantic-analyze-scope-nested-tags (point) scopetypes))
+		 ;;(parentinherited (semantic-analyze-scope-lineage-tags parents scopetypes))
+		 (lscope nil)
+		 )
+	    (oset tmpscope scopetypes scopetypes)
+	    (oset tmpscope parents parents)
+	    ;;(oset tmpscope parentinheritance parentinherited)
 
-	  (when (or scopetypes parents)
-	    (setq lscope (semantic-analyze-scoped-tags scopetypes tmpscope))
-	    (oset tmpscope scope lscope))
-	  (oset tmpscope fullscope (append scopetypes lscope parents))
-	  ))
+	    (when (or scopetypes parents)
+	      (setq lscope (semantic-analyze-scoped-tags scopetypes tmpscope))
+	      (oset tmpscope scope lscope))
+	    (oset tmpscope fullscope (append scopetypes lscope parents))
+	    )))
       ;; END creating tmpscope
 
       ;; Look up each parent one at a time.
--- a/lisp/cedet/srecode/compile.el	Sat Oct 17 03:59:45 2009 +0000
+++ b/lisp/cedet/srecode/compile.el	Sat Oct 17 04:18:31 2009 +0000
@@ -31,6 +31,7 @@
 ;; The output are a series of EIEIO objects which represent the
 ;; templates in a way that could be inserted later.
 
+(eval-when-compile (require 'cl))
 (require 'semantic)
 (require 'eieio)
 (require 'eieio-base)
--- a/lisp/cedet/srecode/dictionary.el	Sat Oct 17 03:59:45 2009 +0000
+++ b/lisp/cedet/srecode/dictionary.el	Sat Oct 17 04:18:31 2009 +0000
@@ -28,6 +28,7 @@
 
 ;;; CLASSES
 
+(eval-when-compile (require 'cl))
 (require 'eieio)
 (require 'srecode)
 (require 'srecode/table)
--- a/lisp/cedet/srecode/srt.el	Sat Oct 17 03:59:45 2009 +0000
+++ b/lisp/cedet/srecode/srt.el	Sat Oct 17 04:18:31 2009 +0000
@@ -25,6 +25,7 @@
 
 ;;; Code:
 
+(eval-when-compile (require 'cl))
 (require 'eieio)
 (require 'srecode/dictionary)
 (require 'srecode/insert)
--- a/lisp/emacs-lisp/eieio-base.el	Sat Oct 17 03:59:45 2009 +0000
+++ b/lisp/emacs-lisp/eieio-base.el	Sat Oct 17 04:18:31 2009 +0000
@@ -273,7 +273,11 @@
 			(eieio-persistent-path-relative this file)
 		      (file-name-nondirectory cfn)))
 	      (object-write this (oref this file-header-line)))
-	    (let ((backup-inhibited (not (oref this do-backups))))
+	    (let ((backup-inhibited (not (oref this do-backups)))
+		  (cs (car (find-coding-systems-region
+			    (point-min) (point-max)))))
+	      (unless (eq cs 'undecided)
+		(setq buffer-file-coding-system cs))
 	      ;; Old way - write file.  Leaves message behind.
 	      ;;(write-file cfn nil)