-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathjdibug-build.el
executable file
·51 lines (44 loc) · 1.7 KB
/
jdibug-build.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
(defconst jdibug-build-files
'("tree-mode"
"elog"
"jdibug-util"
"jdwp"
"jdi"
"jdibug-expr"
"jdibug-ui"
"jdibug-run"
"jdibug-menu"))
(defun jdibug-build (&optional interactive)
(interactive "p")
(jdibug-byte-compile-files))
(defun jdibug-byte-compile-files ()
(interactive)
(add-to-list 'load-path (expand-file-name jdibug-build-directory))
(if (get-buffer "*Compile-Log*")
(kill-buffer "*Compile-Log*"))
(mapc (lambda (file)
(let* ((el-file (concat file ".el"))
(out-file (concat jdibug-build-directory "/" el-file))
(max-specpdl-size 20000))
(copy-file el-file jdibug-build-directory 'overwrite)
(byte-compile-file out-file)))
jdibug-build-files)
;; Update version numbers
(mapc (lambda (in-file)
(find-file in-file)
(when (and (boundp 'jdibug-release-major-version)
(stringp jdibug-release-major-version)
(boundp 'jdibug-release-minor-version)
(stringp jdibug-release-minor-version))
(goto-char (point-min))
(while (search-forward "@major-version@" nil t)
(replace-match jdibug-release-major-version))
(goto-char (point-min))
(while (search-forward "@minor-version@" nil t)
(replace-match jdibug-release-minor-version)))
(let ((out-file (expand-file-name in-file jdibug-build-directory )))
(write-file out-file)
(byte-compile-file out-file)))
'("jdibug.el" "jdibug-pkg.el"))
(pop-to-buffer "*Compile-Log*")
(message "finished compilation"))