aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile.am
diff options
context:
space:
mode:
authorLudovic Courtès2007-10-28 21:36:55 +0100
committerLudovic Courtès2007-10-28 21:36:55 +0100
commit8f7249c988868886fea57d3f231079a2df846728 (patch)
tree4043b587f44a0a1528a96ae5fd8131e53b9c6834 /src/Makefile.am
parentf6debd49499f0cb4cd5abfb123a9d4c5be0c5c83 (diff)
downloadskribilo-8f7249c988868886fea57d3f231079a2df846728.tar.gz
skribilo-8f7249c988868886fea57d3f231079a2df846728.tar.lz
skribilo-8f7249c988868886fea57d3f231079a2df846728.zip
Generate `skribilo' in Makefile.am.
* configure.ac: Don't output `src/skribilo'. * src/Makefile.am (CLEANFILES, guilemoduledir, substitute, SUFFIXES): New variables. (.in): New target.
Diffstat (limited to 'src/Makefile.am')
-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" "$@"