[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/native-comp 8d37220 1/3: * Introduce `comp-output-directory'
From: |
Andrea Corallo |
Subject: |
feature/native-comp 8d37220 1/3: * Introduce `comp-output-directory' |
Date: |
Mon, 4 May 2020 14:01:01 -0400 (EDT) |
branch: feature/native-comp
commit 8d372201904bcb5fe6cb14aa5c45f33e6e1cd815
Author: Andrea Corallo <address@hidden>
Commit: Andrea Corallo <address@hidden>
* Introduce `comp-output-directory'
* lisp/emacs-lisp/comp.el (comp-output-directory): New function.
(comp-output-base-filename): Use `comp-output-directory'.
---
lisp/emacs-lisp/comp.el | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index 05417fd..f027bad 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -443,13 +443,19 @@ VERBOSITY is a number between 0 and 3."
2))
edges)))
+(defun comp-output-directory (src)
+ "Return the compilation direcotry for source SRC."
+ (let* ((src (if (symbolp src) (symbol-name src) src))
+ (expanded-filename (expand-file-name src)))
+ (file-name-as-directory
+ (concat (file-name-directory expanded-filename)
+ comp-native-path-postfix))))
+
(defun comp-output-base-filename (src)
"Output filename sans extention for SRC file being native compiled."
(let* ((src (if (symbolp src) (symbol-name src) src))
(expanded-filename (expand-file-name src))
- (output-dir (file-name-as-directory
- (concat (file-name-directory expanded-filename)
- comp-native-path-postfix)))
+ (output-dir (comp-output-directory src))
(output-filename
(file-name-sans-extension
(file-name-nondirectory expanded-filename))))