aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreaCorallo2020-02-06 20:23:14 +0000
committerAndreaCorallo2020-02-06 20:23:14 +0000
commit2dae7e1b697fef389e8e193d60ef799e2b3b09b4 (patch)
treed7eae40835307d582deb59b39bcbfbc2f5969340
parent0da62d94e2a167d5ccfd8ece03623afdc178154c (diff)
downloademacs-2dae7e1b697fef389e8e193d60ef799e2b3b09b4.tar.gz
emacs-2dae7e1b697fef389e8e193d60ef799e2b3b09b4.zip
Add system-configuration in the compilation output path
-rw-r--r--lisp/emacs-lisp/comp.el23
1 files changed, 17 insertions, 6 deletions
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index e14f350c2ee..c3e797b9b17 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -2014,9 +2014,12 @@ Update all insn accordingly."
2014(defun comp-compile-ctxt-to-file (name) 2014(defun comp-compile-ctxt-to-file (name)
2015 "Compile as native code the current context naming it NAME. 2015 "Compile as native code the current context naming it NAME.
2016Prepare every function for final compilation and drive the C back-end." 2016Prepare every function for final compilation and drive the C back-end."
2017 (comp-finalize-relocs) 2017 (let ((dir (file-name-directory name)))
2018 (unless comp-dry-run 2018 (comp-finalize-relocs)
2019 (comp--compile-ctxt-to-file name))) 2019 (unless (file-exists-p dir)
2020 (make-directory dir))
2021 (unless comp-dry-run
2022 (comp--compile-ctxt-to-file name))))
2020 2023
2021(defun comp-final (_) 2024(defun comp-final (_)
2022 "Final pass driving the C back-end for code emission." 2025 "Final pass driving the C back-end for code emission."
@@ -2118,9 +2121,17 @@ Return the compilation unit file name."
2118 (let ((data input) 2121 (let ((data input)
2119 (comp-native-compiling t) 2122 (comp-native-compiling t)
2120 (comp-ctxt (make-comp-ctxt 2123 (comp-ctxt (make-comp-ctxt
2121 :output (if (symbolp input) 2124 :output
2122 (make-temp-file (concat (symbol-name input) "-")) 2125 (if (symbolp input)
2123 (file-name-sans-extension (expand-file-name input)))))) 2126 (make-temp-file (concat (symbol-name input) "-"))
2127 (let ((exp-file (expand-file-name input)))
2128 (concat
2129 (file-name-as-directory
2130 (concat
2131 (file-name-directory exp-file)
2132 system-configuration))
2133 (file-name-sans-extension
2134 (file-name-nondirectory exp-file))))))))
2124 (comp-log "\n \n" 1) 2135 (comp-log "\n \n" 1)
2125 (condition-case err 2136 (condition-case err
2126 (mapc (lambda (pass) 2137 (mapc (lambda (pass)