-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile.el
59 lines (45 loc) · 1.03 KB
/
makefile.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
;; emacs -Q -batch -L . -l makefile.elc -e do/all
(defmacro def:do (name msg &rest code)
(let ((fun (intern (concat "do/" (symbol-name name)))))
`(defun ,fun ()
(interactive)
(let ((that (make-progress-reporter (concat ,msg "..."))))
,@code
(progress-reporter-done that))
)))
(defmacro def:re (name &rest code)
(let ((fun (intern (concat "re" (symbol-name name)))))
`(defun ,fun ()
(interactive)
(do/clean)
(,name)
,@code
)))
(def:do this
"This"
(message "line 1")
(message "line 2")
(message "line 3")
)
(def:do all
"All"
(do/compile)
(message " ")
(do/test))
(def:do compile
"Compiling"
(byte-recompile-directory "." 0)
(message ""))
(def:do test
"Testing"
(require 'ert)
(require 'tests)
(if noninteractive
(ert-run-tests-batch)
(ert-run-tests-interactively t)))
(def:do clean
"Cleanning"
(mapc 'delete-file
(directory-files "./" nil ".+\\.elc$")))
(def:re do/all)
(def:re do/compile)