From: Andrea Corallo Date: Sun, 3 May 2020 13:35:50 +0000 (+0100) Subject: * Introduce `comp-output-directory' X-Git-Tag: emacs-28.0.90~2727^2~670 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8d372201904bcb5fe6cb14aa5c45f33e6e1cd815;p=emacs.git * Introduce `comp-output-directory' * lisp/emacs-lisp/comp.el (comp-output-directory): New function. (comp-output-base-filename): Use `comp-output-directory'. --- diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index 05417fdc31c..f027bad65cf 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))))