Commit | Line | Data |
---|---|---|
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') | |
fcc208c5 | 11 | ### |
ba4d97a4 MW |
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. | |
fcc208c5 | 16 | ### |
ba4d97a4 MW |
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. | |
fcc208c5 | 21 | ### |
ba4d97a4 MW |
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 = | |
1822e5ee | 28 | dist_pkgdata_SCRIPTS = |
ba4d97a4 | 29 | pkgdata_DATA = |
1822e5ee | 30 | dist_pkgdata_DATA = |
ba4d97a4 MW |
31 | |
32 | EXTRA_DIST = | |
33 | CLEANFILES = | |
34 | ||
35 | ###-------------------------------------------------------------------------- | |
36 | ### Handy variables. | |
37 | ||
cac38f7f | 38 | confsubst = $(srcdir)/confsubst.in |
ba4d97a4 MW |
39 | mkdir_p = $(srcdir)/config/install-sh -d |
40 | ||
262cdcea MW |
41 | V_SUBST = $(V_SUBST_@AM_V@) |
42 | V_SUBST_ = $(V_SUBST_@AM_DEFAULT_V@) | |
43 | V_SUBST_0 = @echo " SUBST $@"; | |
6888a158 MW |
44 | SUBST = $(V_SUBST)$(confsubst) |
45 | ||
ba4d97a4 MW |
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 | |
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 | |
61 | bin_SCRIPTS += findlinks | |
62 | CLEANFILES += findlinks | |
63 | EXTRA_DIST += findlinks.in | |
64 | ||
65 | findlinks: 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 | |
72 | bin_SCRIPTS += mdw-setup | |
73 | EXTRA_DIST += mdw-setup | |
74 | ||
75 | ###-------------------------------------------------------------------------- | |
76 | ### Files to install. | |
1f79a056 | 77 | |
ba4d97a4 | 78 | ## Licences. |
eb4ac913 MW |
79 | dist_pkgdata_DATA += GPL-1 GPL-2 GPL-3 |
80 | dist_pkgdata_DATA += LGPL-2 LGPL-2.1 LGPL-3 | |
81 | dist_pkgdata_DATA += AGPL-3 | |
60e6fde8 MW |
82 | dist_pkgdata_DATA += gpl-2.0.tex gpl-2.0.texi |
83 | dist_pkgdata_DATA += lgpl-2.0.tex lgpl-2.0.texi | |
84 | dist_pkgdata_DATA += lgpl-2.1.tex lgpl-2.1.texi | |
85 | dist_pkgdata_DATA += gpl-3.0.tex gpl-3.0.texi | |
86 | dist_pkgdata_DATA += lgpl-3.0.tex lgpl-3.0.texi | |
87 | dist_pkgdata_DATA += agpl-3.0.tex agpl-3.0.texi | |
ba4d97a4 | 88 | |
eb4ac913 MW |
89 | install-data-hook:: |
90 | cd $(DESTDIR)$(pkgdatadir) && $(LN_S) -f GPL-2 COPYING | |
91 | cd $(DESTDIR)$(pkgdatadir) && $(LN_S) -f LGPL-2 COPYING.LIB | |
60e6fde8 MW |
92 | cd $(DESTDIR)$(pkgdatadir) && $(LN_S) -f gpl-2.0.tex gpl.tex |
93 | cd $(DESTDIR)$(pkgdatadir) && $(LN_S) -f lgpl-2.0.tex lgpl.tex | |
94 | cd $(DESTDIR)$(pkgdatadir) && $(LN_S) -f gpl-2.0.texi gpl.texi | |
95 | cd $(DESTDIR)$(pkgdatadir) && $(LN_S) -f lgpl-2.0.texi lgpl.texi | |
eb4ac913 | 96 | |
ae04071b MW |
97 | uninstall-hook:: |
98 | cd $(DESTDIR)$(pkgdatadir) && rm -f COPYING COPYING.LIB | |
60e6fde8 MW |
99 | cd $(DESTDIR)$(pkgdatadir) && \ |
100 | rm -f gpl.tex gpl.texi lgpl.tex lgpl.texi | |
ae04071b | 101 | |
ba4d97a4 | 102 | ## Documentation. |
1822e5ee MW |
103 | dist_pkgdata_DATA += INSTALL |
104 | dist_pkgdata_DATA += texinice.tex | |
ba4d97a4 MW |
105 | |
106 | ## Useful code. | |
1822e5ee MW |
107 | dist_pkgdata_DATA += mdwopt.c mdwopt.h |
108 | dist_pkgdata_DATA += getdate.y getdate.h | |
ba4d97a4 MW |
109 | |
110 | ## Scripts. | |
1822e5ee MW |
111 | dist_pkgdata_SCRIPTS += install-ac |
112 | dist_pkgdata_SCRIPTS += maninst | |
cac38f7f | 113 | |
a6bb85c1 | 114 | ## Python support stuff. |
1a7628a4 MW |
115 | dist_pkgdata_DATA += mdwsetup.py |
116 | dist_pkgdata_DATA += pysetup.mk | |
a6bb85c1 | 117 | |
cac38f7f | 118 | ## confsubst |
ba4d97a4 | 119 | pkgdata_SCRIPTS += confsubst |
cac38f7f MW |
120 | CLEANFILES += confsubst |
121 | EXTRA_DIST += confsubst.in | |
122 | ||
123 | confsubst: confsubst.in Makefile | |
6888a158 MW |
124 | $(SUBST) $(srcdir)/confsubst.in >$@.new VERSION=$(VERSION) |
125 | $(AM_V_at)chmod +x $@.new | |
126 | $(AM_V_at)mv $@.new $@ | |
ba4d97a4 | 127 | |
d9b245f4 MW |
128 | ## auto-version |
129 | pkgdata_SCRIPTS += auto-version | |
130 | CLEANFILES += auto-version | |
131 | EXTRA_DIST += auto-version.in | |
132 | ||
133 | auto-version: auto-version.in Makefile | |
6888a158 MW |
134 | $(SUBST) $(srcdir)/auto-version.in >$@.new VERSION=$(VERSION) |
135 | $(AM_V_at)chmod +x $@.new | |
136 | $(AM_V_at)mv $@.new $@ | |
d9b245f4 | 137 | |
74c50df9 | 138 | ## Testsuites. |
1822e5ee MW |
139 | dist_pkgdata_DATA += autotest.am |
140 | dist_pkgdata_DATA += testsuite.at | |
ba4d97a4 MW |
141 | |
142 | ## Autoconf snippets. | |
143 | EXTRA_DIST += aclocal.glob | |
144 | ||
145 | install-data-hook:: | |
146 | $(mkdir_p) $(DESTDIR)$(aclocaldir) | |
68bd460a | 147 | $(srcdir)/install-ac install \ |
148 | $(srcdir)/aclocal.glob $(DESTDIR)$(aclocaldir) | |
ba4d97a4 MW |
149 | |
150 | uninstall-hook:: | |
68bd460a | 151 | $(srcdir)/install-ac rm \ |
152 | $(srcdir)/aclocal.glob $(DESTDIR)$(aclocaldir) | |
a7855629 | 153 | |
ba4d97a4 MW |
154 | ###-------------------------------------------------------------------------- |
155 | ### Documentation. | |
b91e2391 | 156 | |
d7b9d12c | 157 | info_TEXINFOS = common.texi |
b91e2391 | 158 | |
ba4d97a4 MW |
159 | ###-------------------------------------------------------------------------- |
160 | ### Other special tweaks. | |
161 | ||
162 | ## Make `make distcheck' work. | |
163 | DISTCHECK_CONFIGURE_FLAGS = \ | |
164 | --with-aclocaldir='$${prefix}/share/aclocal' | |
165 | ||
166 | ## Distribute the release number. | |
167 | dist-hook:: | |
168 | echo $(VERSION) >$(distdir)/RELEASE | |
169 | ||
170 | ###-------------------------------------------------------------------------- | |
171 | ### Debian. | |
172 | ||
657c7546 | 173 | EXTRA_DIST += debian/compat |
ba4d97a4 MW |
174 | EXTRA_DIST += debian/control |
175 | EXTRA_DIST += debian/copyright | |
176 | EXTRA_DIST += debian/rules | |
177 | EXTRA_DIST += debian/changelog | |
1759269d | 178 | EXTRA_DIST += debian/source/format |
b91e2391 | 179 | |
ba4d97a4 | 180 | ###----- That's all, folks -------------------------------------------------- |