File tree Expand file tree Collapse file tree 1 file changed +17
-14
lines changed Expand file tree Collapse file tree 1 file changed +17
-14
lines changed Original file line number Diff line number Diff line change 12
12
(defun run-command-recipe-make ()
13
13
" Provide commands to run Makefile targets.
14
14
15
- Requires `helm-make' (https://github.com/abo-abo/helm-make) to be installed."
16
- (require 'helm-make )
17
- (when-let* ((project-dir
18
- (locate-dominating-file default-directory " Makefile" ))
19
- (makefile (concat project-dir " Makefile" ))
20
- (targets (helm--make-cached-targets makefile)))
21
- (seq-map
22
- (lambda (target )
23
- (list
24
- :command-name target
25
- :command-line (concat " make " target)
26
- :display target
27
- :working-dir project-dir))
28
- targets)))
15
+ Requires `helm-make' (https://github.com/abo-abo/helm-make) to
16
+ read Makefile targets, but does not require `helm' and can be
17
+ used with any of the selectors supported by `run-command' ."
18
+
19
+ (when (require 'helm-make nil t )
20
+ (when-let* ((project-dir
21
+ (locate-dominating-file default-directory " Makefile" ))
22
+ (makefile (concat project-dir " Makefile" ))
23
+ (targets (helm--make-cached-targets makefile)))
24
+ (seq-map
25
+ (lambda (target )
26
+ (list
27
+ :command-name target
28
+ :command-line (concat " make " target)
29
+ :display target
30
+ :working-dir project-dir))
31
+ targets))))
29
32
30
33
(provide 'run-command-recipe-make )
31
34
; ;; run-command-recipe-make.el ends here
You can’t perform that action at this time.
0 commit comments