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