* 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.
This commit is contained in:
parent
2df48a8729
commit
67d3ffe498
27 changed files with 405 additions and 80 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -239,6 +239,9 @@ which files this object is interested in."
|
|||
(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 @@ and target specific elements such as build variables.")
|
|||
: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 @@ Argument LIST-O-O is the list of objects to choose from."
|
|||
(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 @@ Optional argument FORCE forces the file to be removed without asking."
|
|||
(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 @@ Argument COMMAND is the command to use for compiling the target."
|
|||
"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)))
|
||||
|
|
|
|||
|
|
@ -48,7 +48,8 @@ DIR is the directory to search from."
|
|||
(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 @@ DIR is the directory to search from."
|
|||
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 @@ Argument DIR is the directory it is created for.
|
|||
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)
|
||||
)
|
||||
)
|
||||
|
|
|
|||
|
|
@ -396,7 +396,7 @@ Get it from the toplevel project. If it doesn't have one, make one."
|
|||
;; 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)
|
||||
))
|
||||
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ DIR is the directory to search from."
|
|||
(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 @@ ROOTPROJ is nil, since there is only one project."
|
|||
(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)
|
||||
|
|
|
|||
|
|
@ -42,21 +42,22 @@ don't do it. A value of nil means to just do it.")
|
|||
|
||||
(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 @@ don't do it. A value of nil means to just do it.")
|
|||
;; 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")
|
||||
|
|
|
|||
|
|
@ -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 @@ MFILENAME is the makefile to generate."
|
|||
(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 @@ MFILENAME is the makefile to generate."
|
|||
"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 @@ Argument THIS is the target that should insert stuff."
|
|||
(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))
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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 @@ file.")
|
|||
: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 $@ $^")
|
||||
|
|
|
|||
|
|
@ -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 @@ Note: Not currently used. This bug needs to be fixed.")
|
|||
(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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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 @@ Use ldlibs to add addition libraries.")
|
|||
(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 @@ Use ldlibs to add addition libraries.")
|
|||
"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 @@ We need to override -program which has an LDADD element."
|
|||
"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."
|
||||
|
|
|
|||
|
|
@ -498,6 +498,10 @@ Optional argument COMMAND is the s the alternate command to use."
|
|||
"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))
|
||||
|
|
|
|||
|
|
@ -392,6 +392,7 @@ Argument COMMAND is the command to use for compiling the target."
|
|||
(cmd nil))
|
||||
(unwind-protect
|
||||
(progn
|
||||
(require 'ede/shell)
|
||||
(set-buffer tb)
|
||||
(setq default-directory dd)
|
||||
(setq cmd (read-from-minibuffer
|
||||
|
|
@ -401,6 +402,21 @@ Argument COMMAND is the command to use for compiling the target."
|
|||
(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)
|
||||
|
|
|
|||
83
lisp/cedet/ede/shell.el
Normal file
83
lisp/cedet/ede/shell.el
Normal file
|
|
@ -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
|
||||
|
|
@ -27,6 +27,8 @@
|
|||
;;
|
||||
|
||||
;;; Code:
|
||||
|
||||
(eval-when-compile (require 'cl))
|
||||
(require 'speedbar)
|
||||
(require 'eieio-speedbar)
|
||||
(require 'ede)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
|
|
|||
|
|
@ -905,7 +905,7 @@ Call `semantic-symref-hits-in-region' to identify local references."
|
|||
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)
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@
|
|||
|
||||
;;; Code:
|
||||
|
||||
(eval-when-compile (require 'cl))
|
||||
(require 'semantic)
|
||||
(require 'eieio-base)
|
||||
(require 'ring)
|
||||
|
|
|
|||
|
|
@ -602,28 +602,29 @@ whose tags can be searched when needed, OR it may be a scope object."
|
|||
;; 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.
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
;;; CLASSES
|
||||
|
||||
(eval-when-compile (require 'cl))
|
||||
(require 'eieio)
|
||||
(require 'srecode)
|
||||
(require 'srecode/table)
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
|
||||
;;; Code:
|
||||
|
||||
(eval-when-compile (require 'cl))
|
||||
(require 'eieio)
|
||||
(require 'srecode/dictionary)
|
||||
(require 'srecode/insert)
|
||||
|
|
|
|||
|
|
@ -273,7 +273,11 @@ instance."
|
|||
(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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue