summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 4a83f1a..077c5c9 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,4 +1,20 @@
SUBDIRS = guile
EXTRA_DIST = skribilo.in
+
bin_SCRIPTS = skribilo
+CLEANFILES = $(bin_SCRIPTS)
+
+guilemoduledir = $(GUILE_SITE)
+substitute = sed -e 's,[@]guilemoduledir[@],$(guilemoduledir),g' \
+ -e 's,[@]GUILE[@],$(GUILE),g' \
+ -e 's,[@]PACKAGE_STRING[@],$(PACKAGE_STRING),g' \
+ -e 's,[@]PACKAGE_NAME[@],$(PACKAGE_NAME),g' \
+ -e 's,[@]PACKAGE_VERSION[@],$(PACKAGE_VERSION),g'
+
+SUFFIXES = .in
+
+.in:
+ $(substitute) "$^" > "$@.tmp" && \
+ chmod +x "$@.tmp" && \
+ mv "$@.tmp" "$@"