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