aboutsummaryrefslogtreecommitdiff
path: root/src/guile/Makefile.am
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2023-12-05 23:13:36 +0100
committerWojtek Kosior <koszko@koszko.org>2023-12-12 19:18:26 +0100
commit567c28e71716cb709a49dec8d1c60be9ad879f80 (patch)
tree28e2f1087e8a7e14bb81971e8d0907c7104a758d /src/guile/Makefile.am
downloadmyra-test-utils-567c28e71716cb709a49dec8d1c60be9ad879f80.tar.gz
myra-test-utils-567c28e71716cb709a49dec8d1c60be9ad879f80.zip
Initial commit.
Diffstat (limited to 'src/guile/Makefile.am')
-rw-r--r--src/guile/Makefile.am46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/guile/Makefile.am b/src/guile/Makefile.am
new file mode 100644
index 0000000..dfbec85
--- /dev/null
+++ b/src/guile/Makefile.am
@@ -0,0 +1,46 @@
+# SPDX-License-Identifier: CC0-1.0
+#
+# Copyright (C) 2023 Wojtek Kosior <koszko@koszko.org>
+
+GUILE_SOURCE_FILES = \
+ $(PACKAGE).scm \
+ $(PACKAGE)/driver.scm
+
+GUILE_OBJECT_FILES = $(GUILE_SOURCE_FILES:.scm=.go)
+
+gobjdir = $(libdir)/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache
+nobase_gobj_DATA = $(GUILE_OBJECT_FILES)
+
+scmdir = $(datarootdir)/guile/site/@GUILE_EFFECTIVE_VERSION@
+nobase_dist_scm_DATA = $(GUILE_SOURCE_FILES)
+
+.scm.go:
+ $(top_builddir)/pre-inst-env $(GUILD) compile --output=$@ $<
+
+changelogdir = $(docdir)
+nobase_dist_changelog_DATA = \
+ myra-test-utils/driver.scm.ChangeLog \
+ myra-test-utils/driver.scm.ChangeLog.in.license
+
+myra-test-utils/driver.scm.ChangeLog: myra-test-utils/driver.scm.ChangeLog.in
+ test -d myra-test-utils || mkdir myra-test-utils
+ (if test -d $(top_srcdir)/.git; then \
+ cd $(srcdir) && git log \
+ --grep='^Initial commit\.$$' --invert-grep \
+ --after=2023-12-06T00+01:00 \
+ --pretty='%as %an <%ae>%n%n%B' \
+ myra-test-utils/driver.scm; \
+ fi) | \
+ $(AWK) '{line_prefix = " "} \
+ /^(20[0-9]{2}(-[0-9]{2}){2}.*>)?$$/ {line_prefix = ""} \
+ {print line_prefix $$0}' > $@
+ cat $< >> $@
+
+dist-hook:
+ cp $(distdir)/myra-test-utils/driver.scm.ChangeLog \
+ $(distdir)/myra-test-utils/driver.scm.ChangeLog.in
+ $(SED) --expression='s/^SPDX.*/!!! PLEASE UPDATE THIS FILEā€¦ \0 !!!/' \
+ --in-place \
+ $(distdir)/myra-test-utils/driver.scm.ChangeLog.in.license
+
+MOSTLYCLEANFILES = $(GUILE_OBJECT_FILES) $(nobase_dist_changelog_DATA)