Skip to content

Commit

Permalink
Specify Model API files when compiling
Browse files Browse the repository at this point in the history
  • Loading branch information
rudi committed Jul 23, 2024
1 parent 33f5151 commit c3ba646
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- It is now possible to “fold” (collapse) code. This is implemented via the built-in Emacs `outline-minor-mode`.

- The variables `abs-modelapi-index-file` and `abs-modelapi-static-dir` can be set as file- or directory-local variables, and will pass the corresponding options to the compiler.

### Fixed

### Changed
Expand Down
13 changes: 13 additions & 0 deletions abs-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,15 @@ buffer:
(put 'abs-input-files 'safe-local-variable
(lambda (list) (cl-every #'stringp list)))

(defvar abs-modelapi-index-file nil
"The Model API index file to compile into this model, if any.")
(put 'abs-modelapi-index-file 'safe-local-variable #'stringp)

(defvar abs-modelapi-static-dir nil
"The Model API static directory containing to compile into this model, if any.")
(put 'abs-modelapi-static-dir 'safe-local-variable #'stringp)


(defvar abs-compile-command nil
"The compile command called by \\[abs-next-action].
The default behavior is to call \"make\" if a Makefile is in the
Expand Down Expand Up @@ -588,6 +597,10 @@ Expects `abs-backend' to be bound to the desired backend."
;; FIXME: make it work with filenames with spaces
(mapconcat (lambda (s) (concat "\"" s "\""))
(abs--input-files) " ")
(when abs-modelapi-index-file
(concat " --modelapi-index-file \"" abs-modelapi-index-file "\""))
(when abs-modelapi-static-dir
(concat " --modelapi-static-dir \"" abs-modelapi-static-dir "\""))
(when (eql abs-backend 'maude)
(concat " -o \"" (abs--maude-filename) "\""))
(when (and abs-java-output-jar-file (eql abs-backend 'java))
Expand Down

0 comments on commit c3ba646

Please sign in to comment.