File tree Expand file tree Collapse file tree 3 files changed +28
-9
lines changed Expand file tree Collapse file tree 3 files changed +28
-9
lines changed Original file line number Diff line number Diff line change 26
26
(list
27
27
(clingon :make-option
28
28
:string
29
- :description " path to the ASD file "
29
+ :description " system name "
30
30
:short-name #\n
31
31
:long-name " name"
32
32
:required t
42
42
(defun handler (cmd)
43
43
" Handler for the `build' command."
44
44
(let* ((name (clingon :getopt cmd :name ))
45
- (output (clingon :getopt cmd :output ))
46
- (name (qob :load-system name)))
47
- (format t " ~A " (asdf/system-registry :registered-system name))
48
- (format t " ~A " output)
49
- ; ;(setq asdf/system:build-pathname output)
50
- ; ;(asdf:operate :build-op name)
45
+ (output (clingon :getopt cmd :output )))
46
+ ; ;(format t "~A" (asdf/system-registry:registered-system name))
47
+ ; ;(format t "~A" output)
48
+ (qob :setup)
49
+ (asdf :operate :build-op name)
51
50
))
52
51
53
52
(defun command ()
54
53
" Build the executable."
55
54
(clingon :make-command
56
55
:name " build"
57
56
:description " Build the executable"
58
- :usage " -n /path/to/file.asd -o /bin/program-name "
57
+ :usage " -n <name> -o <path> "
59
58
:options (options)
60
59
:handler #' handler))
Original file line number Diff line number Diff line change 34
34
(defun -error (fmt &rest args)
35
35
" TODO: .."
36
36
(apply #' format t fmt args))
37
+
38
+ (defvar elapsed-time nil
39
+ " Log with elapsed time." )
40
+
41
+ (defvar minimum-reported-time 0.1
42
+ " Minimal load time that will be reported." )
43
+
44
+ (defmacro with-progress (msg-start body msg-end)
45
+ " Progress BODY wrapper with prefix (MSG-START) and suffix (MSG-END) messages."
46
+ (declare (indent 0 ) (debug t ))
47
+ ` (if elapsed-time
48
+ (let ((now (current-time)))
49
+ (ignore-errors (-write , msg-start)) , body
50
+ (let ((elapsed (float-time (time-subtract (current-time) now))))
51
+ (if (< elapsed minimum-reported-time)
52
+ (ignore-errors (-msg , msg-end))
53
+ (ignore-errors (-write , msg-end))
54
+ (-msg (ansi-white (format " (%.3fs)" elapsed))))))
55
+ (ignore-errors (-write , msg-start)) , body
56
+ (ignore-errors (-msg , msg-end))))
Original file line number Diff line number Diff line change 18
18
(let ((files (asd-files t )))
19
19
(mapc (lambda (file)
20
20
(load-system file)
21
- (-info " " ))
21
+ (-info " Load ASD file ~A " file ))
22
22
files)))
23
23
24
24
(defun load-system (filename)
You can’t perform that action at this time.
0 commit comments