confsubst: Rename to confsubst.in and substitute.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 21 Dec 2008 20:10:09 +0000 (20:10 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 21 Dec 2008 20:10:09 +0000 (20:10 +0000)
Otherwise it has @VERSION@ crud in it!

Makefile.am
confsubst.in [moved from confsubst with 99% similarity]

index 29080c2..7ca039d 100644 (file)
@@ -33,7 +33,7 @@ CLEANFILES             =
 ###--------------------------------------------------------------------------
 ### Handy variables.
 
 ###--------------------------------------------------------------------------
 ### Handy variables.
 
-confsubst = $(srcdir)/confsubst
+confsubst = $(srcdir)/confsubst.in
 mkdir_p = $(srcdir)/config/install-sh -d
 
 ###--------------------------------------------------------------------------
 mkdir_p = $(srcdir)/config/install-sh -d
 
 ###--------------------------------------------------------------------------
@@ -83,7 +83,17 @@ pkgdata_DATA         += getdate.y getdate.h
 ## Scripts.
 pkgdata_SCRIPTS                += install-ac
 pkgdata_SCRIPTS                += maninst
 ## Scripts.
 pkgdata_SCRIPTS                += install-ac
 pkgdata_SCRIPTS                += maninst
+
+## confsubst
 pkgdata_SCRIPTS                += confsubst
 pkgdata_SCRIPTS                += confsubst
+CLEANFILES             += confsubst
+EXTRA_DIST             += confsubst.in
+
+confsubst: confsubst.in Makefile
+       $(confsubst) $(srcdir)/confsubst.in >$@.new \
+               VERSION=$(VERSION)
+       chmod +x $@.new
+       mv $@.new $@
 
 ## Testsuites.
 pkgdata_DATA           += autotest.am
 
 ## Testsuites.
 pkgdata_DATA           += autotest.am
similarity index 99%
rename from confsubst
rename to confsubst.in
index 45a85c2..86c8bb0 100755 (executable)
--- a/confsubst
@@ -25,7 +25,6 @@
 ### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
 set -e
 ### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
 set -e
-
 VERSION="@VERSION@"
 
 ###--------------------------------------------------------------------------
 VERSION="@VERSION@"
 
 ###--------------------------------------------------------------------------