aboutsummaryrefslogtreecommitdiff
path: root/module/c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--module/calp.scm4
-rw-r--r--module/calp/main.scm9
2 files changed, 12 insertions, 1 deletions
diff --git a/module/calp.scm b/module/calp.scm
new file mode 100644
index 00000000..43fa4707
--- /dev/null
+++ b/module/calp.scm
@@ -0,0 +1,4 @@
+(define-module (calp))
+
+;; Update me on new release
+(define-public version "0.5")
diff --git a/module/calp/main.scm b/module/calp/main.scm
index 2e08fd0f..ee49c250 100644
--- a/module/calp/main.scm
+++ b/module/calp/main.scm
@@ -23,7 +23,7 @@
(define options
- '((statprof (value display-style)
+ `((statprof (value display-style)
(description "Run the program within Guile's built in statical "
"profiler. Display style is one of "
(b "flat") " or " (b "tree") "."))
@@ -53,6 +53,9 @@
"Can " (i "not") " be given with an equal after --option."
(br) "Can be given multiple times."))
+ (version (single-char #\v)
+ (description "Display version, which is " ,(@ (calp) version) " btw."))
+
(update-zoneinfo)
(help (single-char #\h)
@@ -152,6 +155,10 @@
(throw 'return)
)
+ (when (option-ref opts 'version #f)
+ (format #t "Calp version ~a~%" (@ (calp) version))
+ (throw 'return))
+
(when (option-ref opts 'update-zoneinfo #f)
(let ((pipe
(let-env ((PREFIX (get-config 'path-prefix)))