Use a scheme file to propagate version from configure.ac
.gitignore
10 | 10 | missing | |
11 | 11 | pre-inst-env | |
12 | 12 | *.go | |
13 | + | config.scm | |
13 | 14 | ||
14 | 15 | *.log | |
15 | 16 | *.trs |
Makefile.am
1 | 1 | include guile.am | |
2 | 2 | ||
3 | 3 | SOURCES= \ | |
4 | + | config.scm \ | |
4 | 5 | jsonld.scm \ | |
5 | 6 | jsonld/compaction.scm \ | |
6 | 7 | jsonld/context-processing.scm \ |
config.scm.in unknown status 1
1 | + | ;;;; Copyright (C) 2020 Julien Lepiller <julien@lepiller.eu> | |
2 | + | ;;;; | |
3 | + | ;;;; This library is free software; you can redistribute it and/or | |
4 | + | ;;;; modify it under the terms of the GNU Lesser General Public | |
5 | + | ;;;; License as published by the Free Software Foundation; either | |
6 | + | ;;;; version 3 of the License, or (at your option) any later version. | |
7 | + | ;;;; | |
8 | + | ;;;; This library is distributed in the hope that it will be useful, | |
9 | + | ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | + | ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
11 | + | ;;;; Lesser General Public License for more details. | |
12 | + | ;;;; | |
13 | + | ;;;; You should have received a copy of the GNU Lesser General Public | |
14 | + | ;;;; License along with this library; if not, write to the Free Software | |
15 | + | ;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
16 | + | ;;;; | |
17 | + | ||
18 | + | (define-module (config) | |
19 | + | #:export (version)) | |
20 | + | ||
21 | + | (define version "@PACKAGE_VERSION@") |
configure.ac
23 | 23 | ||
24 | 24 | ||
25 | 25 | AC_CONFIG_FILES([pre-inst-env], [chmod +x pre-inst-env]) | |
26 | + | AC_CONFIG_FILES([config.scm], []) | |
26 | 27 | AC_CONFIG_FILES([tests/compact.scm], [chmod +x tests/compact.scm]) | |
27 | 28 | AC_CONFIG_FILES([tests/expand.scm], [chmod +x tests/expand.scm]) | |
28 | 29 | AC_CONFIG_FILES([tests/flatten.scm], [chmod +x tests/flatten.scm]) |
test-modules/result.scm
16 | 16 | ;;;; | |
17 | 17 | ||
18 | 18 | (define-module (test-modules result) | |
19 | + | #:use-module ((config) #:prefix config:) | |
19 | 20 | #:use-module (srfi srfi-9) | |
20 | 21 | #:use-module (srfi srfi-19) | |
21 | 22 | #:use-module (ice-9 match) | |
… | |||
125 | 126 | (format port " doap:programming-language \"GNU Guile\"^^xsd:string;~%") | |
126 | 127 | (format port " doap:shortdesc \"JSON-LD support for GNU Guile.\"@en;~%") | |
127 | 128 | (format port " doap:release [~%") | |
128 | - | (format port " doap:name \"guile-jsonld-1.0.0\";~%") | |
129 | - | (format port " doap:revision \"1.0.0\";~%") | |
129 | + | (format port " doap:name \"guile-jsonld-~a\";~%" config:version) | |
130 | + | (format port " doap:revision \"~a\";~%" config:version) | |
130 | 131 | (format port " doap:created \"2020-03-29\"^^xsd:date;~%") | |
131 | 132 | (format port " ] .~%") | |
132 | 133 | (format port "~%") |