Add tools/make module

This commit is contained in:
Henrik Lissner 2017-09-25 13:06:08 +02:00
parent 983d844aec
commit 1bfc8b156e
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 18 additions and 0 deletions

View 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")))))