diff --git a/.gitignore b/.gitignore index eb10f8d..197644b 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /bin/gash /.config.make /doc/version.texi +/gash/config.scm diff --git a/build-aux/build-guile.sh b/build-aux/build-guile.sh index d9fd178..d0aa4c2 100755 --- a/build-aux/build-guile.sh +++ b/build-aux/build-guile.sh @@ -38,6 +38,7 @@ set -e SCM_FILES=" gash/bournish-commands.scm gash/builtins.scm +gash/config.scm gash/guix-build-utils.scm gash/gash.scm gash/io.scm diff --git a/configure b/configure index 261e62a..f23d4ca 100755 --- a/configure +++ b/configure @@ -40,6 +40,10 @@ SHELL=$BASH VERSION=$VERSION EOF +sed \ + -e "s,@VERSION@,$VERSION,"\ + gash/config.scm.in > gash/config.scm + cat < +;;; +;;; This file is part of Gash. +;;; +;;; Gash is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; Gash is distributed in the hope that it will be useful, but WITHOUT ANY +;;; WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +;;; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +;;; details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with Gash. If not, see . + +(define-module (gash config) + #:export (%version)) + +;;; Commentary: +;;; +;;; Compile-time configuration of gash. When adding a substitution variable +;;; here, make sure to have configure substitute it. +;;; +;;; Code: + +(define %version + "@VERSION@")