confsubst: Rename to confsubst.in and substitute.
[cfd] / Makefile.am
CommitLineData
ba4d97a4
MW
1### -*-makefile-*-
2###
3### Building the distribution
4###
5### (c) 1997 Mark Wooding
6###
7
8###----- Licensing notice ---------------------------------------------------
9###
10### This file is part of the Common Files Distribution (`common')
11###
12### `Common' is free software; you can redistribute it and/or modify
13### it under the terms of the GNU General Public License as published by
14### the Free Software Foundation; either version 2 of the License, or
15### (at your option) any later version.
16###
17### `Common' is distributed in the hope that it will be useful,
18### but WITHOUT ANY WARRANTY; without even the implied warranty of
19### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20### GNU General Public License for more details.
21###
22### You should have received a copy of the GNU General Public License
23### along with `common'; if not, write to the Free Software Foundation,
24### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25
26bin_SCRIPTS =
27pkgdata_SCRIPTS =
28pkgdata_DATA =
29
30EXTRA_DIST =
31CLEANFILES =
32
33###--------------------------------------------------------------------------
34### Handy variables.
35
cac38f7f 36confsubst = $(srcdir)/confsubst.in
ba4d97a4
MW
37mkdir_p = $(srcdir)/config/install-sh -d
38
39###--------------------------------------------------------------------------
40### Main scripts.
41
42## mklinks
43bin_SCRIPTS += mklinks
44CLEANFILES += mklinks
45EXTRA_DIST += mklinks.in
46
47mklinks: mklinks.in Makefile
48 $(confsubst) $(srcdir)/mklinks.in >$@.new \
49 pkgdatadir=$(pkgdatadir) VERSION=$(VERSION)
50 chmod +x $@.new
51 mv $@.new $@
52
53## findlinks
54bin_SCRIPTS += findlinks
55CLEANFILES += findlinks
56EXTRA_DIST += findlinks.in
57
58findlinks: findlinks.in Makefile
59 $(confsubst) $(srcdir)/findlinks.in >$@.new \
60 pkgdatadir=$(pkgdatadir) VERSION=$(VERSION)
61 chmod +x $@.new
62 mv $@.new $@
63
64## mdw-setup
65bin_SCRIPTS += mdw-setup
66EXTRA_DIST += mdw-setup
67
68###--------------------------------------------------------------------------
69### Files to install.
1f79a056 70
ba4d97a4
MW
71## Licences.
72pkgdata_DATA += COPYING COPYING.LIB
73pkgdata_DATA += gpl.tex lgpl.tex gpl.texi lgpl.texi
74
75## Documentation.
76pkgdata_DATA += INSTALL
77pkgdata_DATA += texinice.tex
78
79## Useful code.
80pkgdata_DATA += mdwopt.c mdwopt.h
81pkgdata_DATA += getdate.y getdate.h
82
83## Scripts.
84pkgdata_SCRIPTS += install-ac
85pkgdata_SCRIPTS += maninst
cac38f7f
MW
86
87## confsubst
ba4d97a4 88pkgdata_SCRIPTS += confsubst
cac38f7f
MW
89CLEANFILES += confsubst
90EXTRA_DIST += confsubst.in
91
92confsubst: confsubst.in Makefile
93 $(confsubst) $(srcdir)/confsubst.in >$@.new \
94 VERSION=$(VERSION)
95 chmod +x $@.new
96 mv $@.new $@
ba4d97a4 97
74c50df9
MW
98## Testsuites.
99pkgdata_DATA += autotest.am
100pkgdata_DATA += testsuite.at
101
ba4d97a4
MW
102EXTRA_DIST += $(pkgdata_DATA)
103EXTRA_DIST += $(pkgdata_SCRIPTS)
104
105## Autoconf snippets.
106EXTRA_DIST += aclocal.glob
107
108install-data-hook::
109 $(mkdir_p) $(DESTDIR)$(aclocaldir)
68bd460a 110 $(srcdir)/install-ac install \
111 $(srcdir)/aclocal.glob $(DESTDIR)$(aclocaldir)
ba4d97a4
MW
112
113uninstall-hook::
68bd460a 114 $(srcdir)/install-ac rm \
115 $(srcdir)/aclocal.glob $(DESTDIR)$(aclocaldir)
a7855629 116
ba4d97a4
MW
117###--------------------------------------------------------------------------
118### Documentation.
b91e2391 119
120info_TEXINFOS = common.texi
121
ba4d97a4
MW
122###--------------------------------------------------------------------------
123### Other special tweaks.
124
125## Make `make distcheck' work.
126DISTCHECK_CONFIGURE_FLAGS = \
127 --with-aclocaldir='$${prefix}/share/aclocal'
128
129## Distribute the release number.
130dist-hook::
131 echo $(VERSION) >$(distdir)/RELEASE
132
133###--------------------------------------------------------------------------
134### Debian.
135
136EXTRA_DIST += debian/control
137EXTRA_DIST += debian/copyright
138EXTRA_DIST += debian/rules
139EXTRA_DIST += debian/changelog
b91e2391 140
ba4d97a4 141###----- That's all, folks --------------------------------------------------