From d2d6ccfeb77711eed7e48bf958b76168bdfd0621 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Mon, 10 Feb 2014 21:02:49 -0500 Subject: 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. --- .gitignore | 1 + 2d/config.scm.in | 27 +++++++++++++++++++++++++++ Makefile.am | 4 ++++ 3 files changed, 32 insertions(+) create mode 100644 2d/config.scm.in diff --git a/.gitignore b/.gitignore index b3b6a5d..31270d7 100644 --- a/.gitignore +++ b/.gitignore @@ -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 +;;; +;;; 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 +;;; . + +;;; 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 = \ -- cgit v1.2.3