summaryrefslogtreecommitdiff
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
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.
-rw-r--r--configure.ac1
-rw-r--r--src/Makefile.am16
2 files changed, 16 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 7ddb2be..e21f1bf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -50,7 +50,6 @@ AC_CONFIG_COMMANDS([skribilo-executable], [chmod a+x src/skribilo])
AC_OUTPUT([Makefile
po/Makefile.in
- src/skribilo
src/Makefile
src/guile/Makefile
src/guile/skribilo/Makefile
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" "$@"