debian/control: No, we don't need such a shiny `debhelper'.
[cfd] / Makefile.am
index 29080c2..ede8e90 100644 (file)
@@ -25,7 +25,9 @@
 
 bin_SCRIPTS             =
 pkgdata_SCRIPTS                 =
+dist_pkgdata_SCRIPTS    =
 pkgdata_DATA            =
+dist_pkgdata_DATA       =
 
 EXTRA_DIST              =
 CLEANFILES              =
@@ -33,9 +35,14 @@ CLEANFILES            =
 ###--------------------------------------------------------------------------
 ### Handy variables.
 
-confsubst = $(srcdir)/confsubst
+confsubst = $(srcdir)/confsubst.in
 mkdir_p = $(srcdir)/config/install-sh -d
 
+V_SUBST = $(V_SUBST_$(V))
+V_SUBST_ = $(V_SUBST_$(AM_DEFAULT_VERBOSITY))
+V_SUBST_0 = @echo "  SUBST  $@";
+SUBST = $(V_SUBST)$(confsubst)
+
 ###--------------------------------------------------------------------------
 ### Main scripts.
 
@@ -45,10 +52,10 @@ CLEANFILES          += mklinks
 EXTRA_DIST             += mklinks.in
 
 mklinks: mklinks.in Makefile
-       $(confsubst) $(srcdir)/mklinks.in >$@.new \
+       $(SUBST) $(srcdir)/mklinks.in >$@.new \
                pkgdatadir=$(pkgdatadir) VERSION=$(VERSION)
-       chmod +x $@.new
-       mv $@.new $@
+       $(AM_V_at)chmod +x $@.new
+       $(AM_V_at)mv $@.new $@
 
 ## findlinks
 bin_SCRIPTS            += findlinks
@@ -56,10 +63,10 @@ CLEANFILES          += findlinks
 EXTRA_DIST             += findlinks.in
 
 findlinks: findlinks.in Makefile
-       $(confsubst) $(srcdir)/findlinks.in >$@.new \
+       $(SUBST) $(srcdir)/findlinks.in >$@.new \
                pkgdatadir=$(pkgdatadir) VERSION=$(VERSION)
-       chmod +x $@.new
-       mv $@.new $@
+       $(AM_V_at)chmod +x $@.new
+       $(AM_V_at)mv $@.new $@
 
 ## mdw-setup
 bin_SCRIPTS            += mdw-setup
@@ -69,28 +76,47 @@ EXTRA_DIST          += mdw-setup
 ### Files to install.
 
 ## Licences.
-pkgdata_DATA           += COPYING COPYING.LIB
-pkgdata_DATA           += gpl.tex lgpl.tex gpl.texi lgpl.texi
+dist_pkgdata_DATA      += COPYING COPYING.LIB
+dist_pkgdata_DATA      += gpl.tex lgpl.tex gpl.texi lgpl.texi
 
 ## Documentation.
-pkgdata_DATA           += INSTALL
-pkgdata_DATA           += texinice.tex
+dist_pkgdata_DATA      += INSTALL
+dist_pkgdata_DATA      += texinice.tex
 
 ## Useful code.
-pkgdata_DATA           += mdwopt.c mdwopt.h
-pkgdata_DATA           += getdate.y getdate.h
+dist_pkgdata_DATA      += mdwopt.c mdwopt.h
+dist_pkgdata_DATA      += getdate.y getdate.h
 
 ## Scripts.
-pkgdata_SCRIPTS                += install-ac
-pkgdata_SCRIPTS                += maninst
+dist_pkgdata_SCRIPTS   += install-ac
+dist_pkgdata_SCRIPTS   += maninst
+
+## Python support stuff.
+dist_pkgdata_SCRIPTS   += mdwsetup.py
+
+## confsubst
 pkgdata_SCRIPTS                += confsubst
+CLEANFILES             += confsubst
+EXTRA_DIST             += confsubst.in
 
-## Testsuites.
-pkgdata_DATA           += autotest.am
-pkgdata_DATA           += testsuite.at
+confsubst: confsubst.in Makefile
+       $(SUBST) $(srcdir)/confsubst.in >$@.new VERSION=$(VERSION)
+       $(AM_V_at)chmod +x $@.new
+       $(AM_V_at)mv $@.new $@
 
-EXTRA_DIST             += $(pkgdata_DATA)
-EXTRA_DIST             += $(pkgdata_SCRIPTS)
+## auto-version
+pkgdata_SCRIPTS                += auto-version
+CLEANFILES             += auto-version
+EXTRA_DIST             += auto-version.in
+
+auto-version: auto-version.in Makefile
+       $(SUBST) $(srcdir)/auto-version.in >$@.new VERSION=$(VERSION)
+       $(AM_V_at)chmod +x $@.new
+       $(AM_V_at)mv $@.new $@
+
+## Testsuites.
+dist_pkgdata_DATA      += autotest.am
+dist_pkgdata_DATA      += testsuite.at
 
 ## Autoconf snippets.
 EXTRA_DIST             += aclocal.glob