diff options
author | David Thompson <dthompson2@worcester.edu> | 2014-02-10 21:02:49 -0500 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2014-02-10 21:02:49 -0500 |
commit | d2d6ccfeb77711eed7e48bf958b76168bdfd0621 (patch) | |
tree | f378b61a4404444bb30d65ad1f7e777f82462a53 | |
parent | 342fbcffc1b17f03ae4b9f7de3caccc5e45da0f1 (diff) |
Add build-time configuration module.
* 2d/config.scm.in: New file.
* Makefile.am (2d/config.scm): New rule.
(SOURCES): Add 2d/config.scm.
* .gitignore: Ignore 2d/config.scm.
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | 2d/config.scm.in | 27 | ||||
-rw-r--r-- | Makefile.am | 4 |
3 files changed, 32 insertions, 0 deletions
@@ -25,3 +25,4 @@ Makefile.in /doc/guile-2d.vrs /doc/guile-2d.html /doc/guile-2d.t2p +/2d/config.scm diff --git a/2d/config.scm.in b/2d/config.scm.in new file mode 100644 index 0000000..725bcda --- /dev/null +++ b/2d/config.scm.in @@ -0,0 +1,27 @@ +;;; guile-2d +;;; Copyright (C) 2014 David Thompson <dthompson2@worcester.edu> +;;; +;;; Guile-2d is free software: you can redistribute it and/or modify it +;;; under the terms of the GNU Lesser General Public License as +;;; published by the Free Software Foundation, either version 3 of the +;;; License, or (at your option) any later version. +;;; +;;; Guile-2d 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 +;;; Lesser General Public License for more details. +;;; +;;; You should have received a copy of the GNU Lesser General Public +;;; License along with this program. If not, see +;;; <http://www.gnu.org/licenses/>. + +;;; Commentary: +;; +;; Build time configuration. +;; +;;; Code: + +(define-module (2d config) + #:export (%pkgdatadir)) + +(define %pkgdatadir "@pkgdatadir@") diff --git a/Makefile.am b/Makefile.am index 80798e2..c13bf1c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -8,6 +8,7 @@ SOURCES = \ 2d/animation.scm \ 2d/audio.scm \ 2d/color.scm \ + 2d/config.scm \ 2d/coroutine.scm \ 2d/font.scm \ 2d/fps.scm \ @@ -39,6 +40,9 @@ WRAPPER_SOURCES = \ 2d/wrappers/gl.scm \ 2d/wrappers/util.scm +2d/config.scm: Makefile + sed -e "s|@pkgdatadir\@|$(pkgdatadir)|" $@.in > $@ + EXTRA_DIST += env.in SUBDIRS = \ |