Permalink
Browse files

Fix bug introduced in #24

We need to set the argument of the make option `-C` to the path the
Makefile is located in.
  • Loading branch information...
1 parent 378b7a8 commit 11744341b10b35200ebb6789de52ce1a79336ef4 @cslux cslux committed Nov 9, 2016
Showing with 7 additions and 5 deletions.
  1. +7 −5 helm-make.el
View
@@ -298,17 +298,19 @@ You can specify an additional directory to search for a makefile by
setting the buffer local variable `helm-make-build-dir'."
(interactive "p")
(require 'projectile)
- (setq helm-make-command (format "%s -C %s -j%d %%s"
- helm-make-executable (projectile-project-root) arg))
(let ((makefile (helm--make-makefile-exists
(projectile-project-root)
(if (and (stringp helm-make-build-dir)
(not (string-match-p "\\`[ \t\n\r]*\\'" helm-make-build-dir)))
`(,helm-make-build-dir "" "build")
`(,@helm-make-build-dir "" "build")))))
- (if makefile
- (helm--make makefile)
- (error "No Makefile found for project %s" (projectile-project-root)))))
+ (if (not makefile)
+ (error "No Makefile found for project %s" (projectile-project-root))
+ (setq helm-make-command (format "%s -C %s -j%d %%s"
+ helm-make-executable
+ (file-name-directory makefile)
+ arg))
+ (helm--make makefile))))
(provide 'helm-make)

0 comments on commit 1174434

Please sign in to comment.