narf:build -- run even if (null build-file)

This commit is contained in:
Henrik Lissner 2015-08-01 14:26:53 +02:00
parent 6d1ee89372
commit 81c58e0efa

View file

@ -21,7 +21,7 @@ If ARG is nil this function calls `recompile', otherwise it calls
(user-error "No build command was set")) (user-error "No build command was set"))
(let ((build-file (cdr narf--build-command)) (let ((build-file (cdr narf--build-command))
(build-cmd (car narf--build-command))) (build-cmd (car narf--build-command)))
(if (narf/project-has-files build-file) (if (or (null build-file) (narf/project-has-files build-file))
(compile (format "cd '%s' && %s" (narf/project-root) (format build-cmd (or arg "")))) (compile (format "cd '%s' && %s" (narf/project-root) (format build-cmd (or arg ""))))
(error "Could not find Makefile")))) (error "Could not find Makefile"))))