diff options
| author | Reto Zimmermann | 2014-03-25 20:58:25 -0700 |
|---|---|---|
| committer | Glenn Morris | 2014-03-25 20:58:25 -0700 |
| commit | fb3deac832b66a0f2674ccd06ebc741cbbf960fe (patch) | |
| tree | bb6061d1ad9a02c7a8c4473342b3bd56dea6cd06 | |
| parent | 511df08c33c81bb4990e36102475e7596c4c5319 (diff) | |
| download | emacs-fb3deac832b66a0f2674ccd06ebc741cbbf960fe.tar.gz emacs-fb3deac832b66a0f2674ccd06ebc741cbbf960fe.zip | |
Sync with upstream vhdl mode v3.35.1
* lisp/progmodes/vhdl-mode.el (vhdl-version, vhdl-time-stamp): Update.
(vhdl-compiler-alist): Doc fix.
(vhdl-goto-line): Remove.
(vhdl-mode-abbrev-table-init): Add XEmacs compat.
(vhdl-mode) <paragraph-start>: Fix value.
(vhdl-fix-statement-region): Not `for' in wait-statement.
(vhdl-beautify-region): Also (un)tabify.
(vhdl-get-visible-signals):
Scan declarative part of generate statements.
(vhdl-template-record): Fix indentation for record type declaration.
(vhdl-expand-abbrev, vhdl-expand-paren): FIXME.
(vhdl-scan-directory-contents): Tweak.
(vhdl-speedbar-find-file, vhdl-speedbar-port-copy)
(vhdl-compose-components-package):
Replace vhdl-goto-line with forward-line.
(top-level): Tweak speedbar frame selection.
(vhdl-generate-makefile-1): Support for compilers with no
unit-to-file name mapping (create directory with dummy files).
| -rw-r--r-- | lisp/ChangeLog | 22 | ||||
| -rw-r--r-- | lisp/progmodes/vhdl-mode.el | 210 |
2 files changed, 128 insertions, 104 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0f76011a254..53d77bf66b1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,25 @@ | |||
| 1 | 2014-03-26 Reto Zimmermann <reto@gnu.org> | ||
| 2 | |||
| 3 | Sync with upstream vhdl mode v3.35.1. | ||
| 4 | * progmodes/vhdl-mode.el (vhdl-version, vhdl-time-stamp): Update. | ||
| 5 | (vhdl-compiler-alist): Doc fix. | ||
| 6 | (vhdl-goto-line): Remove. | ||
| 7 | (vhdl-mode-abbrev-table-init): Add XEmacs compat. | ||
| 8 | (vhdl-mode) <paragraph-start>: Fix value. | ||
| 9 | (vhdl-fix-statement-region): Not `for' in wait-statement. | ||
| 10 | (vhdl-beautify-region): Also (un)tabify. | ||
| 11 | (vhdl-get-visible-signals): | ||
| 12 | Scan declarative part of generate statements. | ||
| 13 | (vhdl-template-record): Fix indentation for record type declaration. | ||
| 14 | (vhdl-expand-abbrev, vhdl-expand-paren): FIXME. | ||
| 15 | (vhdl-scan-directory-contents): Tweak. | ||
| 16 | (vhdl-speedbar-find-file, vhdl-speedbar-port-copy) | ||
| 17 | (vhdl-compose-components-package): | ||
| 18 | Replace vhdl-goto-line with forward-line. | ||
| 19 | (top-level): Tweak speedbar frame selection. | ||
| 20 | (vhdl-generate-makefile-1): Support for compilers with no | ||
| 21 | unit-to-file name mapping (create directory with dummy files). | ||
| 22 | |||
| 1 | 2014-03-26 Wilson Snyder <wsnyder@wsnyder.org> | 23 | 2014-03-26 Wilson Snyder <wsnyder@wsnyder.org> |
| 2 | 24 | ||
| 3 | Sync with upstream verilog-mode revision 702457d. | 25 | Sync with upstream verilog-mode revision 702457d. |
diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el index b422cf6c989..458c4bd15f5 100644 --- a/lisp/progmodes/vhdl-mode.el +++ b/lisp/progmodes/vhdl-mode.el | |||
| @@ -13,10 +13,10 @@ | |||
| 13 | ;; filed in the Emacs bug reporting system against this file, a copy | 13 | ;; filed in the Emacs bug reporting system against this file, a copy |
| 14 | ;; of the bug report be sent to the maintainer's email address. | 14 | ;; of the bug report be sent to the maintainer's email address. |
| 15 | 15 | ||
| 16 | (defconst vhdl-version "3.34.2" | 16 | (defconst vhdl-version "3.35.1" |
| 17 | "VHDL Mode version number.") | 17 | "VHDL Mode version number.") |
| 18 | 18 | ||
| 19 | (defconst vhdl-time-stamp "2012-11-21" | 19 | (defconst vhdl-time-stamp "2014-03-11" |
| 20 | "VHDL Mode time stamp for last update.") | 20 | "VHDL Mode time stamp for last update.") |
| 21 | 21 | ||
| 22 | ;; This file is part of GNU Emacs. | 22 | ;; This file is part of GNU Emacs. |
| @@ -72,12 +72,12 @@ | |||
| 72 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 72 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 73 | ;; Emacs Versions | 73 | ;; Emacs Versions |
| 74 | 74 | ||
| 75 | ;; this updated version was only tested on: GNU Emacs 20.4 | 75 | ;; this updated version was only tested on: GNU Emacs 24.1 |
| 76 | 76 | ||
| 77 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 77 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 78 | ;; Installation | 78 | ;; Installation |
| 79 | 79 | ||
| 80 | ;; Prerequisites: GNU Emacs 20.X/21.X/22.X/23.X, XEmacs 20.X/21.X. | 80 | ;; Prerequisites: GNU Emacs 20/21/22/23/24, XEmacs 20/21. |
| 81 | 81 | ||
| 82 | ;; Put `vhdl-mode.el' into the `site-lisp' directory of your Emacs installation | 82 | ;; Put `vhdl-mode.el' into the `site-lisp' directory of your Emacs installation |
| 83 | ;; or into an arbitrary directory that is added to the load path by the | 83 | ;; or into an arbitrary directory that is added to the load path by the |
| @@ -392,7 +392,8 @@ File message: | |||
| 392 | Unit-to-file name mapping: mapping of library unit names to names of files | 392 | Unit-to-file name mapping: mapping of library unit names to names of files |
| 393 | generated by the compiler (used for Makefile generation) | 393 | generated by the compiler (used for Makefile generation) |
| 394 | To string : string a name is mapped to (\"\\1\" inserts the unit name, | 394 | To string : string a name is mapped to (\"\\1\" inserts the unit name, |
| 395 | \"\\2\" inserts the entity name for architectures) | 395 | \"\\2\" inserts the entity name for architectures, |
| 396 | \"\\3\" inserts the library name) | ||
| 396 | Case adjustment : adjust case of inserted unit names | 397 | Case adjustment : adjust case of inserted unit names |
| 397 | 398 | ||
| 398 | \(*) The regular expression must match the error message starting from the | 399 | \(*) The regular expression must match the error message starting from the |
| @@ -1069,7 +1070,7 @@ NOTE: Activate the new setting in a VHDL buffer by using the menu entry | |||
| 1069 | "Customizations for sequential processes." | 1070 | "Customizations for sequential processes." |
| 1070 | :group 'vhdl-template) | 1071 | :group 'vhdl-template) |
| 1071 | 1072 | ||
| 1072 | (defcustom vhdl-reset-kind 'async | 1073 | (defcustom vhdl-reset-kind 'async |
| 1073 | "Specifies which kind of reset to use in sequential processes." | 1074 | "Specifies which kind of reset to use in sequential processes." |
| 1074 | :type '(choice (const :tag "None" none) | 1075 | :type '(choice (const :tag "None" none) |
| 1075 | (const :tag "Synchronous" sync) | 1076 | (const :tag "Synchronous" sync) |
| @@ -2256,7 +2257,6 @@ Ignore byte-compiler warnings you might see." | |||
| 2256 | "Wait until idle, then run FUNCTION." | 2257 | "Wait until idle, then run FUNCTION." |
| 2257 | (if (fboundp 'start-itimer) | 2258 | (if (fboundp 'start-itimer) |
| 2258 | (start-itimer "vhdl-mode" function secs repeat t) | 2259 | (start-itimer "vhdl-mode" function secs repeat t) |
| 2259 | ; (run-with-idle-timer secs repeat function))) | ||
| 2260 | ;; explicitly activate timer (necessary when Emacs is already idle) | 2260 | ;; explicitly activate timer (necessary when Emacs is already idle) |
| 2261 | (aset (run-with-idle-timer secs repeat function) 0 nil))) | 2261 | (aset (run-with-idle-timer secs repeat function) 0 nil))) |
| 2262 | 2262 | ||
| @@ -2596,11 +2596,6 @@ conversion." | |||
| 2596 | (set-buffer (marker-buffer marker))) | 2596 | (set-buffer (marker-buffer marker))) |
| 2597 | (goto-char marker)) | 2597 | (goto-char marker)) |
| 2598 | 2598 | ||
| 2599 | (defun vhdl-goto-line (line) | ||
| 2600 | "Use this instead of calling user level function `goto-line'." | ||
| 2601 | (goto-char (point-min)) | ||
| 2602 | (forward-line (1- line))) | ||
| 2603 | |||
| 2604 | (defun vhdl-menu-split (list title) | 2599 | (defun vhdl-menu-split (list title) |
| 2605 | "Split menu LIST into several submenus, if number of | 2600 | "Split menu LIST into several submenus, if number of |
| 2606 | elements > `vhdl-menu-max-size'." | 2601 | elements > `vhdl-menu-max-size'." |
| @@ -2975,7 +2970,7 @@ STRING are replaced by `-' and substrings are converted to lower case." | |||
| 2975 | (make-variable-buffer-local 'vhdl-syntactic-context) | 2970 | (make-variable-buffer-local 'vhdl-syntactic-context) |
| 2976 | 2971 | ||
| 2977 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 2972 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 2978 | ;; Abbrev ook bindings | 2973 | ;; Abbrev hook bindings |
| 2979 | 2974 | ||
| 2980 | (defvar vhdl-mode-abbrev-table nil | 2975 | (defvar vhdl-mode-abbrev-table nil |
| 2981 | "Abbrev table to use in `vhdl-mode' buffers.") | 2976 | "Abbrev table to use in `vhdl-mode' buffers.") |
| @@ -2985,8 +2980,10 @@ STRING are replaced by `-' and substrings are converted to lower case." | |||
| 2985 | (define-abbrev-table 'vhdl-mode-abbrev-table | 2980 | (define-abbrev-table 'vhdl-mode-abbrev-table |
| 2986 | (append | 2981 | (append |
| 2987 | (when (memq 'vhdl vhdl-electric-keywords) | 2982 | (when (memq 'vhdl vhdl-electric-keywords) |
| 2988 | ;; VHDL'93 keywords | 2983 | ;; VHDL'02 keywords |
| 2989 | (mapcar (lambda (x) (list (car x) "" (cdr x) 0 'system)) | 2984 | (mapcar (if (featurep 'xemacs) |
| 2985 | (lambda (x) (list (car x) "" (cdr x) 0)) | ||
| 2986 | (lambda (x) (list (car x) "" (cdr x) 0 'system))) | ||
| 2990 | '( | 2987 | '( |
| 2991 | ("--" . vhdl-template-display-comment-hook) | 2988 | ("--" . vhdl-template-display-comment-hook) |
| 2992 | ("abs" . vhdl-template-default-hook) | 2989 | ("abs" . vhdl-template-default-hook) |
| @@ -3102,7 +3099,9 @@ STRING are replaced by `-' and substrings are converted to lower case." | |||
| 3102 | ))) | 3099 | ))) |
| 3103 | ;; VHDL-AMS keywords | 3100 | ;; VHDL-AMS keywords |
| 3104 | (when (and (memq 'vhdl vhdl-electric-keywords) (vhdl-standard-p 'ams)) | 3101 | (when (and (memq 'vhdl vhdl-electric-keywords) (vhdl-standard-p 'ams)) |
| 3105 | (mapcar (lambda (x) (list (car x) "" (cdr x) 0 'system)) | 3102 | (mapcar (if (featurep 'xemacs) |
| 3103 | (lambda (x) (list (car x) "" (cdr x) 0)) | ||
| 3104 | (lambda (x) (list (car x) "" (cdr x) 0 'system))) | ||
| 3106 | '( | 3105 | '( |
| 3107 | ("across" . vhdl-template-default-hook) | 3106 | ("across" . vhdl-template-default-hook) |
| 3108 | ("break" . vhdl-template-break-hook) | 3107 | ("break" . vhdl-template-break-hook) |
| @@ -4822,7 +4821,7 @@ Key bindings: | |||
| 4822 | 4821 | ||
| 4823 | ;; set local variables | 4822 | ;; set local variables |
| 4824 | (set (make-local-variable 'paragraph-start) | 4823 | (set (make-local-variable 'paragraph-start) |
| 4825 | "\\s-*\\(--+\\s-*$\\|[^ -]\\|$\\)") | 4824 | "\\s-*\\(--+\\s-*$\\|$\\)") |
| 4826 | (set (make-local-variable 'paragraph-separate) paragraph-start) | 4825 | (set (make-local-variable 'paragraph-separate) paragraph-start) |
| 4827 | (set (make-local-variable 'paragraph-ignore-fill-prefix) t) | 4826 | (set (make-local-variable 'paragraph-ignore-fill-prefix) t) |
| 4828 | (set (make-local-variable 'parse-sexp-ignore-comments) t) | 4827 | (set (make-local-variable 'parse-sexp-ignore-comments) t) |
| @@ -4860,9 +4859,7 @@ Key bindings: | |||
| 4860 | (set (make-local-variable 'font-lock-support-mode) 'lazy-lock-mode) | 4859 | (set (make-local-variable 'font-lock-support-mode) 'lazy-lock-mode) |
| 4861 | (set (make-local-variable 'lazy-lock-defer-contextually) nil) | 4860 | (set (make-local-variable 'lazy-lock-defer-contextually) nil) |
| 4862 | (set (make-local-variable 'lazy-lock-defer-on-the-fly) t) | 4861 | (set (make-local-variable 'lazy-lock-defer-on-the-fly) t) |
| 4863 | ; (set (make-local-variable 'lazy-lock-defer-time) 0.1) | ||
| 4864 | (set (make-local-variable 'lazy-lock-defer-on-scrolling) t)) | 4862 | (set (make-local-variable 'lazy-lock-defer-on-scrolling) t)) |
| 4865 | ; (turn-on-font-lock) | ||
| 4866 | 4863 | ||
| 4867 | ;; variables for source file compilation | 4864 | ;; variables for source file compilation |
| 4868 | (when vhdl-compile-use-local-error-regexp | 4865 | (when vhdl-compile-use-local-error-regexp |
| @@ -7566,7 +7563,6 @@ indentation is done before aligning." | |||
| 7566 | (setq end (point-marker)) | 7563 | (setq end (point-marker)) |
| 7567 | (goto-char begin) | 7564 | (goto-char begin) |
| 7568 | (setq bol (setq begin (progn (beginning-of-line) (point)))) | 7565 | (setq bol (setq begin (progn (beginning-of-line) (point)))) |
| 7569 | ; (untabify bol end) | ||
| 7570 | (when indent | 7566 | (when indent |
| 7571 | (indent-region bol end nil)))) | 7567 | (indent-region bol end nil)))) |
| 7572 | (let ((copy (copy-alist alignment-list))) | 7568 | (let ((copy (copy-alist alignment-list))) |
| @@ -7962,7 +7958,6 @@ end of line, do nothing in comments and strings." | |||
| 7962 | (and (looking-at "\\s-+") (re-search-forward "\\s-+" end t) | 7958 | (and (looking-at "\\s-+") (re-search-forward "\\s-+" end t) |
| 7963 | (progn (replace-match " " nil nil) t)) | 7959 | (progn (replace-match " " nil nil) t)) |
| 7964 | (and (looking-at "-") (re-search-forward "-" end t)) | 7960 | (and (looking-at "-") (re-search-forward "-" end t)) |
| 7965 | ; (re-search-forward "[^ \t-]+" end t)))) | ||
| 7966 | (re-search-forward "[^ \t\"-]+" end t)))) | 7961 | (re-search-forward "[^ \t\"-]+" end t)))) |
| 7967 | (unless no-message (message "Fixing up whitespace...done"))) | 7962 | (unless no-message (message "Fixing up whitespace...done"))) |
| 7968 | 7963 | ||
| @@ -8080,7 +8075,7 @@ Currently supported keywords: 'begin', 'if'." | |||
| 8080 | (while (re-search-forward "\\<\\(for\\|if\\)\\>" end t) | 8075 | (while (re-search-forward "\\<\\(for\\|if\\)\\>" end t) |
| 8081 | (goto-char (match-end 1)) | 8076 | (goto-char (match-end 1)) |
| 8082 | (setq point (point-marker)) | 8077 | (setq point (point-marker)) |
| 8083 | ;; exception: in literal or preceded by `end' or label | 8078 | ;; exception: in literal or preceded by `end', `wait' or label |
| 8084 | (when (and (not (save-excursion (goto-char (match-beginning 1)) | 8079 | (when (and (not (save-excursion (goto-char (match-beginning 1)) |
| 8085 | (vhdl-in-literal))) | 8080 | (vhdl-in-literal))) |
| 8086 | (save-excursion | 8081 | (save-excursion |
| @@ -8089,7 +8084,7 @@ Currently supported keywords: 'begin', 'if'." | |||
| 8089 | (and (re-search-forward "^\\s-*\\([^ \t\n].*\\)" | 8084 | (and (re-search-forward "^\\s-*\\([^ \t\n].*\\)" |
| 8090 | (match-beginning 1) t) | 8085 | (match-beginning 1) t) |
| 8091 | (not (string-match | 8086 | (not (string-match |
| 8092 | "\\(\\<end\\>\\|\\<wait\\>\\|\\w+\\s-*:\\)\\s-*$" | 8087 | "\\(\\<end\\>\\|\\<wait .*\\|\\w+\\s-*:\\)\\s-*$" |
| 8093 | (match-string 1))))))) | 8088 | (match-string 1))))))) |
| 8094 | (goto-char (match-beginning 1)) | 8089 | (goto-char (match-beginning 1)) |
| 8095 | (insert "\n") | 8090 | (insert "\n") |
| @@ -8138,10 +8133,12 @@ case fixing to a region. Calls functions `vhdl-indent-buffer', | |||
| 8138 | (when (nth 0 vhdl-beautify-options) (vhdl-fixup-whitespace-region beg end t)) | 8133 | (when (nth 0 vhdl-beautify-options) (vhdl-fixup-whitespace-region beg end t)) |
| 8139 | (when (nth 1 vhdl-beautify-options) (vhdl-fix-statement-region beg end)) | 8134 | (when (nth 1 vhdl-beautify-options) (vhdl-fix-statement-region beg end)) |
| 8140 | (when (nth 2 vhdl-beautify-options) (vhdl-indent-region beg end)) | 8135 | (when (nth 2 vhdl-beautify-options) (vhdl-indent-region beg end)) |
| 8141 | (let ((vhdl-align-groups t)) | 8136 | (when (nth 3 vhdl-beautify-options) |
| 8142 | (when (nth 3 vhdl-beautify-options) (vhdl-align-region beg end))) | 8137 | (let ((vhdl-align-groups t)) (vhdl-align-region beg end))) |
| 8143 | (when (nth 4 vhdl-beautify-options) (vhdl-fix-case-region beg end)) | 8138 | (when (nth 4 vhdl-beautify-options) (vhdl-fix-case-region beg end)) |
| 8144 | (when (nth 0 vhdl-beautify-options) (vhdl-remove-trailing-spaces-region beg end))) | 8139 | (when (nth 0 vhdl-beautify-options) |
| 8140 | (vhdl-remove-trailing-spaces-region beg end) | ||
| 8141 | (if vhdl-indent-tabs-mode (tabify beg end) (untabify beg end)))) | ||
| 8145 | 8142 | ||
| 8146 | (defun vhdl-beautify-buffer () | 8143 | (defun vhdl-beautify-buffer () |
| 8147 | "Beautify buffer by applying indentation, whitespace fixup, alignment, and | 8144 | "Beautify buffer by applying indentation, whitespace fixup, alignment, and |
| @@ -8447,11 +8444,11 @@ buffer." | |||
| 8447 | (setq beg (point)))))) | 8444 | (setq beg (point)))))) |
| 8448 | ;; search for signals declared in surrounding block declarative parts | 8445 | ;; search for signals declared in surrounding block declarative parts |
| 8449 | (save-excursion | 8446 | (save-excursion |
| 8450 | (while (and (progn (while (and (setq beg (re-search-backward "^\\s-*\\(\\w+\\s-*:\\s-*block\\|\\(end\\)\\s-+block\\)\\>" nil t)) | 8447 | (while (and (progn (while (and (setq beg (re-search-backward "^\\s-*\\(\\w+\\s-*:\\s-*\\(block\\|\\(for\\|if\\).*\\<generate\\>\\)\\|\\(end\\)\\s-+block\\)\\>" nil t)) |
| 8451 | (match-string 2)) | 8448 | (match-string 4)) |
| 8452 | (goto-char (match-end 2)) | 8449 | (goto-char (match-end 4)) |
| 8453 | (vhdl-backward-sexp) | 8450 | (vhdl-backward-sexp) |
| 8454 | (re-search-backward "^\\s-*\\w+\\s-*:\\s-*block\\>" nil t)) | 8451 | (re-search-backward "^\\s-*\\w+\\s-*:\\s-*\\(block\\|generate\\)\\>" nil t)) |
| 8455 | beg) | 8452 | beg) |
| 8456 | (setq end (re-search-forward "^\\s-*begin\\>" nil t))) | 8453 | (setq end (re-search-forward "^\\s-*begin\\>" nil t))) |
| 8457 | ;; scan for all declared signal names | 8454 | ;; scan for all declared signal names |
| @@ -8966,8 +8963,6 @@ since these are almost equivalent)." | |||
| 8966 | (interactive) | 8963 | (interactive) |
| 8967 | (when (vhdl-template-field "target signal") | 8964 | (when (vhdl-template-field "target signal") |
| 8968 | (insert " <= ") | 8965 | (insert " <= ") |
| 8969 | ; (if (not (equal (vhdl-template-field "[GUARDED] [TRANSPORT]") "")) | ||
| 8970 | ; (insert " ")) | ||
| 8971 | (let ((margin (current-column)) | 8966 | (let ((margin (current-column)) |
| 8972 | (start (point)) | 8967 | (start (point)) |
| 8973 | position) | 8968 | position) |
| @@ -9903,7 +9898,7 @@ otherwise." | |||
| 9903 | (defun vhdl-template-record (kind &optional name secondary) | 9898 | (defun vhdl-template-record (kind &optional name secondary) |
| 9904 | "Insert a record type declaration." | 9899 | "Insert a record type declaration." |
| 9905 | (interactive) | 9900 | (interactive) |
| 9906 | (let ((margin (current-column)) | 9901 | (let ((margin (current-indentation)) |
| 9907 | (start (point)) | 9902 | (start (point)) |
| 9908 | (first t)) | 9903 | (first t)) |
| 9909 | (vhdl-insert-keyword "RECORD\n") | 9904 | (vhdl-insert-keyword "RECORD\n") |
| @@ -9965,7 +9960,6 @@ otherwise." | |||
| 9965 | (insert "\n") | 9960 | (insert "\n") |
| 9966 | (indent-to (+ margin vhdl-basic-offset)) | 9961 | (indent-to (+ margin vhdl-basic-offset)) |
| 9967 | (vhdl-template-field "target signal" " <= ") | 9962 | (vhdl-template-field "target signal" " <= ") |
| 9968 | ; (vhdl-template-field "[GUARDED] [TRANSPORT]") | ||
| 9969 | (insert "\n") | 9963 | (insert "\n") |
| 9970 | (indent-to (+ margin vhdl-basic-offset)) | 9964 | (indent-to (+ margin vhdl-basic-offset)) |
| 9971 | (vhdl-template-field "waveform") | 9965 | (vhdl-template-field "waveform") |
| @@ -10635,14 +10629,7 @@ If starting after end-comment-column, start a new line." | |||
| 10635 | (if (not (or (and string (progn (insert string) t)) | 10629 | (if (not (or (and string (progn (insert string) t)) |
| 10636 | (vhdl-template-field "[comment]" nil t))) | 10630 | (vhdl-template-field "[comment]" nil t))) |
| 10637 | (delete-region position (point)) | 10631 | (delete-region position (point)) |
| 10638 | (while (= (preceding-char) ?\ ) (delete-char -1)) | 10632 | (while (= (preceding-char) ?\ ) (delete-char -1)))))) |
| 10639 | ;; (when (> (current-column) end-comment-column) | ||
| 10640 | ;; (setq position (point-marker)) | ||
| 10641 | ;; (re-search-backward "-- ") | ||
| 10642 | ;; (insert "\n") | ||
| 10643 | ;; (indent-to comment-column) | ||
| 10644 | ;; (goto-char position)) | ||
| 10645 | )))) | ||
| 10646 | 10633 | ||
| 10647 | (defun vhdl-comment-block () | 10634 | (defun vhdl-comment-block () |
| 10648 | "Insert comment for code block." | 10635 | "Insert comment for code block." |
| @@ -10882,8 +10869,6 @@ Point is left between them." | |||
| 10882 | (defun vhdl-template-generate-body (margin label) | 10869 | (defun vhdl-template-generate-body (margin label) |
| 10883 | "Insert body for generate template." | 10870 | "Insert body for generate template." |
| 10884 | (vhdl-insert-keyword " GENERATE") | 10871 | (vhdl-insert-keyword " GENERATE") |
| 10885 | ; (if (not (vhdl-standard-p '87)) | ||
| 10886 | ; (vhdl-template-begin-end "GENERATE" label margin) | ||
| 10887 | (insert "\n\n") | 10872 | (insert "\n\n") |
| 10888 | (indent-to margin) | 10873 | (indent-to margin) |
| 10889 | (vhdl-insert-keyword "END GENERATE ") | 10874 | (vhdl-insert-keyword "END GENERATE ") |
| @@ -11670,7 +11655,6 @@ reflected in a subsequent paste operation." | |||
| 11670 | comment group-comment)))) | 11655 | comment group-comment)))) |
| 11671 | ;; parse group comment and spacing | 11656 | ;; parse group comment and spacing |
| 11672 | (setq group-comment (vhdl-parse-group-comment)))) | 11657 | (setq group-comment (vhdl-parse-group-comment)))) |
| 11673 | ; (vhdl-parse-string "end\\>") | ||
| 11674 | ;; parse context clause | 11658 | ;; parse context clause |
| 11675 | (setq context-clause (vhdl-scan-context-clause)) | 11659 | (setq context-clause (vhdl-scan-context-clause)) |
| 11676 | ; ;; add surrounding package to context clause | 11660 | ; ;; add surrounding package to context clause |
| @@ -12622,7 +12606,6 @@ reflected in a subsequent paste operation." | |||
| 12622 | (while (and he-expand-list | 12606 | (while (and he-expand-list |
| 12623 | (or (not (stringp (car he-expand-list))) | 12607 | (or (not (stringp (car he-expand-list))) |
| 12624 | (he-string-member (car he-expand-list) he-tried-table t))) | 12608 | (he-string-member (car he-expand-list) he-tried-table t))) |
| 12625 | ; (equal (car he-expand-list) he-search-string))) | ||
| 12626 | (unless (stringp (car he-expand-list)) | 12609 | (unless (stringp (car he-expand-list)) |
| 12627 | (setq vhdl-expand-upper-case (car he-expand-list))) | 12610 | (setq vhdl-expand-upper-case (car he-expand-list))) |
| 12628 | (setq he-expand-list (cdr he-expand-list))) | 12611 | (setq he-expand-list (cdr he-expand-list))) |
| @@ -12652,15 +12635,17 @@ expressions (e.g. for index ranges of types and signals)." | |||
| 12652 | (defalias 'he-list-beg 'vhdl-he-list-beg)) | 12635 | (defalias 'he-list-beg 'vhdl-he-list-beg)) |
| 12653 | 12636 | ||
| 12654 | ;; function for expanding abbrevs and dabbrevs | 12637 | ;; function for expanding abbrevs and dabbrevs |
| 12655 | (defalias 'vhdl-expand-abbrev (make-hippie-expand-function | 12638 | (defun vhdl-expand-abbrev (arg)) |
| 12656 | '(try-expand-dabbrev | 12639 | (fset 'vhdl-expand-abbrev (make-hippie-expand-function |
| 12657 | try-expand-dabbrev-all-buffers | 12640 | '(try-expand-dabbrev |
| 12658 | vhdl-try-expand-abbrev))) | 12641 | try-expand-dabbrev-all-buffers |
| 12642 | vhdl-try-expand-abbrev))) | ||
| 12659 | 12643 | ||
| 12660 | ;; function for expanding parenthesis | 12644 | ;; function for expanding parenthesis |
| 12661 | (defalias 'vhdl-expand-paren (make-hippie-expand-function | 12645 | (defun vhdl-expand-paren (arg)) |
| 12662 | '(try-expand-list | 12646 | (fset 'vhdl-expand-paren (make-hippie-expand-function |
| 12663 | try-expand-list-all-buffers))) | 12647 | '(try-expand-list |
| 12648 | try-expand-list-all-buffers))) | ||
| 12664 | 12649 | ||
| 12665 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 12650 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 12666 | ;; Line handling functions | 12651 | ;; Line handling functions |
| @@ -13275,7 +13260,6 @@ This does highlighting of keywords and standard identifiers.") | |||
| 13275 | (skip-syntax-backward " ") | 13260 | (skip-syntax-backward " ") |
| 13276 | (skip-syntax-backward "w_") | 13261 | (skip-syntax-backward "w_") |
| 13277 | (skip-syntax-backward " "))) | 13262 | (skip-syntax-backward " "))) |
| 13278 | ; (skip-chars-backward "^-(\n\";") | ||
| 13279 | (goto-char (match-end 1)) (1 font-lock-variable-name-face))) | 13263 | (goto-char (match-end 1)) (1 font-lock-variable-name-face))) |
| 13280 | 13264 | ||
| 13281 | ;; highlight formal parameters in component instantiations and subprogram | 13265 | ;; highlight formal parameters in component instantiations and subprogram |
| @@ -13676,8 +13660,6 @@ hierarchy otherwise.") | |||
| 13676 | non-final) | 13660 | non-final) |
| 13677 | "Scan contents of VHDL files in directory or file pattern NAME." | 13661 | "Scan contents of VHDL files in directory or file pattern NAME." |
| 13678 | (string-match "\\(.*[/\\]\\)\\(.*\\)" name) | 13662 | (string-match "\\(.*[/\\]\\)\\(.*\\)" name) |
| 13679 | ; (unless (file-directory-p (match-string 1 name)) | ||
| 13680 | ; (message "No such directory: \"%s\"" (match-string 1 name))) | ||
| 13681 | (let* ((dir-name (match-string 1 name)) | 13663 | (let* ((dir-name (match-string 1 name)) |
| 13682 | (file-pattern (match-string 2 name)) | 13664 | (file-pattern (match-string 2 name)) |
| 13683 | (is-directory (= 0 (length file-pattern))) | 13665 | (is-directory (= 0 (length file-pattern))) |
| @@ -13907,7 +13889,10 @@ hierarchy otherwise.") | |||
| 13907 | "\\(\\(for\\|if\\)\\>[^;:]+\\<generate\\>\\|block\\>\\)\\)\\|" | 13889 | "\\(\\(for\\|if\\)\\>[^;:]+\\<generate\\>\\|block\\>\\)\\)\\|" |
| 13908 | "\\(^[ \t]*end[ \t\n\r\f]+\\(generate\\|block\\)\\>\\)") end-of-unit t) | 13890 | "\\(^[ \t]*end[ \t\n\r\f]+\\(generate\\|block\\)\\>\\)") end-of-unit t) |
| 13909 | (or (not limit-hier-inst-no) | 13891 | (or (not limit-hier-inst-no) |
| 13910 | (<= (setq inst-no (1+ inst-no)) | 13892 | (<= (if (or (match-string 14) |
| 13893 | (match-string 16)) | ||
| 13894 | inst-no | ||
| 13895 | (setq inst-no (1+ inst-no))) | ||
| 13911 | limit-hier-inst-no))) | 13896 | limit-hier-inst-no))) |
| 13912 | (cond | 13897 | (cond |
| 13913 | ;; block/generate beginning found | 13898 | ;; block/generate beginning found |
| @@ -14276,9 +14261,6 @@ entity ENT-KEY." | |||
| 14276 | (setq level (1+ level))) | 14261 | (setq level (1+ level))) |
| 14277 | (when (member ent-key ent-hier) | 14262 | (when (member ent-key ent-hier) |
| 14278 | (error "ERROR: Instantiation loop detected, component instantiates itself: \"%s\"" ent-key)) | 14263 | (error "ERROR: Instantiation loop detected, component instantiates itself: \"%s\"" ent-key)) |
| 14279 | ;; check configured architecture (already checked during scanning) | ||
| 14280 | ; (unless (or (null conf-inst-alist) (assoc arch-key (nth 3 ent-entry))) | ||
| 14281 | ; (vhdl-warning-when-idle "Configuration for non-existing architecture used: \"%s\"" conf-key)) | ||
| 14282 | ;; process all instances | 14264 | ;; process all instances |
| 14283 | (while inst-alist | 14265 | (while inst-alist |
| 14284 | (setq inst-entry (car inst-alist) | 14266 | (setq inst-entry (car inst-alist) |
| @@ -14528,7 +14510,6 @@ if required." | |||
| 14528 | (defun vhdl-speedbar-initialize () | 14510 | (defun vhdl-speedbar-initialize () |
| 14529 | "Initialize speedbar." | 14511 | "Initialize speedbar." |
| 14530 | ;; general settings | 14512 | ;; general settings |
| 14531 | ; (set (make-local-variable 'speedbar-tag-hierarchy-method) nil) | ||
| 14532 | ;; VHDL file extensions (extracted from `auto-mode-alist') | 14513 | ;; VHDL file extensions (extracted from `auto-mode-alist') |
| 14533 | (let ((mode-alist auto-mode-alist)) | 14514 | (let ((mode-alist auto-mode-alist)) |
| 14534 | (while mode-alist | 14515 | (while mode-alist |
| @@ -14626,11 +14607,7 @@ if required." | |||
| 14626 | (append | 14607 | (append |
| 14627 | '(("vhdl directory" vhdl-speedbar-update-current-unit) | 14608 | '(("vhdl directory" vhdl-speedbar-update-current-unit) |
| 14628 | ("vhdl project" vhdl-speedbar-update-current-project | 14609 | ("vhdl project" vhdl-speedbar-update-current-project |
| 14629 | vhdl-speedbar-update-current-unit) | 14610 | vhdl-speedbar-update-current-unit)) |
| 14630 | ; ("files" (lambda () (setq speedbar-ignored-path-regexp | ||
| 14631 | ; (speedbar-extension-list-to-regex | ||
| 14632 | ; speedbar-ignored-path-expressions)))) | ||
| 14633 | ) | ||
| 14634 | speedbar-stealthy-function-list)) | 14611 | speedbar-stealthy-function-list)) |
| 14635 | (when (eq vhdl-speedbar-display-mode 'directory) | 14612 | (when (eq vhdl-speedbar-display-mode 'directory) |
| 14636 | (setq speedbar-initial-expansion-list-name "vhdl directory")) | 14613 | (setq speedbar-initial-expansion-list-name "vhdl directory")) |
| @@ -14724,10 +14701,7 @@ if required." | |||
| 14724 | (concat "^\\([0-9]+:\\s-*<\\)[+]>\\s-+" (caar project-alist) "$") nil t) | 14701 | (concat "^\\([0-9]+:\\s-*<\\)[+]>\\s-+" (caar project-alist) "$") nil t) |
| 14725 | (goto-char (match-end 1)) | 14702 | (goto-char (match-end 1)) |
| 14726 | (speedbar-do-function-pointer))) | 14703 | (speedbar-do-function-pointer))) |
| 14727 | (setq project-alist (cdr project-alist)))) | 14704 | (setq project-alist (cdr project-alist))))) |
| 14728 | ; (vhdl-speedbar-update-current-project) | ||
| 14729 | ; (vhdl-speedbar-update-current-unit nil t) | ||
| 14730 | ) | ||
| 14731 | 14705 | ||
| 14732 | (defun vhdl-speedbar-insert-project-hierarchy (project indent &optional rescan) | 14706 | (defun vhdl-speedbar-insert-project-hierarchy (project indent &optional rescan) |
| 14733 | "Insert hierarchy of PROJECT. Rescan directories if RESCAN is non-nil, | 14707 | "Insert hierarchy of PROJECT. Rescan directories if RESCAN is non-nil, |
| @@ -15747,7 +15721,8 @@ is already shown in a buffer." | |||
| 15747 | (let ((buffer (get-file-buffer (car token)))) | 15721 | (let ((buffer (get-file-buffer (car token)))) |
| 15748 | (speedbar-find-file-in-frame (car token)) | 15722 | (speedbar-find-file-in-frame (car token)) |
| 15749 | (when (or vhdl-speedbar-jump-to-unit buffer) | 15723 | (when (or vhdl-speedbar-jump-to-unit buffer) |
| 15750 | (vhdl-goto-line (cdr token)) | 15724 | (goto-char (point-min)) |
| 15725 | (forward-line (1- (cdr token))) | ||
| 15751 | (recenter)) | 15726 | (recenter)) |
| 15752 | (vhdl-speedbar-update-current-unit t t) | 15727 | (vhdl-speedbar-update-current-unit t t) |
| 15753 | (speedbar-set-timer dframe-update-speed) | 15728 | (speedbar-set-timer dframe-update-speed) |
| @@ -15765,7 +15740,8 @@ is already shown in a buffer." | |||
| 15765 | (let ((token (get-text-property | 15740 | (let ((token (get-text-property |
| 15766 | (match-beginning 3) 'speedbar-token))) | 15741 | (match-beginning 3) 'speedbar-token))) |
| 15767 | (vhdl-visit-file (car token) t | 15742 | (vhdl-visit-file (car token) t |
| 15768 | (progn (vhdl-goto-line (cdr token)) | 15743 | (progn (goto-char (point-min)) |
| 15744 | (forward-line (1- (cdr token))) | ||
| 15769 | (end-of-line) | 15745 | (end-of-line) |
| 15770 | (if is-entity | 15746 | (if is-entity |
| 15771 | (vhdl-port-copy) | 15747 | (vhdl-port-copy) |
| @@ -15946,15 +15922,14 @@ expansion function)." | |||
| 15946 | 15922 | ||
| 15947 | ;; add speedbar | 15923 | ;; add speedbar |
| 15948 | (when (fboundp 'speedbar) | 15924 | (when (fboundp 'speedbar) |
| 15949 | (condition-case () | 15925 | (let ((current-frame (selected-frame))) |
| 15950 | (when (and vhdl-speedbar-auto-open | 15926 | (condition-case () |
| 15951 | (not (and (boundp 'speedbar-frame) | 15927 | (when (and vhdl-speedbar-auto-open |
| 15952 | (frame-live-p speedbar-frame)))) | 15928 | (not (and (boundp 'speedbar-frame) |
| 15953 | (speedbar-frame-mode 1) | 15929 | (frame-live-p speedbar-frame)))) |
| 15954 | (if (fboundp 'speedbar-select-attached-frame) | 15930 | (speedbar-frame-mode 1)) |
| 15955 | (speedbar-select-attached-frame) | 15931 | (error (vhdl-warning-when-idle "ERROR: An error occurred while opening speedbar"))) |
| 15956 | (select-frame speedbar-attached-frame))) | 15932 | (select-frame current-frame))) |
| 15957 | (error (vhdl-warning-when-idle "ERROR: An error occurred while opening speedbar")))) | ||
| 15958 | 15933 | ||
| 15959 | ;; initialize speedbar | 15934 | ;; initialize speedbar |
| 15960 | (if (not (boundp 'speedbar-frame)) | 15935 | (if (not (boundp 'speedbar-frame)) |
| @@ -16519,7 +16494,8 @@ current project/directory." | |||
| 16519 | ;; insert component declarations | 16494 | ;; insert component declarations |
| 16520 | (while ent-alist | 16495 | (while ent-alist |
| 16521 | (vhdl-visit-file (nth 2 (car ent-alist)) nil | 16496 | (vhdl-visit-file (nth 2 (car ent-alist)) nil |
| 16522 | (progn (vhdl-goto-line (nth 3 (car ent-alist))) | 16497 | (progn (goto-char (point-min)) |
| 16498 | (forward-line (1- (nth 3 (car ent-alist)))) | ||
| 16523 | (end-of-line) | 16499 | (end-of-line) |
| 16524 | (vhdl-port-copy))) | 16500 | (vhdl-port-copy))) |
| 16525 | (goto-char component-pos) | 16501 | (goto-char component-pos) |
| @@ -17000,12 +16976,16 @@ specified by a target." | |||
| 17000 | (ent-alist (aget vhdl-entity-alist (or project directory) t)) | 16976 | (ent-alist (aget vhdl-entity-alist (or project directory) t)) |
| 17001 | (conf-alist (aget vhdl-config-alist (or project directory) t)) | 16977 | (conf-alist (aget vhdl-config-alist (or project directory) t)) |
| 17002 | (pack-alist (aget vhdl-package-alist (or project directory) t)) | 16978 | (pack-alist (aget vhdl-package-alist (or project directory) t)) |
| 17003 | (regexp-list (nth 12 (aget vhdl-compiler-alist vhdl-compiler))) | 16979 | (regexp-list (or (nth 12 (aget vhdl-compiler-alist vhdl-compiler)) |
| 17004 | (ent-regexp (cons "\\(.*\\)" (nth 0 regexp-list))) | 16980 | '("\\1.vhd" "\\2_\\1.vhd" "\\1.vhd" |
| 17005 | (arch-regexp (cons "\\(.*\\) \\(.*\\)" (nth 1 regexp-list))) | 16981 | "\\1.vhd" "\\1_body.vhd" identity))) |
| 17006 | (conf-regexp (cons "\\(.*\\)" (nth 2 regexp-list))) | 16982 | (mapping-exist |
| 17007 | (pack-regexp (cons "\\(.*\\)" (nth 3 regexp-list))) | 16983 | (if (nth 12 (aget vhdl-compiler-alist vhdl-compiler)) t nil)) |
| 17008 | (pack-body-regexp (cons "\\(.*\\)" (nth 4 regexp-list))) | 16984 | (ent-regexp (cons "\\(.*\\) \\(.*\\) \\(.*\\)" (nth 0 regexp-list))) |
| 16985 | (arch-regexp (cons "\\(.*\\) \\(.*\\) \\(.*\\)" (nth 1 regexp-list))) | ||
| 16986 | (conf-regexp (cons "\\(.*\\) \\(.*\\) \\(.*\\)" (nth 2 regexp-list))) | ||
| 16987 | (pack-regexp (cons "\\(.*\\) \\(.*\\) \\(.*\\)" (nth 3 regexp-list))) | ||
| 16988 | (pack-body-regexp (cons "\\(.*\\) \\(.*\\) \\(.*\\)" (nth 4 regexp-list))) | ||
| 17009 | (adjust-case (nth 5 regexp-list)) | 16989 | (adjust-case (nth 5 regexp-list)) |
| 17010 | (work-library (downcase (vhdl-work-library))) | 16990 | (work-library (downcase (vhdl-work-library))) |
| 17011 | (compile-directory (expand-file-name (vhdl-compile-directory) | 16991 | (compile-directory (expand-file-name (vhdl-compile-directory) |
| @@ -17022,9 +17002,10 @@ specified by a target." | |||
| 17022 | ;; check prerequisites | 17002 | ;; check prerequisites |
| 17023 | (unless (file-exists-p compile-directory) | 17003 | (unless (file-exists-p compile-directory) |
| 17024 | (make-directory compile-directory t)) | 17004 | (make-directory compile-directory t)) |
| 17025 | (unless regexp-list | 17005 | (unless mapping-exist |
| 17026 | (error "Please contact the VHDL Mode maintainer for support of \"%s\"" | 17006 | (vhdl-warning |
| 17027 | vhdl-compiler)) | 17007 | (format "No unit-to-file name mapping found for compiler \"%s\".\n Directory of dummy files is created instead (to be used as dependencies).\n Please contact the VHDL Mode maintainer for full support of \"%s\"" |
| 17008 | vhdl-compiler vhdl-compiler) t)) | ||
| 17028 | (message "Generating makefile \"%s\"..." makefile-name) | 17009 | (message "Generating makefile \"%s\"..." makefile-name) |
| 17029 | ;; rules for all entities | 17010 | ;; rules for all entities |
| 17030 | (setq tmp-list ent-alist) | 17011 | (setq tmp-list ent-alist) |
| @@ -17044,7 +17025,9 @@ specified by a target." | |||
| 17044 | second-list nil | 17025 | second-list nil |
| 17045 | subcomp-list nil) | 17026 | subcomp-list nil) |
| 17046 | (setq tmp-key (vhdl-replace-string | 17027 | (setq tmp-key (vhdl-replace-string |
| 17047 | ent-regexp (funcall adjust-case ent-key))) | 17028 | ent-regexp |
| 17029 | (funcall adjust-case | ||
| 17030 | (concat ent-key " " work-library)))) | ||
| 17048 | (push (cons ent-key tmp-key) unit-list) | 17031 | (push (cons ent-key tmp-key) unit-list) |
| 17049 | ;; rule target for this entity | 17032 | ;; rule target for this entity |
| 17050 | (push ent-key target-list) | 17033 | (push ent-key target-list) |
| @@ -17070,7 +17053,9 @@ specified by a target." | |||
| 17070 | depend-list (nth 1 rule)) | 17053 | depend-list (nth 1 rule)) |
| 17071 | (setq tmp-key (vhdl-replace-string | 17054 | (setq tmp-key (vhdl-replace-string |
| 17072 | arch-regexp | 17055 | arch-regexp |
| 17073 | (funcall adjust-case (concat arch-key " " ent-key)))) | 17056 | (funcall adjust-case |
| 17057 | (concat arch-key " " ent-key " " | ||
| 17058 | work-library)))) | ||
| 17074 | (setq unit-list | 17059 | (setq unit-list |
| 17075 | (cons (cons ent-arch-key tmp-key) unit-list)) | 17060 | (cons (cons ent-arch-key tmp-key) unit-list)) |
| 17076 | (push ent-arch-key second-list) | 17061 | (push ent-arch-key second-list) |
| @@ -17117,7 +17102,9 @@ specified by a target." | |||
| 17117 | depend-list (nth 1 rule) | 17102 | depend-list (nth 1 rule) |
| 17118 | subcomp-list (list ent-key)) | 17103 | subcomp-list (list ent-key)) |
| 17119 | (setq tmp-key (vhdl-replace-string | 17104 | (setq tmp-key (vhdl-replace-string |
| 17120 | conf-regexp (funcall adjust-case conf-key))) | 17105 | conf-regexp |
| 17106 | (funcall adjust-case | ||
| 17107 | (concat conf-key " " work-library)))) | ||
| 17121 | (push (cons conf-key tmp-key) unit-list) | 17108 | (push (cons conf-key tmp-key) unit-list) |
| 17122 | ;; rule target for this configuration | 17109 | ;; rule target for this configuration |
| 17123 | (push conf-key target-list) | 17110 | (push conf-key target-list) |
| @@ -17131,14 +17118,11 @@ specified by a target." | |||
| 17131 | (while inst-alist | 17118 | (while inst-alist |
| 17132 | (setq inst-entry (car inst-alist)) | 17119 | (setq inst-entry (car inst-alist)) |
| 17133 | (setq inst-ent-key (nth 2 inst-entry) | 17120 | (setq inst-ent-key (nth 2 inst-entry) |
| 17134 | ; comp-arch-key (nth 2 inst-entry)) | ||
| 17135 | inst-conf-key (nth 4 inst-entry)) | 17121 | inst-conf-key (nth 4 inst-entry)) |
| 17136 | (when (equal (downcase (nth 5 inst-entry)) work-library) | 17122 | (when (equal (downcase (nth 5 inst-entry)) work-library) |
| 17137 | (when inst-ent-key | 17123 | (when inst-ent-key |
| 17138 | (setq depend-list (cons inst-ent-key depend-list) | 17124 | (setq depend-list (cons inst-ent-key depend-list) |
| 17139 | subcomp-list (cons inst-ent-key subcomp-list))) | 17125 | subcomp-list (cons inst-ent-key subcomp-list))) |
| 17140 | ; (when comp-arch-key | ||
| 17141 | ; (push (concat comp-ent-key "-" comp-arch-key) depend-list)) | ||
| 17142 | (when inst-conf-key | 17126 | (when inst-conf-key |
| 17143 | (setq depend-list (cons inst-conf-key depend-list) | 17127 | (setq depend-list (cons inst-conf-key depend-list) |
| 17144 | subcomp-list (cons inst-conf-key subcomp-list)))) | 17128 | subcomp-list (cons inst-conf-key subcomp-list)))) |
| @@ -17163,7 +17147,9 @@ specified by a target." | |||
| 17163 | rule (aget rule-alist pack-file-name) | 17147 | rule (aget rule-alist pack-file-name) |
| 17164 | target-list (nth 0 rule) depend-list (nth 1 rule)) | 17148 | target-list (nth 0 rule) depend-list (nth 1 rule)) |
| 17165 | (setq tmp-key (vhdl-replace-string | 17149 | (setq tmp-key (vhdl-replace-string |
| 17166 | pack-regexp (funcall adjust-case pack-key))) | 17150 | pack-regexp |
| 17151 | (funcall adjust-case | ||
| 17152 | (concat pack-key " " work-library)))) | ||
| 17167 | (push (cons pack-key tmp-key) unit-list) | 17153 | (push (cons pack-key tmp-key) unit-list) |
| 17168 | ;; rule target for this package | 17154 | ;; rule target for this package |
| 17169 | (push pack-key target-list) | 17155 | (push pack-key target-list) |
| @@ -17184,7 +17170,9 @@ specified by a target." | |||
| 17184 | target-list (nth 0 rule) | 17170 | target-list (nth 0 rule) |
| 17185 | depend-list (nth 1 rule)) | 17171 | depend-list (nth 1 rule)) |
| 17186 | (setq tmp-key (vhdl-replace-string | 17172 | (setq tmp-key (vhdl-replace-string |
| 17187 | pack-body-regexp (funcall adjust-case pack-key))) | 17173 | pack-body-regexp |
| 17174 | (funcall adjust-case | ||
| 17175 | (concat pack-key " " work-library)))) | ||
| 17188 | (setq unit-list | 17176 | (setq unit-list |
| 17189 | (cons (cons pack-body-key tmp-key) unit-list)) | 17177 | (cons (cons pack-body-key tmp-key) unit-list)) |
| 17190 | ;; rule target for this package's body | 17178 | ;; rule target for this package's body |
| @@ -17259,12 +17247,16 @@ specified by a target." | |||
| 17259 | compile-directory)))) | 17247 | compile-directory)))) |
| 17260 | (insert "\n\n# Define library paths\n" | 17248 | (insert "\n\n# Define library paths\n" |
| 17261 | "\nLIBRARY-" work-library " = " library-directory "\n") | 17249 | "\nLIBRARY-" work-library " = " library-directory "\n") |
| 17250 | (unless mapping-exist | ||
| 17251 | (insert "LIBRARY-" work-library "-make = " "$(LIBRARY-" work-library | ||
| 17252 | ")/make" "\n")) | ||
| 17262 | ;; insert variable definitions for all library unit files | 17253 | ;; insert variable definitions for all library unit files |
| 17263 | (insert "\n\n# Define library unit files\n") | 17254 | (insert "\n\n# Define library unit files\n") |
| 17264 | (setq tmp-list unit-list) | 17255 | (setq tmp-list unit-list) |
| 17265 | (while unit-list | 17256 | (while unit-list |
| 17266 | (insert "\nUNIT-" work-library "-" (caar unit-list) | 17257 | (insert "\nUNIT-" work-library "-" (caar unit-list) |
| 17267 | " = \\\n\t$(LIBRARY-" work-library ")/" (cdar unit-list)) | 17258 | " = \\\n\t$(LIBRARY-" work-library |
| 17259 | (if mapping-exist "" "-make") ")/" (cdar unit-list)) | ||
| 17268 | (setq unit-list (cdr unit-list))) | 17260 | (setq unit-list (cdr unit-list))) |
| 17269 | ;; insert variable definition for list of all library unit files | 17261 | ;; insert variable definition for list of all library unit files |
| 17270 | (insert "\n\n\n# Define list of all library unit files\n" | 17262 | (insert "\n\n\n# Define list of all library unit files\n" |
| @@ -17287,13 +17279,20 @@ specified by a target." | |||
| 17287 | ;; insert `make library' rule | 17279 | ;; insert `make library' rule |
| 17288 | (insert "\n\n# Rule for creating library directory\n" | 17280 | (insert "\n\n# Rule for creating library directory\n" |
| 17289 | "\n" (nth 2 vhdl-makefile-default-targets) " :" | 17281 | "\n" (nth 2 vhdl-makefile-default-targets) " :" |
| 17290 | " \\\n\t\t$(LIBRARY-" work-library ")\n" | 17282 | " \\\n\t\t$(LIBRARY-" work-library ")" |
| 17283 | (if mapping-exist "" | ||
| 17284 | (concat " \\\n\t\t$(LIBRARY-" work-library "-make)\n")) | ||
| 17285 | "\n" | ||
| 17291 | "\n$(LIBRARY-" work-library ") :" | 17286 | "\n$(LIBRARY-" work-library ") :" |
| 17292 | "\n\t" | 17287 | "\n\t" |
| 17293 | (vhdl-replace-string | 17288 | (vhdl-replace-string |
| 17294 | (cons "\\(.*\\)\n\\(.*\\)" (nth 5 compiler)) | 17289 | (cons "\\(.*\\)\n\\(.*\\)" (nth 5 compiler)) |
| 17295 | (concat "$(LIBRARY-" work-library ")\n" (vhdl-work-library))) | 17290 | (concat "$(LIBRARY-" work-library ")\n" (vhdl-work-library))) |
| 17296 | "\n") | 17291 | "\n") |
| 17292 | (unless mapping-exist | ||
| 17293 | (insert "\n$(LIBRARY-" work-library "-make) :" | ||
| 17294 | "\n\t" | ||
| 17295 | "mkdir -p $(LIBRARY-" work-library "-make)\n")) | ||
| 17297 | ;; insert '.PHONY' declaration | 17296 | ;; insert '.PHONY' declaration |
| 17298 | (insert "\n\n.PHONY : " | 17297 | (insert "\n\n.PHONY : " |
| 17299 | (nth 0 vhdl-makefile-default-targets) " " | 17298 | (nth 0 vhdl-makefile-default-targets) " " |
| @@ -17358,13 +17357,15 @@ specified by a target." | |||
| 17358 | (nth 0 rule) | 17357 | (nth 0 rule) |
| 17359 | (if (equal vhdl-compile-post-command "") "" | 17358 | (if (equal vhdl-compile-post-command "") "" |
| 17360 | " $(POST-COMPILE)") "\n") | 17359 | " $(POST-COMPILE)") "\n") |
| 17360 | (insert "\n")) | ||
| 17361 | (unless (and options mapping-exist) | ||
| 17361 | (setq tmp-list target-list) | 17362 | (setq tmp-list target-list) |
| 17362 | (while target-list | 17363 | (while target-list |
| 17363 | (insert "\n\t@touch $(UNIT-" work-library "-" (car target-list) ")" | 17364 | (insert "\t@touch $(UNIT-" work-library "-" (car target-list) ")\n") |
| 17364 | (if (cdr target-list) " \\" "\n")) | ||
| 17365 | (setq target-list (cdr target-list))) | 17365 | (setq target-list (cdr target-list))) |
| 17366 | (setq target-list tmp-list)) | 17366 | (setq target-list tmp-list)) |
| 17367 | (setq rule-alist (cdr rule-alist))) | 17367 | (setq rule-alist (cdr rule-alist))) |
| 17368 | |||
| 17368 | (insert "\n\n### " makefile-name " ends here\n") | 17369 | (insert "\n\n### " makefile-name " ends here\n") |
| 17369 | ;; run Makefile generation hook | 17370 | ;; run Makefile generation hook |
| 17370 | (run-hooks 'vhdl-makefile-generation-hook) | 17371 | (run-hooks 'vhdl-makefile-generation-hook) |
| @@ -17374,7 +17375,8 @@ specified by a target." | |||
| 17374 | (progn (save-buffer) | 17375 | (progn (save-buffer) |
| 17375 | (kill-buffer (current-buffer)) | 17376 | (kill-buffer (current-buffer)) |
| 17376 | (set-buffer orig-buffer) | 17377 | (set-buffer orig-buffer) |
| 17377 | (add-to-history 'file-name-history makefile-path-name)) | 17378 | (when (fboundp 'add-to-history) |
| 17379 | (add-to-history 'file-name-history makefile-path-name))) | ||
| 17378 | (vhdl-warning-when-idle | 17380 | (vhdl-warning-when-idle |
| 17379 | (format "File not writable: \"%s\"" | 17381 | (format "File not writable: \"%s\"" |
| 17380 | (abbreviate-file-name makefile-path-name))) | 17382 | (abbreviate-file-name makefile-path-name))) |