This fixes a few issues with pe/coff build-ids that were discovered since the
[deliverable/binutils-gdb.git] / src-release
CommitLineData
748503c8 1# Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
72bbedde 2# 1999, 2000, 2001, 2002, 2003, 2004 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
6e4d0bcb 16# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
748503c8
NN
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.
27SELF = src-release
28
29SHELL = /bin/sh
30
31BZIPPROG = bzip2
32MD5PROG = md5sum
33
25aae7f2
DJ
34# (Default to avoid splitting info files by setting the threshold high.)
35MAKEINFOFLAGS = --split-size=5000000
36
748503c8
NN
37# pwd command to use. Allow user to override default by setting PWDCMD in
38# the environment to account for automounters. The make variable must not
39# be called PWDCMD, otherwise the value set here is passed to make
40# subprocesses and overrides the setting from the user's environment.
41PWD = $${PWDCMD-pwd}
42
43#
44# Support for building net releases
45
46# Files in devo used in any net release.
c6b750e1 47DEVO_SUPPORT= README Makefile.in configure configure.ac \
73fb7068 48 config.guess config.sub config move-if-change \
748503c8 49 COPYING COPYING.LIB install-sh config-ml.in symlink-tree \
37ad9514 50 mkinstalldirs ltmain.sh missing ylwrap \
184d813c 51 libtool.m4 ltsugar.m4 ltversion.m4 ltoptions.m4 \
d6f99447 52 Makefile.def Makefile.tpl src-release config.rpath \
03c2f9e6
DJ
53 ChangeLog MAINTAINERS README-maintainer-mode \
54 lt~obsolete.m4 ltgcc.m4 depcomp mkdep compile \
d6f99447 55 COPYING3 COPYING3.LIB
748503c8
NN
56
57# Files in devo/etc used in any net release.
748503c8
NN
58ETC_SUPPORT= Makefile.in configure configure.in standards.texi \
59 make-stds.texi standards.info* configure.texi configure.info* \
ac7bcd26 60 ChangeLog configbuild.* configdev.* fdl.texi texi2pod.pl gnu-oids.texi
748503c8
NN
61
62
63# When you use `make setup-dirs' or `make taz' you should always redefine
64# this macro.
65SUPPORT_FILES = list-of-support-files-for-tool-in-question
66
67# NOTE: No double quotes in the below. It is used within shell script
68# as VER="$(VER)"
69VER = ` if grep 'AM_INIT_AUTOMAKE.*BFD_VERSION' $(TOOL)/configure.in >/dev/null 2>&1; then \
4f778543 70 bfd/configure --version | sed -n -e '1s,.* ,,p'; \
748503c8
NN
71 elif grep AM_INIT_AUTOMAKE $(TOOL)/configure.in >/dev/null 2>&1; then \
72 sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'; \
7539e41e
JB
73 elif test -f $(TOOL)/common/create-version.sh; then \
74 $(TOOL)/common/create-version.sh $(TOOL) \
75 'dummy-host' 'dummy-target' \
76 VER.tmp; \
f006cabd 77 cat VER.tmp | grep 'version\[\]' | sed 's/.*"\([^"]*\)".*/\1/' | sed 's/-cvs$$//'; \
7539e41e 78 rm -f VER.tmp; \
748503c8
NN
79 elif test -f $(TOOL)/version.in; then \
80 head -1 $(TOOL)/version.in; \
81 elif grep VERSION $(TOOL)/Makefile.in > /dev/null 2>&1; then \
82 sed < $(TOOL)/Makefile.in -n 's/^VERSION *= *//p'; \
83 else \
84 echo VERSION; \
85 fi`
86PACKAGE = $(TOOL)
87
88.PHONY: taz
89taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex
90 $(MAKE) -f $(SELF) do-proto-toplev \
91 TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
92 MD5PROG="$(MD5PROG)" \
93 SUPPORT_FILES="$(SUPPORT_FILES)"
94 $(MAKE) -f $(SELF) do-md5sum \
95 TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
96 MD5PROG="$(MD5PROG)" \
97 SUPPORT_FILES="$(SUPPORT_FILES)"
98 $(MAKE) -f $(SELF) do-tar \
99 TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
100 MD5PROG="$(MD5PROG)" \
101 SUPPORT_FILES="$(SUPPORT_FILES)"
102 $(MAKE) -f $(SELF) do-bz2 \
103 TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
104 MD5PROG="$(MD5PROG)" \
105 SUPPORT_FILES="$(SUPPORT_FILES)"
106
107.PHONY: gdb-tar
108gdb-tar: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex
109 $(MAKE) -f $(SELF) do-proto-toplev \
110 TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
111 MD5PROG="$(MD5PROG)" \
112 SUPPORT_FILES="$(SUPPORT_FILES)"
113 $(MAKE) -f $(SELF) do-md5sum \
114 TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
115 MD5PROG="$(MD5PROG)" \
116 SUPPORT_FILES="$(SUPPORT_FILES)"
117 $(MAKE) -f $(SELF) do-djunpack \
118 TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
119 MD5PROG="$(MD5PROG)" \
120 SUPPORT_FILES="$(SUPPORT_FILES)"
121 $(MAKE) -f $(SELF) do-tar \
122 TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
123 MD5PROG="$(MD5PROG)" \
124 SUPPORT_FILES="$(SUPPORT_FILES)"
125
126.PHONY: gdb-taz
127gdb-taz: gdb-tar $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex
128 $(MAKE) -f $(SELF) gdb-tar \
129 TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
130 MD5PROG="$(MD5PROG)" \
131 SUPPORT_FILES="$(SUPPORT_FILES)"
132 $(MAKE) -f $(SELF) do-bz2 \
133 TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \
134 MD5PROG="$(MD5PROG)" \
135 SUPPORT_FILES="$(SUPPORT_FILES)"
136
137.PHONY: do-proto-toplev
138do-proto-toplev: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex
139 echo "==> Making $(PACKAGE)-$(VER)/"
140 # Take out texinfo from a few places.
141 sed -e '/^all\.normal: /s/\all-texinfo //' \
142 -e '/^ install-texinfo /d' \
143 <Makefile.in >tmp
144 mv -f tmp Makefile.in
145 #
72bbedde 146 ./configure i686-pc-linux-gnu
b4fa093e 147 $(MAKE) configure-host configure-target \
748503c8
NN
148 ALL_GCC="" ALL_GCC_C="" ALL_GCC_CXX="" \
149 CC_FOR_TARGET="$(CC)" CXX_FOR_TARGET="$(CXX)"
150 # Make links, and run "make diststuff" or "make info" when needed.
151 rm -rf proto-toplev ; mkdir proto-toplev
91506736 152 set -e ; dirs="$(DEVO_SUPPORT) $(SUPPORT_FILES) $(TOOL)" ; \
748503c8
NN
153 for d in $$dirs ; do \
154 if [ -d $$d ]; then \
155 if [ ! -f $$d/Makefile ] ; then true ; \
156 elif grep '^diststuff:' $$d/Makefile >/dev/null ; then \
25aae7f2
DJ
157 (cd $$d ; $(MAKE) MAKEINFOFLAGS="$(MAKEINFOFLAGS)" \
158 diststuff ) || exit 1 ; \
748503c8 159 elif grep '^info:' $$d/Makefile >/dev/null ; then \
25aae7f2
DJ
160 (cd $$d ; $(MAKE) MAKEINFOFLAGS="$(MAKEINFOFLAGS)" \
161 info ) || exit 1 ; \
748503c8
NN
162 fi ; \
163 if [ -d $$d/proto-$$d.dir ]; then \
164 ln -s ../$$d/proto-$$d.dir proto-toplev/$$d ; \
165 else \
166 ln -s ../$$d proto-toplev/$$d ; \
167 fi ; \
b50d7605
HPN
168 else \
169 if (echo x$$d | grep / >/dev/null); then \
170 mkdir -p proto-toplev/`dirname $$d` ; \
171 x=`dirname $$d` ; \
172 ln -s ../`echo $$x/ | sed -e 's,[^/]*/,../,g'`$$d proto-toplev/$$d ; \
173 else \
174 ln -s ../$$d proto-toplev/$$d ; \
175 fi ; \
176 fi ; \
748503c8 177 done
25aae7f2 178 cd etc && $(MAKE) MAKEINFOFLAGS="$(MAKEINFOFLAGS)" info
748503c8 179 $(MAKE) distclean
d9a35680
MC
180 # Kludge for pr gdb/857. intl/Makefile.in lacks a couple
181 # of files in the distclean rule. Zack W is planning to make
182 # the gcc version of intl/ the master version and then push
183 # that version to src soon. See:
184 # http://sources.redhat.com/ml/binutils/2003-07/msg00032.html
185 # After the src version of intl/ is upgraded, we can look at
186 # moving this logic into intl/Makefile.in distclean rule
187 # if it is still needed. -- chastain 2003-09-12
188 rm -f intl/config.cache
189 rm -f intl/config.status
190 rm -f intl/config.h
191 rm -f intl/stamp-h
748503c8
NN
192 #
193 mkdir proto-toplev/etc
194 (cd proto-toplev/etc; \
195 for i in $(ETC_SUPPORT); do \
196 ln -s ../../etc/$$i . ; \
197 done)
198 #
199 # Take out texinfo from configurable dirs
c6b750e1 200 rm proto-toplev/configure.ac
748503c8 201 sed -e '/^host_tools=/s/texinfo //' \
c6b750e1 202 <configure.ac >proto-toplev/configure.ac
748503c8
NN
203 #
204 mkdir proto-toplev/texinfo
205 ln -s ../../texinfo/texinfo.tex proto-toplev/texinfo/
206 if test -r texinfo/util/tex3patch ; then \
207 mkdir proto-toplev/texinfo/util && \
208 ln -s ../../../texinfo/util/tex3patch proto-toplev/texinfo/util ; \
209 else true; fi
210 chmod -R og=u . || chmod og=u `find . -print`
211 #
212 # Create .gmo files from .po files.
213 for f in `find . -name '*.po' -type f -print`; do \
214 msgfmt -o `echo $$f | sed -e 's/\.po$$/.gmo/'` $$f ; \
215 done
216 #
217 -rm -f $(PACKAGE)-$(VER)
218 ln -s proto-toplev $(PACKAGE)-$(VER)
219
0558264b
AC
220CVS_NAMES= \( -name CVS -o -name '.cvsignore' \)
221
748503c8
NN
222.PHONY: do-tar
223do-tar:
224 echo "==> Making $(PACKAGE)-$(VER).tar"
225 -rm -f $(PACKAGE)-$(VER).tar
0558264b
AC
226 find $(PACKAGE)-$(VER) -follow $(CVS_NAMES) -prune \
227 -o -type f -print \
748503c8
NN
228 | tar cTfh - $(PACKAGE)-$(VER).tar
229
230.PHONY: do-bz2
231do-bz2:
232 echo "==> Bzipping $(PACKAGE)-$(VER).tar.bz2"
233 -rm -f $(PACKAGE)-$(VER).tar.bz2
234 $(BZIPPROG) -v -9 $(PACKAGE)-$(VER).tar
235
236.PHONY: do-md5sum
237do-md5sum:
238 echo "==> Adding md5 checksum to top-level directory"
0558264b
AC
239 cd proto-toplev && find * -follow $(CVS_NAMES) -prune \
240 -o -type f -print \
1c0f67c1
AC
241 | xargs $(MD5PROG) > ../md5.new
242 -rm -f proto-toplev/md5.sum
243 mv md5.new proto-toplev/md5.sum
748503c8
NN
244
245.PHONY: do-djunpack
246do-djunpack:
247 echo "==> Adding updated djunpack.bat to top-level directory"
710068b9 248 echo - 's /gdb-[0-9\.]*/$(PACKAGE)-'"$(VER)"'/'
748503c8 249 sed < djunpack.bat > djunpack.new \
710068b9 250 -e 's/gdb-[0-9][0-9\.]*/$(PACKAGE)-'"$(VER)"'/'
748503c8 251 -rm -f proto-toplev/djunpack.bat
1c0f67c1 252 mv djunpack.new proto-toplev/djunpack.bat
748503c8
NN
253
254TEXINFO_SUPPORT= texinfo/texinfo.tex
255DIST_SUPPORT= $(DEVO_SUPPORT) $(TEXINFO_SUPPORT)
256
257.PHONY: gas.tar.bz2
258GAS_SUPPORT_DIRS= bfd include libiberty opcodes intl setup.com makefile.vms mkdep
259gas.tar.bz2: $(DIST_SUPPORT) $(GAS_SUPPORT_DIRS) gas
260 $(MAKE) -f $(SELF) taz TOOL=gas \
261 MD5PROG="$(MD5PROG)" \
262 SUPPORT_FILES="$(GAS_SUPPORT_DIRS)"
263
264# The FSF "binutils" release includes gprof and ld.
265.PHONY: binutils.tar.bz2
662c6704 266BINUTILS_SUPPORT_DIRS= bfd gas include libiberty opcodes ld elfcpp gold gprof intl setup.com makefile.vms cpu
748503c8
NN
267binutils.tar.bz2: $(DIST_SUPPORT) $(BINUTILS_SUPPORT_DIRS) binutils
268 $(MAKE) -f $(SELF) taz TOOL=binutils \
269 MD5PROG="$(MD5PROG)" \
270 SUPPORT_FILES="$(BINUTILS_SUPPORT_DIRS)"
271
272.PHONY: gas+binutils.tar.bz2
273GASB_SUPPORT_DIRS= $(GAS_SUPPORT_DIRS) binutils ld gprof
274gas+binutils.tar.bz2: $(DIST_SUPPORT) $(GASB_SUPPORT_DIRS) gas
275 $(MAKE) -f $(SELF) taz TOOL=gas \
276 MD5PROG="$(MD5PROG)" \
277 SUPPORT_FILES="$(GASB_SUPPORT_DIRS)"
278
279GNATS_SUPPORT_DIRS=include libiberty send-pr
280gnats.tar.bz2: $(DIST_SUPPORT) $(GNATS_SUPPORT_DIRS) gnats
281 $(MAKE) -f $(SELF) taz TOOL=gnats \
282 MD5PROG="$(MD5PROG)" \
283 SUPPORT_FILES="$(GNATS_SUPPORT_DIRS)"
284
285.PHONY: gdb.tar.bz2
860144e4 286GDB_SUPPORT_DIRS= bfd include libiberty opcodes readline sim intl libdecnumber cpu
748503c8
NN
287gdb.tar.bz2: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb
288 $(MAKE) -f $(SELF) gdb-taz TOOL=gdb \
289 MD5PROG="$(MD5PROG)" \
290 SUPPORT_FILES="$(GDB_SUPPORT_DIRS)"
291.PHONY: gdb.tar
292gdb.tar: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb
293 $(MAKE) -f $(SELF) gdb-tar TOOL=gdb \
294 MD5PROG="$(MD5PROG)" \
295 SUPPORT_FILES="$(GDB_SUPPORT_DIRS)"
296
b50d7605
HPN
297# Corresponding to the CVS "sim" module.
298.PHONY: sim.tar.bz2
299SIM_SUPPORT_DIRS= bfd opcodes libiberty include intl gdb/version.in makefile.vms
300sim.tar.bz2: $(DIST_SUPPORT) $(SIM_SUPPORT_DIRS) sim
301 $(MAKE) -f $(SELF) taz TOOL=sim \
302 MD5PROG="$(MD5PROG)" \
303 SUPPORT_FILES="$(SIM_SUPPORT_DIRS)"
304
748503c8 305.PHONY: insight.tar.bz2
675c6968 306INSIGHT_SUPPORT_DIRS= $(GDB_SUPPORT_DIRS) tcl tk itcl libgui
748503c8
NN
307insight.tar.bz2: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb
308 $(MAKE) -f $(SELF) gdb-taz TOOL=gdb PACKAGE=insight \
309 MD5PROG="$(MD5PROG)" \
310 SUPPORT_FILES="$(INSIGHT_SUPPORT_DIRS)"
311.PHONY: insight.tar
312insight.tar: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb
313 $(MAKE) -f $(SELF) gdb-tar TOOL=gdb PACKAGE=insight \
314 MD5PROG="$(MD5PROG)" \
315 SUPPORT_FILES="$(INSIGHT_SUPPORT_DIRS)"
316
748503c8
NN
317.NOEXPORT:
318MAKEOVERRIDES=
This page took 0.495393 seconds and 4 git commands to generate.