diff options
author | David <171410+dmb2@users.noreply.github.com> | 2024-09-27 13:47:54 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-27 13:47:54 -0400 |
commit | 803159dc19699ccbe2ca472c3d18abfadb8f2e7e (patch) | |
tree | d738470fd684a79fe1dbe1991de7f0a9b456ea3c | |
parent | 9d67454dc96921905b80c42563acff47e3d23fcb (diff) | |
parent | d4d79b1c4dcd1f81dec3a92fa9c3838870ffe443 (diff) |
Merge pull request #1199 from MIvanchev/reproducible-builds
Supporting reproducible builds.
-rw-r--r-- | configure.ac | 8 | ||||
-rw-r--r-- | version.lisp.in (renamed from version.lisp) | 24 |
2 files changed, 20 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac index a198d4d..510f53e 100644 --- a/configure.ac +++ b/configure.ac @@ -8,6 +8,7 @@ AC_SUBST(MODULE_DIR) AC_SUBST(LISP_PROGRAM) AC_SUBST(LISP) AC_SUBST(COMPRESSION) +AC_SUBST(REPRODUCIBLE) AC_SUBST(STUMPWM_ASDF_DIR) # Checks for programs. @@ -22,6 +23,11 @@ AC_ARG_ENABLE(compression, COMPRESSION="t", COMPRESSION="nil") +AC_ARG_ENABLE(reproducible, + [ --enable-reproducible create a reproducible build (doesn't include compilation date and time)], + REPRODUCIBLE="t", + REPRODUCIBLE="nil") + STUMPWM_ASDF_DIR="`pwd`" if test -x "$SBCL_PATH"; then @@ -63,3 +69,5 @@ AC_CONFIG_FILES([make-image.lisp]) AC_OUTPUT AC_CONFIG_FILES([load-stumpwm.lisp]) AC_OUTPUT +AC_CONFIG_FILES([version.lisp]) +AC_OUTPUT diff --git a/version.lisp b/version.lisp.in index f9f050f..367512f 100644 --- a/version.lisp +++ b/version.lisp.in @@ -27,18 +27,18 @@ (export '(*version* version)) (defparameter *version* - #.(concatenate - 'string - (let* ((sys (asdf:find-system :stumpwm)) - (git-dir (probe-path (asdf:system-relative-pathname sys ".git")))) - (if git-dir - (string-trim '(#\Newline) - (run-shell-command - (format nil "GIT_DIR=~a git describe --tags" git-dir) t)) - (asdf:component-version sys))) - " Compiled On " - (format-expand *time-format-string-alist* - *time-format-string-default*))) + #.(let* ((sys (asdf:find-system :stumpwm)) + (git-dir (probe-path (asdf:system-relative-pathname sys ".git"))) + (ver (if git-dir + (string-trim '(#\Newline) + (run-shell-command + (format nil "GIT_DIR=~a git describe --tags" git-dir) t)) + (asdf:component-version sys)))) + (if @REPRODUCIBLE@ + (concatenate 'string ver " Reproducible Build") + (concatenate 'string ver " Compiled On " (format-expand + *time-format-string-alist* + *time-format-string-default*))))) (defcommand version () () "Print version information and compilation date." |