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') | |
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 | ||
cac38f7f | 36 | confsubst = $(srcdir)/confsubst.in |
ba4d97a4 MW |
37 | mkdir_p = $(srcdir)/config/install-sh -d |
38 | ||
6888a158 MW |
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 | ||
ba4d97a4 MW |
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 | |
6888a158 | 53 | $(SUBST) $(srcdir)/mklinks.in >$@.new \ |
ba4d97a4 | 54 | pkgdatadir=$(pkgdatadir) VERSION=$(VERSION) |
6888a158 MW |
55 | $(AM_V_at)chmod +x $@.new |
56 | $(AM_V_at)mv $@.new $@ | |
ba4d97a4 MW |
57 | |
58 | ## findlinks | |
59 | bin_SCRIPTS += findlinks | |
60 | CLEANFILES += findlinks | |
61 | EXTRA_DIST += findlinks.in | |
62 | ||
63 | findlinks: findlinks.in Makefile | |
6888a158 | 64 | $(SUBST) $(srcdir)/findlinks.in >$@.new \ |
ba4d97a4 | 65 | pkgdatadir=$(pkgdatadir) VERSION=$(VERSION) |
6888a158 MW |
66 | $(AM_V_at)chmod +x $@.new |
67 | $(AM_V_at)mv $@.new $@ | |
ba4d97a4 MW |
68 | |
69 | ## mdw-setup | |
70 | bin_SCRIPTS += mdw-setup | |
71 | EXTRA_DIST += mdw-setup | |
72 | ||
73 | ###-------------------------------------------------------------------------- | |
74 | ### Files to install. | |
1f79a056 | 75 | |
ba4d97a4 MW |
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 | |
cac38f7f | 91 | |
a6bb85c1 MW |
92 | ## Python support stuff. |
93 | pkgdata_SCRIPTS += mdwsetup.py | |
94 | ||
cac38f7f | 95 | ## confsubst |
ba4d97a4 | 96 | pkgdata_SCRIPTS += confsubst |
cac38f7f MW |
97 | CLEANFILES += confsubst |
98 | EXTRA_DIST += confsubst.in | |
99 | ||
100 | confsubst: confsubst.in Makefile | |
6888a158 MW |
101 | $(SUBST) $(srcdir)/confsubst.in >$@.new VERSION=$(VERSION) |
102 | $(AM_V_at)chmod +x $@.new | |
103 | $(AM_V_at)mv $@.new $@ | |
ba4d97a4 | 104 | |
d9b245f4 MW |
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 | |
6888a158 MW |
111 | $(SUBST) $(srcdir)/auto-version.in >$@.new VERSION=$(VERSION) |
112 | $(AM_V_at)chmod +x $@.new | |
113 | $(AM_V_at)mv $@.new $@ | |
d9b245f4 | 114 | |
74c50df9 MW |
115 | ## Testsuites. |
116 | pkgdata_DATA += autotest.am | |
117 | pkgdata_DATA += testsuite.at | |
118 | ||
ba4d97a4 MW |
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) | |
68bd460a | 127 | $(srcdir)/install-ac install \ |
128 | $(srcdir)/aclocal.glob $(DESTDIR)$(aclocaldir) | |
ba4d97a4 MW |
129 | |
130 | uninstall-hook:: | |
68bd460a | 131 | $(srcdir)/install-ac rm \ |
132 | $(srcdir)/aclocal.glob $(DESTDIR)$(aclocaldir) | |
a7855629 | 133 | |
ba4d97a4 MW |
134 | ###-------------------------------------------------------------------------- |
135 | ### Documentation. | |
b91e2391 | 136 | |
137 | info_TEXINFOS = common.texi | |
138 | ||
ba4d97a4 MW |
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 | |
b91e2391 | 157 | |
ba4d97a4 | 158 | ###----- That's all, folks -------------------------------------------------- |