Makefile.am: Ship `debian/compat'.
[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 =
1822e5ee 28dist_pkgdata_SCRIPTS =
ba4d97a4 29pkgdata_DATA =
1822e5ee 30dist_pkgdata_DATA =
ba4d97a4
MW
31
32EXTRA_DIST =
33CLEANFILES =
34
35###--------------------------------------------------------------------------
36### Handy variables.
37
cac38f7f 38confsubst = $(srcdir)/confsubst.in
ba4d97a4
MW
39mkdir_p = $(srcdir)/config/install-sh -d
40
6888a158
MW
41V_SUBST = $(V_SUBST_$(V))
42V_SUBST_ = $(V_SUBST_$(AM_DEFAULT_VERBOSITY))
43V_SUBST_0 = @echo " SUBST $@";
44SUBST = $(V_SUBST)$(confsubst)
45
ba4d97a4
MW
46###--------------------------------------------------------------------------
47### Main scripts.
48
49## mklinks
50bin_SCRIPTS += mklinks
51CLEANFILES += mklinks
52EXTRA_DIST += mklinks.in
53
54mklinks: mklinks.in Makefile
6888a158 55 $(SUBST) $(srcdir)/mklinks.in >$@.new \
ba4d97a4 56 pkgdatadir=$(pkgdatadir) VERSION=$(VERSION)
6888a158
MW
57 $(AM_V_at)chmod +x $@.new
58 $(AM_V_at)mv $@.new $@
ba4d97a4
MW
59
60## findlinks
61bin_SCRIPTS += findlinks
62CLEANFILES += findlinks
63EXTRA_DIST += findlinks.in
64
65findlinks: findlinks.in Makefile
6888a158 66 $(SUBST) $(srcdir)/findlinks.in >$@.new \
ba4d97a4 67 pkgdatadir=$(pkgdatadir) VERSION=$(VERSION)
6888a158
MW
68 $(AM_V_at)chmod +x $@.new
69 $(AM_V_at)mv $@.new $@
ba4d97a4
MW
70
71## mdw-setup
72bin_SCRIPTS += mdw-setup
73EXTRA_DIST += mdw-setup
74
75###--------------------------------------------------------------------------
76### Files to install.
1f79a056 77
ba4d97a4 78## Licences.
1822e5ee
MW
79dist_pkgdata_DATA += COPYING COPYING.LIB
80dist_pkgdata_DATA += gpl.tex lgpl.tex gpl.texi lgpl.texi
ba4d97a4
MW
81
82## Documentation.
1822e5ee
MW
83dist_pkgdata_DATA += INSTALL
84dist_pkgdata_DATA += texinice.tex
ba4d97a4
MW
85
86## Useful code.
1822e5ee
MW
87dist_pkgdata_DATA += mdwopt.c mdwopt.h
88dist_pkgdata_DATA += getdate.y getdate.h
ba4d97a4
MW
89
90## Scripts.
1822e5ee
MW
91dist_pkgdata_SCRIPTS += install-ac
92dist_pkgdata_SCRIPTS += maninst
cac38f7f 93
a6bb85c1 94## Python support stuff.
1822e5ee 95dist_pkgdata_SCRIPTS += mdwsetup.py
a6bb85c1 96
cac38f7f 97## confsubst
ba4d97a4 98pkgdata_SCRIPTS += confsubst
cac38f7f
MW
99CLEANFILES += confsubst
100EXTRA_DIST += confsubst.in
101
102confsubst: confsubst.in Makefile
6888a158
MW
103 $(SUBST) $(srcdir)/confsubst.in >$@.new VERSION=$(VERSION)
104 $(AM_V_at)chmod +x $@.new
105 $(AM_V_at)mv $@.new $@
ba4d97a4 106
d9b245f4
MW
107## auto-version
108pkgdata_SCRIPTS += auto-version
109CLEANFILES += auto-version
110EXTRA_DIST += auto-version.in
111
112auto-version: auto-version.in Makefile
6888a158
MW
113 $(SUBST) $(srcdir)/auto-version.in >$@.new VERSION=$(VERSION)
114 $(AM_V_at)chmod +x $@.new
115 $(AM_V_at)mv $@.new $@
d9b245f4 116
74c50df9 117## Testsuites.
1822e5ee
MW
118dist_pkgdata_DATA += autotest.am
119dist_pkgdata_DATA += testsuite.at
ba4d97a4
MW
120
121## Autoconf snippets.
122EXTRA_DIST += aclocal.glob
123
124install-data-hook::
125 $(mkdir_p) $(DESTDIR)$(aclocaldir)
68bd460a 126 $(srcdir)/install-ac install \
127 $(srcdir)/aclocal.glob $(DESTDIR)$(aclocaldir)
ba4d97a4
MW
128
129uninstall-hook::
68bd460a 130 $(srcdir)/install-ac rm \
131 $(srcdir)/aclocal.glob $(DESTDIR)$(aclocaldir)
a7855629 132
ba4d97a4
MW
133###--------------------------------------------------------------------------
134### Documentation.
b91e2391 135
136info_TEXINFOS = common.texi
137
ba4d97a4
MW
138###--------------------------------------------------------------------------
139### Other special tweaks.
140
141## Make `make distcheck' work.
142DISTCHECK_CONFIGURE_FLAGS = \
143 --with-aclocaldir='$${prefix}/share/aclocal'
144
145## Distribute the release number.
146dist-hook::
147 echo $(VERSION) >$(distdir)/RELEASE
148
149###--------------------------------------------------------------------------
150### Debian.
151
657c7546 152EXTRA_DIST += debian/compat
ba4d97a4
MW
153EXTRA_DIST += debian/control
154EXTRA_DIST += debian/copyright
155EXTRA_DIST += debian/rules
156EXTRA_DIST += debian/changelog
b91e2391 157
ba4d97a4 158###----- That's all, folks --------------------------------------------------