summaryrefslogtreecommitdiff
path: root/lisp/cedet/ede/proj-shared.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2009-10-17 04:18:31 +0000
committerChong Yidong <cyd@stupidchicken.com>2009-10-17 04:18:31 +0000
commit67d3ffe4989e99079a69e1f7358b758c14cb519a (patch)
treeef5228be15780a5eae1d81245c0b136e1101e123 /lisp/cedet/ede/proj-shared.el
parent2df48a87291564f460b159f94f622f88f6c40bfb (diff)
downloademacs-67d3ffe4989e99079a69e1f7358b758c14cb519a.tar.gz
* 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.
Diffstat (limited to 'lisp/cedet/ede/proj-shared.el')
-rw-r--r--lisp/cedet/ede/proj-shared.el74
1 files changed, 58 insertions, 16 deletions
diff --git a/lisp/cedet/ede/proj-shared.el b/lisp/cedet/ede/proj-shared.el
index 37aeb723042..2db616cfebf 100644
--- a/lisp/cedet/ede/proj-shared.el
+++ b/lisp/cedet/ede/proj-shared.el
@@ -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."