>>> Igor Lautar <igor.lautar@...> seems to think that:
>hi,
>
>I'm using semantic from cedet-1.0beta3a with GNU emacs 21.3.1 on windows 2k
>SP4.
>(all patches installed)
>
>cut from semanticdb.sh:
>
>exec $emacs -batch -l "${loadpath}/semanticdb-mk.el" $files
>
>I've tried the following:
>
>bash-2.05b$ find . -name '*.[c|h]' | /cygdrive/c/Program\
>Files/emacs-21.3/bin/emacs.exe -L ~/.emacs.d/cedet-1.0beta3a/common/" -batch
>-l "~/.emacs.d/cedet-1.0beta3a/semantic/semanticdb-mk.el" -
>
>But emacs eats 100% CPU and does nothing. Where could be the problem ?
>
>The same thing is if I just give one file to parse (i.e. not with find).
[ ... ]
Hi,
Here is a patch to sematnicdb-mk.el that should get you going.
There seemed to be something strange about how the load-file-path was
calculated on my version of Emacs. Hopefully it is safer now to.
If needed, you can download the file from CVS directly instead.
Eric
---------
*** semanticdb-mk.el.~1.1.~ 2002-08-10 21:47:36.000000000 -0400
--- semanticdb-mk.el 2004-08-02 21:35:28.000000000 -0400
***************
*** 1,6 ****
;;; semanticdb-mk.el --- Command line database builder
! ;;; Copyright (C) 2002 Eric M. Ludlam
;; Author: Eric M. Ludlam <zappo@...>
;; Keywords: tags
--- 1,6 ----
;;; semanticdb-mk.el --- Command line database builder
! ;;; Copyright (C) 2002, 2004 Eric M. Ludlam
;; Author: Eric M. Ludlam <zappo@...>
;; Keywords: tags
***************
*** 30,88 ****
;;; Code
;;
- (defun semanticdb-mk-find-eieio ()
- "Find EIEIO in the usual places."
- (cond
- ((locate-library "eieio")
- nil)
- ((getenv "EIEIO_LOADPATH")
- (add-to-list 'load-path (getenv "EIEIO_LOADPATH")))
- (t;; For now, lets hope it was installed in their .emacs file.
- (let ((de (find-file-noselect "~/.emacs"))
- (path nil))
- (save-excursion
- (set-buffer de)
- (goto-char (point-min))
- (while (not path)
- (re-search-forward "eieio")
- (if (re-search-backward "\"" nil t)
- (progn
- (mark-sexp 1)
- (setq path
- (buffer-substring-no-properties (point) (mark))))))
- (add-to-list 'load-path (read path)))))))
-
(if (not noninteractive)
(error "You should not load semanticdb-mk interactivly."))
! ;; Force semantic onto the load path
! (add-to-list 'load-path (file-name-directory load-file-name))
! ;; Add eieio to the path.
! (semanticdb-mk-find-eieio)
! ;; Initialize semantic
! (require 'semantic-load)
;; Turn on semanticdb
(global-semanticdb-minor-mode 1)
;; Process loaded buffers from the command line.
(let ((args command-line-args))
;; Move past this load file being loaded.
! (while (not
! (progn
! ;;(message "Compare %s to %s" (car args) load-file-name)
! (string= (car args) load-file-name)))
! (setq args (cdr args)))
! (setq args (cdr args))
! ;; Grab the rest of the file names.
! ;; For each file, load it in, let semantic evaluate it for tags.
! (while args
! (message "Loading %s" (car args))
! (find-file (car args))
(setq args (cdr args)))
! )
;; Save the databases.
(semanticdb-save-all-db)
--- 30,73 ----
;;; Code
;;
(if (not noninteractive)
(error "You should not load semanticdb-mk interactivly."))
! ;; Find our source directory
! (let (fname semanticdir cedetdir loadfile)
! (setq fname load-file-name)
! (setq semanticdir (file-name-directory fname))
! (setq cedetdir (expand-file-name (concat semanticdir "../common/")))
! (setq loadfile (concat cedetdir "cedet.el"))
! (load-file loadfile))
;; Turn on semanticdb
+ (message "Enabling semanticdb...")
(global-semanticdb-minor-mode 1)
+ (message "Enabling semanticdb...done")
;; Process loaded buffers from the command line.
(let ((args command-line-args))
;; Move past this load file being loaded.
! (while (and args
! (not
! (progn
! (message "Compare %s to %s" (car args) "-l")
! (string= (car args) "-l"))))
(setq args (cdr args)))
! (when args
! (setq args (cdr (cdr args)))
! (message "Args left: %S" args)
! ;; Grab the rest of the file names.
! ;; For each file, load it in, let semantic evaluate it for tags.
! (while args
! (message "Loading %s" (car args))
! (find-file (car args))
! (semantic-fetch-tags)
! (setq args (cdr args)))
! ))
;; Save the databases.
(semanticdb-save-all-db)
|