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