Hello xemacs team,
I found the part for making vsim cygwin aware. If i use menu
VHLD->compile->Compiler Buffer I get the error:
$ cd /cygdrive/d/electronic/Projects/LA/mxe/
$ vcom -93 -work work
/cygdrive/d/electronic/Projects/LA/source/vhdl/num_type.vhd
Model Technology ModelSim XE III vcom 6.0a Compiler 2004.11 Nov 10 2004
** Error: (vcom-7) Failed to open design unit file
"/cygdrive/d/electronic/Projects/LA/source/vhdl/num_type.vhd" in read mode.
No such file or directory. (errno = ENOENT)
Compilation exited abnormally with code 2 at Fri Sep 30 14:23:08
The last line attached is hopefully the solution for this (the use of
cygpath -d $path to convert paths). Can you extend the vhld-mode's
vhdl-compile() function with this one? I guess, you must use new
variables like file-name-prefix/-postfix to aware the compatibility with
non cygwin environments. Personaly I haven't any (emacs) lisp knowlegde
unfortunally.
Thanks an dRegards,
Olaf
-------------------------------------------------------------------------
(defun vhdl-compile ()
"Compile current buffer using the VHDL compiler specified in
`vhdl-compiler'. Used with cygwin's cygpath to make vsim cygwin aware."
(interactive)
(vhdl-compile-init)
(let* ((project (aget vhdl-project-alist vhdl-project))
(compiler (or (aget vhdl-compiler-alist vhdl-compiler nil)
(error "ERROR: No such compiler: \"%s\""
vhdl-compiler)))
(command (nth 0 compiler))
(file-name (buffer-file-name))
(options (vhdl-get-compile-options project compiler file-name))
(default-directory (vhdl-compile-directory))
compilation-process-setup-function)
(unless (file-directory-p default-directory)
(error "ERROR: Compile directory does not exist: \"%s\""
default-directory))
;; put file name into quotes if it contains spaces
(when (string-match " " file-name)
(setq file-name (concat "\"" file-name "\"")))
;; print out file name if compiler does not
(setq vhdl-compile-file-name (buffer-file-name))
(when (and (= 0 (nth 1 (nth 10 compiler)))
(= 0 (nth 1 (nth 11 compiler))))
(setq compilation-process-setup-function
'vhdl-compile-print-file-name))
;; run compilation
(if options
(when command
;; added cygwin hack
(compile (concat command " " options " \$(cygpath -d " file-name
")")))
(vhdl-warning "Your project settings tell me not to compile this
file"))))