From 8f7249c988868886fea57d3f231079a2df846728 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 28 Oct 2007 21:36:55 +0100 Subject: Generate `skribilo' in Makefile.am. * configure.ac: Don't output `src/skribilo'. * src/Makefile.am (CLEANFILES, guilemoduledir, substitute, SUFFIXES): New variables. (.in): New target. --- configure.ac | 1 - src/Makefile.am | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) 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" "$@" -- cgit v1.2.3