]>
Commit | Line | Data |
---|---|---|
748503c8 | 1 | # Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, |
53dd8dab | 2 | # 1999, 2000, 2001, 2002, 2003 Free Software Foundation |
748503c8 NN |
3 | # |
4 | # This file is free software; you can redistribute it and/or modify | |
5 | # it under the terms of the GNU General Public License as published by | |
6 | # the Free Software Foundation; either version 2 of the License, or | |
7 | # (at your option) any later version. | |
8 | # | |
9 | # This program is distributed in the hope that it will be useful, | |
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | # GNU General Public License for more details. | |
13 | # | |
14 | # You should have received a copy of the GNU General Public License | |
15 | # along with this program; if not, write to the Free Software | |
16 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
17 | # | |
18 | ||
19 | # This Makefile contains release scripts for gdb, binutils, and other | |
20 | # packages which live in src. It used to be part of the top level Makefile, | |
21 | # but that turned out to be very messy and hard to maintain. | |
22 | ||
23 | # This stuff really ought to be cleaned up and turned into something other | |
24 | # than a Makefile. As it is it's heavily recursive. | |
25 | ||
26 | # This is the name of this script (!). Needed due to horrible recursion. | |
27 | SELF = src-release | |
28 | ||
29 | SHELL = /bin/sh | |
30 | ||
31 | BZIPPROG = bzip2 | |
32 | MD5PROG = md5sum | |
33 | ||
34 | # pwd command to use. Allow user to override default by setting PWDCMD in | |
35 | # the environment to account for automounters. The make variable must not | |
36 | # be called PWDCMD, otherwise the value set here is passed to make | |
37 | # subprocesses and overrides the setting from the user's environment. | |
38 | PWD = $${PWDCMD-pwd} | |
39 | ||
40 | # | |
41 | # Support for building net releases | |
42 | ||
43 | # Files in devo used in any net release. | |
44 | # ChangeLog omitted because it may refer to files which are not in this | |
45 | # distribution (perhaps it would be better to include it anyway). | |
46 | DEVO_SUPPORT= README Makefile.in configure configure.in \ | |
47 | config.guess config.if config.sub config move-if-change \ | |
48 | mpw-README mpw-build.in mpw-config.in mpw-configure mpw-install \ | |
49 | COPYING COPYING.LIB install-sh config-ml.in symlink-tree \ | |
50 | mkinstalldirs ltconfig ltmain.sh missing ylwrap \ | |
51 | libtool.m4 gettext.m4 ltcf-c.sh ltcf-cxx.sh ltcf-gcj.sh | |
52 | ||
53 | # Files in devo/etc used in any net release. | |
54 | # ChangeLog omitted because it may refer to files which are not in this | |
55 | # distribution (perhaps it would be better to include it anyway). | |
56 | ETC_SUPPORT= Makefile.in configure configure.in standards.texi \ | |
57 | make-stds.texi standards.info* configure.texi configure.info* \ | |
53dd8dab | 58 | configbuild.* configdev.* fdl.texi texi2pod.pl |
748503c8 NN |
59 | |
60 | ||
61 | # When you use `make setup-dirs' or `make taz' you should always redefine | |
62 | # this macro. | |
63 | SUPPORT_FILES = list-of-support-files-for-tool-in-question | |
64 | ||
65 | # NOTE: No double quotes in the below. It is used within shell script | |
66 | # as VER="$(VER)" | |
67 | VER = ` if grep 'AM_INIT_AUTOMAKE.*BFD_VERSION' $(TOOL)/configure.in >/dev/null 2>&1; then \ | |
68 | sed < bfd/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'; \ | |
69 | elif grep AM_INIT_AUTOMAKE $(TOOL)/configure.in >/dev/null 2>&1; then \ | |
70 | sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'; \ | |
71 | elif test -f $(TOOL)/version.in; then \ | |
72 | head -1 $(TOOL)/version.in; \ | |
73 | elif grep VERSION $(TOOL)/Makefile.in > /dev/null 2>&1; then \ | |
74 | sed < $(TOOL)/Makefile.in -n 's/^VERSION *= *//p'; \ | |
75 | else \ | |
76 | echo VERSION; \ | |
77 | fi` | |
78 | PACKAGE = $(TOOL) | |
79 | ||
80 | .PHONY: taz | |
81 | taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex | |
82 | $(MAKE) -f $(SELF) do-proto-toplev \ | |
83 | TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ | |
84 | MD5PROG="$(MD5PROG)" \ | |
85 | SUPPORT_FILES="$(SUPPORT_FILES)" | |
86 | $(MAKE) -f $(SELF) do-md5sum \ | |
87 | TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ | |
88 | MD5PROG="$(MD5PROG)" \ | |
89 | SUPPORT_FILES="$(SUPPORT_FILES)" | |
90 | $(MAKE) -f $(SELF) do-tar \ | |
91 | TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ | |
92 | MD5PROG="$(MD5PROG)" \ | |
93 | SUPPORT_FILES="$(SUPPORT_FILES)" | |
94 | $(MAKE) -f $(SELF) do-bz2 \ | |
95 | TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ | |
96 | MD5PROG="$(MD5PROG)" \ | |
97 | SUPPORT_FILES="$(SUPPORT_FILES)" | |
98 | ||
99 | .PHONY: gdb-tar | |
100 | gdb-tar: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex | |
101 | $(MAKE) -f $(SELF) do-proto-toplev \ | |
102 | TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ | |
103 | MD5PROG="$(MD5PROG)" \ | |
104 | SUPPORT_FILES="$(SUPPORT_FILES)" | |
105 | $(MAKE) -f $(SELF) do-md5sum \ | |
106 | TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ | |
107 | MD5PROG="$(MD5PROG)" \ | |
108 | SUPPORT_FILES="$(SUPPORT_FILES)" | |
109 | $(MAKE) -f $(SELF) do-djunpack \ | |
110 | TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ | |
111 | MD5PROG="$(MD5PROG)" \ | |
112 | SUPPORT_FILES="$(SUPPORT_FILES)" | |
113 | $(MAKE) -f $(SELF) do-tar \ | |
114 | TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ | |
115 | MD5PROG="$(MD5PROG)" \ | |
116 | SUPPORT_FILES="$(SUPPORT_FILES)" | |
117 | ||
118 | .PHONY: gdb-taz | |
119 | gdb-taz: gdb-tar $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex | |
120 | $(MAKE) -f $(SELF) gdb-tar \ | |
121 | TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ | |
122 | MD5PROG="$(MD5PROG)" \ | |
123 | SUPPORT_FILES="$(SUPPORT_FILES)" | |
124 | $(MAKE) -f $(SELF) do-bz2 \ | |
125 | TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ | |
126 | MD5PROG="$(MD5PROG)" \ | |
127 | SUPPORT_FILES="$(SUPPORT_FILES)" | |
128 | ||
129 | .PHONY: do-proto-toplev | |
130 | do-proto-toplev: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex | |
131 | echo "==> Making $(PACKAGE)-$(VER)/" | |
132 | # Take out texinfo from a few places. | |
133 | sed -e '/^all\.normal: /s/\all-texinfo //' \ | |
134 | -e '/^ install-texinfo /d' \ | |
135 | <Makefile.in >tmp | |
136 | mv -f tmp Makefile.in | |
137 | # | |
138 | ./configure sun4 | |
b4fa093e | 139 | $(MAKE) configure-host configure-target \ |
748503c8 NN |
140 | ALL_GCC="" ALL_GCC_C="" ALL_GCC_CXX="" \ |
141 | CC_FOR_TARGET="$(CC)" CXX_FOR_TARGET="$(CXX)" | |
142 | # Make links, and run "make diststuff" or "make info" when needed. | |
143 | rm -rf proto-toplev ; mkdir proto-toplev | |
144 | set -e ; dirs="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \ | |
145 | for d in $$dirs ; do \ | |
146 | if [ -d $$d ]; then \ | |
147 | if [ ! -f $$d/Makefile ] ; then true ; \ | |
148 | elif grep '^diststuff:' $$d/Makefile >/dev/null ; then \ | |
149 | (cd $$d ; $(MAKE) diststuff ) || exit 1 ; \ | |
150 | elif grep '^info:' $$d/Makefile >/dev/null ; then \ | |
151 | (cd $$d ; $(MAKE) info ) || exit 1 ; \ | |
152 | fi ; \ | |
153 | if [ -d $$d/proto-$$d.dir ]; then \ | |
154 | ln -s ../$$d/proto-$$d.dir proto-toplev/$$d ; \ | |
155 | else \ | |
156 | ln -s ../$$d proto-toplev/$$d ; \ | |
157 | fi ; \ | |
158 | else ln -s ../$$d proto-toplev/$$d ; fi ; \ | |
159 | done | |
160 | cd etc && $(MAKE) info | |
161 | $(MAKE) distclean | |
162 | # | |
163 | mkdir proto-toplev/etc | |
164 | (cd proto-toplev/etc; \ | |
165 | for i in $(ETC_SUPPORT); do \ | |
166 | ln -s ../../etc/$$i . ; \ | |
167 | done) | |
168 | # | |
169 | # Take out texinfo from configurable dirs | |
170 | rm proto-toplev/configure.in | |
171 | sed -e '/^host_tools=/s/texinfo //' \ | |
172 | <configure.in >proto-toplev/configure.in | |
173 | # | |
174 | mkdir proto-toplev/texinfo | |
175 | ln -s ../../texinfo/texinfo.tex proto-toplev/texinfo/ | |
176 | if test -r texinfo/util/tex3patch ; then \ | |
177 | mkdir proto-toplev/texinfo/util && \ | |
178 | ln -s ../../../texinfo/util/tex3patch proto-toplev/texinfo/util ; \ | |
179 | else true; fi | |
180 | chmod -R og=u . || chmod og=u `find . -print` | |
181 | # | |
182 | # Create .gmo files from .po files. | |
183 | for f in `find . -name '*.po' -type f -print`; do \ | |
184 | msgfmt -o `echo $$f | sed -e 's/\.po$$/.gmo/'` $$f ; \ | |
185 | done | |
186 | # | |
187 | -rm -f $(PACKAGE)-$(VER) | |
188 | ln -s proto-toplev $(PACKAGE)-$(VER) | |
189 | ||
190 | .PHONY: do-tar | |
191 | do-tar: | |
192 | echo "==> Making $(PACKAGE)-$(VER).tar" | |
193 | -rm -f $(PACKAGE)-$(VER).tar | |
194 | find $(PACKAGE)-$(VER) -follow -name CVS -prune -o -type f -print \ | |
195 | | tar cTfh - $(PACKAGE)-$(VER).tar | |
196 | ||
197 | .PHONY: do-bz2 | |
198 | do-bz2: | |
199 | echo "==> Bzipping $(PACKAGE)-$(VER).tar.bz2" | |
200 | -rm -f $(PACKAGE)-$(VER).tar.bz2 | |
201 | $(BZIPPROG) -v -9 $(PACKAGE)-$(VER).tar | |
202 | ||
203 | .PHONY: do-md5sum | |
204 | do-md5sum: | |
205 | echo "==> Adding md5 checksum to top-level directory" | |
206 | cd proto-toplev && find * -follow -name CVS -prune -o -type f -print \ | |
207 | | xargs $(MD5PROG) > ../md5.sum | |
208 | mv md5.sum proto-toplev | |
209 | ||
210 | .PHONY: do-djunpack | |
211 | do-djunpack: | |
212 | echo "==> Adding updated djunpack.bat to top-level directory" | |
213 | echo - 's /gdb-[0-9\.]*/gdb-'"$(VER)"'/' | |
214 | sed < djunpack.bat > djunpack.new \ | |
215 | -e 's/gdb-[0-9][0-9\.]*/gdb-'"$(VER)"'/' | |
216 | mv djunpack.new djunpack.bat | |
217 | -rm -f proto-toplev/djunpack.bat | |
218 | ln -s ../djunpack.bat proto-toplev/djunpack.bat | |
219 | ||
220 | TEXINFO_SUPPORT= texinfo/texinfo.tex | |
221 | DIST_SUPPORT= $(DEVO_SUPPORT) $(TEXINFO_SUPPORT) | |
222 | ||
223 | .PHONY: gas.tar.bz2 | |
224 | GAS_SUPPORT_DIRS= bfd include libiberty opcodes intl setup.com makefile.vms mkdep | |
225 | gas.tar.bz2: $(DIST_SUPPORT) $(GAS_SUPPORT_DIRS) gas | |
226 | $(MAKE) -f $(SELF) taz TOOL=gas \ | |
227 | MD5PROG="$(MD5PROG)" \ | |
228 | SUPPORT_FILES="$(GAS_SUPPORT_DIRS)" | |
229 | ||
230 | # The FSF "binutils" release includes gprof and ld. | |
231 | .PHONY: binutils.tar.bz2 | |
7aa673ed | 232 | BINUTILS_SUPPORT_DIRS= bfd gas include libiberty opcodes ld gprof intl setup.com makefile.vms mkdep cpu |
748503c8 NN |
233 | binutils.tar.bz2: $(DIST_SUPPORT) $(BINUTILS_SUPPORT_DIRS) binutils |
234 | $(MAKE) -f $(SELF) taz TOOL=binutils \ | |
235 | MD5PROG="$(MD5PROG)" \ | |
236 | SUPPORT_FILES="$(BINUTILS_SUPPORT_DIRS)" | |
237 | ||
238 | .PHONY: gas+binutils.tar.bz2 | |
239 | GASB_SUPPORT_DIRS= $(GAS_SUPPORT_DIRS) binutils ld gprof | |
240 | gas+binutils.tar.bz2: $(DIST_SUPPORT) $(GASB_SUPPORT_DIRS) gas | |
241 | $(MAKE) -f $(SELF) taz TOOL=gas \ | |
242 | MD5PROG="$(MD5PROG)" \ | |
243 | SUPPORT_FILES="$(GASB_SUPPORT_DIRS)" | |
244 | ||
245 | GNATS_SUPPORT_DIRS=include libiberty send-pr | |
246 | gnats.tar.bz2: $(DIST_SUPPORT) $(GNATS_SUPPORT_DIRS) gnats | |
247 | $(MAKE) -f $(SELF) taz TOOL=gnats \ | |
248 | MD5PROG="$(MD5PROG)" \ | |
249 | SUPPORT_FILES="$(GNATS_SUPPORT_DIRS)" | |
250 | ||
251 | .PHONY: gdb.tar.bz2 | |
252 | GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline sim utils intl | |
253 | gdb.tar.bz2: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb | |
254 | $(MAKE) -f $(SELF) gdb-taz TOOL=gdb \ | |
255 | MD5PROG="$(MD5PROG)" \ | |
256 | SUPPORT_FILES="$(GDB_SUPPORT_DIRS)" | |
257 | .PHONY: gdb.tar | |
258 | gdb.tar: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb | |
259 | $(MAKE) -f $(SELF) gdb-tar TOOL=gdb \ | |
260 | MD5PROG="$(MD5PROG)" \ | |
261 | SUPPORT_FILES="$(GDB_SUPPORT_DIRS)" | |
262 | ||
263 | DEJAGNU_SUPPORT_DIRS= tcl expect libiberty | |
264 | .PHONY: dejagnu.tar.bz2 | |
265 | dejagnu.tar.bz2: $(DIST_SUPPORT) $(DEJAGNU_SUPPORT_DIRS) dejagnu | |
266 | $(MAKE) -f $(SELF) taz TOOL=dejagnu \ | |
267 | MD5PROG="$(MD5PROG)" \ | |
268 | SUPPORT_FILES="$(DEJAGNU_SUPPORT_DIRS)" | |
269 | ||
270 | .PHONY: gdb+dejagnu.tar.bz2 | |
271 | GDBD_SUPPORT_DIRS= $(GDB_SUPPORT_DIRS) tcl expect dejagnu | |
272 | gdb+dejagnu.tar.bz2: $(DIST_SUPPORT) $(GDBD_SUPPORT_DIRS) gdb | |
273 | $(MAKE) -f $(SELF) gdb-taz TOOL=gdb PACKAGE=gdb+dejagnu \ | |
274 | MD5PROG="$(MD5PROG)" \ | |
275 | SUPPORT_FILES="$(GDBD_SUPPORT_DIRS)" | |
276 | .PHONY: gdb+dejagnu.tar | |
277 | gdb+dejagnu.tar: $(DIST_SUPPORT) $(GDBD_SUPPORT_DIRS) gdb | |
278 | $(MAKE) -f $(SELF) gdb-tar TOOL=gdb PACKAGE=gdb+dejagnu \ | |
279 | MD5PROG="$(MD5PROG)" \ | |
280 | SUPPORT_FILES="$(GDBD_SUPPORT_DIRS)" | |
281 | ||
282 | .PHONY: insight.tar.bz2 | |
283 | INSIGHT_SUPPORT_DIRS= $(GDB_SUPPORT_DIRS) tcl tk itcl tix libgui | |
284 | insight.tar.bz2: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb | |
285 | $(MAKE) -f $(SELF) gdb-taz TOOL=gdb PACKAGE=insight \ | |
286 | MD5PROG="$(MD5PROG)" \ | |
287 | SUPPORT_FILES="$(INSIGHT_SUPPORT_DIRS)" | |
288 | .PHONY: insight.tar | |
289 | insight.tar: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb | |
290 | $(MAKE) -f $(SELF) gdb-tar TOOL=gdb PACKAGE=insight \ | |
291 | MD5PROG="$(MD5PROG)" \ | |
292 | SUPPORT_FILES="$(INSIGHT_SUPPORT_DIRS)" | |
293 | ||
294 | .PHONY: insight+dejagnu.tar.bz2 | |
295 | INSIGHTD_SUPPORT_DIRS= $(INSIGHT_SUPPORT_DIRS) expect dejagnu | |
296 | insight+dejagnu.tar.bz2: $(DIST_SUPPORT) $(INSIGHTD_SUPPORT_DIRS) gdb | |
297 | $(MAKE) -f $(SELF) gdb-taz TOOL=gdb PACKAGE="insight+dejagnu" \ | |
298 | MD5PROG="$(MD5PROG)" \ | |
299 | SUPPORT_FILES="$(INSIGHTD_SUPPORT_DIRS)" | |
300 | .PHONY: insight+dejagnu.tar | |
301 | insight+dejagnu.tar: $(DIST_SUPPORT) $(INSIGHTD_SUPPORT_DIRS) gdb | |
302 | $(MAKE) -f $(SELF) gdb-tar TOOL=gdb PACKAGE="insight+dejagnu" \ | |
303 | MD5PROG="$(MD5PROG)" \ | |
304 | SUPPORT_FILES="$(INSIGHTD_SUPPORT_DIRS)" | |
305 | ||
306 | .PHONY: newlib.tar.bz2 | |
307 | NEWLIB_SUPPORT_DIRS=libgloss | |
308 | # taz configures for the sun4 target which won't configure newlib. | |
309 | # We need newlib configured so that the .info files are made. | |
310 | # Unfortunately, it is not enough to just configure newlib separately: | |
311 | # taz will build the .info files but since SUBDIRS won't contain newlib, | |
312 | # distclean won't be run (leaving Makefile, config.status, and the tmp files | |
313 | # used in building the .info files, eg: *.def, *.ref). | |
314 | # The problem isn't solvable however without a lot of extra work because | |
315 | # target libraries are built in subdir $(target_alias) which gets nuked during | |
316 | # the make distclean. For now punt on the issue of shipping newlib info files | |
317 | # with newlib net releases and wait for a day when some native target (sun4?) | |
318 | # supports newlib (if only minimally). | |
319 | newlib.tar.bz2: $(DIST_SUPPORT) $(NEWLIB_SUPPORT_DIRS) newlib | |
320 | $(MAKE) -f $(SELF) taz TOOL=newlib \ | |
321 | MD5PROG="$(MD5PROG)" \ | |
322 | SUPPORT_FILES="$(NEWLIB_SUPPORT_DIRS)" \ | |
323 | DEVO_SUPPORT="$(DEVO_SUPPORT) COPYING.NEWLIB" newlib | |
324 | ||
325 | .NOEXPORT: | |
326 | MAKEOVERRIDES= |