Add tools/make module
This commit is contained in:
parent
983d844aec
commit
1bfc8b156e
2 changed files with 18 additions and 0 deletions
14
modules/tools/make/autoload.el
Normal file
14
modules/tools/make/autoload.el
Normal file
|
@ -0,0 +1,14 @@
|
|||
;;; tools/make/autoload.el -*- lexical-binding: t; -*-
|
||||
|
||||
;;;###autoload
|
||||
(defun +make/run ()
|
||||
"Run a make task in the current project."
|
||||
(interactive)
|
||||
(require 'makefile-executor)
|
||||
(let* ((buffer-file (or buffer-file-name default-directory))
|
||||
(makefile-dir (locate-dominating-file buffer-file "Makefile")))
|
||||
(unless makefile-dir
|
||||
(user-error "No makefile found in this project."))
|
||||
(let ((default-directory makefile-dir))
|
||||
(makefile-executor-execute-target
|
||||
(expand-file-name "Makefile")))))
|
Loading…
Add table
Add a link
Reference in a new issue