aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Lirzin <mthl@gnu.org>2016-06-10 18:17:53 +0200
committerMathieu Lirzin <mthl@gnu.org>2016-06-10 23:38:40 +0200
commit8fb2983dcee4fec94bcc78ca4bc0f33eb5560665 (patch)
treead83ddb69214d252d5a59a520219a81fdd8c23ca
parent9d5fda76bbe7edd954d2a5112f453b9a6f625cf1 (diff)
downloadcuirass-8fb2983dcee4fec94bcc78ca4bc0f33eb5560665.tar
cuirass-8fb2983dcee4fec94bcc78ca4bc0f33eb5560665.tar.gz
build: Generate config.scm at configure time.
* src/cuirass/config.scm.in: New file. * configure.ac (AC_CONFIG_FILES): Add 'src/cuirass/config.scm'. * Makefile.am (nodist_pkgmodule_DATA, CLEANFILES, DISTCLEANFILES): Update. * .gitignore: Likewise.
-rw-r--r--.gitignore7
-rw-r--r--Makefile.am10
-rw-r--r--configure.ac3
-rw-r--r--src/cuirass/config.scm.in48
4 files changed, 62 insertions, 6 deletions
diff --git a/.gitignore b/.gitignore
index fbb79fd..d34a698 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,14 +5,15 @@
/INSTALL
/aclocal.m4
/autom4te.cache/
+/bin/cuirass
/build-aux/config.guess
/build-aux/config.sub
/build-aux/install-sh
/build-aux/missing
+/cache/
+/config.cache
/configure
+/src/cuirass/config.scm
Makefile
Makefile.in
pre-inst-env
-/bin/cuirass
-/config.cache
-/cache/
diff --git a/Makefile.am b/Makefile.am
index 2c562eb..5950b8a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4,7 +4,10 @@ bin_SCRIPTS = bin/cuirass
noinst_SCRIPTS = pre-inst-env
dist_pkgmodule_DATA = src/cuirass/base.scm
-nodist_pkgmodule_DATA = $(dist_pkgmodule_DATA:%.scm=%.go)
+nodist_pkgmodule_DATA = \
+ $(dist_pkgmodule_DATA:%.scm=%.go) \
+ src/cuirass/config.scm \
+ src/cuirass/config.go
TEST_EXTENSIONS = .scm
AM_TESTS_ENVIRONMENT = env GUILE_AUTO_COMPILE='0'
@@ -54,7 +57,10 @@ EXTRA_DIST = \
.dir-locals.el \
$(TESTS)
-CLEANFILES = $(nodist_pkgmodule_DATA)
+DISTCLEANFILES = src/cuirass/config.scm
+CLEANFILES = \
+ $(dist_pkgmodule_DATA:%.scm=%.go) \
+ src/cuirass/config.go
## -------------- ##
## Silent rules. ##
diff --git a/configure.ac b/configure.ac
index 56ffd4d..899db84 100644
--- a/configure.ac
+++ b/configure.ac
@@ -19,7 +19,8 @@ pkgmoduledir="${moduledir}/cuirass"
AC_SUBST([moduledir])
AC_SUBST([pkgmoduledir])
-AC_CONFIG_FILES([Makefile])
+AC_CONFIG_FILES([Makefile
+ src/cuirass/config.scm])
AC_CONFIG_FILES([bin/cuirass], [chmod +x bin/cuirass])
AC_CONFIG_FILES([pre-inst-env:build-aux/pre-inst-env.in],
[chmod +x pre-inst-env])
diff --git a/src/cuirass/config.scm.in b/src/cuirass/config.scm.in
new file mode 100644
index 0000000..ef1b56b
--- /dev/null
+++ b/src/cuirass/config.scm.in
@@ -0,0 +1,48 @@
+;;;; config.scm - variables defined at configure time
+;;;
+;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
+;;;
+;;; This file is part of Cuirass.
+;;;
+;;; Cuirass 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.
+;;;
+;;; Cuirass 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 Cuirass. If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (cuirass config))
+
+(define-public %package
+ ;; Name of package
+ "@PACKAGE@")
+
+(define-public %package-bugreport
+ ;; Define to the address where bug reports for this package should be sent.
+ "@PACKAGE_BUGREPORT@")
+
+(define-public %package-name
+ ;; Define to the full name of this package.
+ "@PACKAGE_NAME@")
+
+(define-public %package-string
+ ;; Define to the full name and version of this package.
+ "@PACKAGE_STRING@")
+
+(define-public %package-tarname
+ ;; Define to the one symbol short name of this package.
+ "@PACKAGE_TARNAME@")
+
+(define-public %package-url
+ ;; Define to the home page for this package.
+ "@PACKAGE_URL@")
+
+(define-public %package-version
+ ;; Define to the version of this package.
+ "@PACKAGE_VERSION@")