1#! /bin/sh
2#
3# Script to generate the NEWS file from online release notes.
4# Contributed by Joseph Myers <jsm28@cam.ac.uk>.
5#
6# Copyright (C) 2000-2020 Free Software Foundation, Inc.
7# This file is part of GCC.
8#
9# GCC is free software; you can redistribute it and/or modify
10# it under the terms of the GNU General Public License as published by
11# the Free Software Foundation; either version 3, or (at your option)
12# any later version.
13#
14# GCC is distributed in the hope that it will be useful,
15# but WITHOUT ANY WARRANTY; without even the implied warranty of
16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17# GNU General Public License for more details.
18#
19# You should have received a copy of the GNU General Public License
20# along with GCC; see the file COPYING.  If not, write to
21# the Free Software Foundation, 51 Franklin Street, Fifth Floor,
22# Boston, MA 02110-1301, USA.
23
24website=http://gcc.gnu.org/
25files="
26    gcc-10/index.html gcc-10/changes.html
27    gcc-9/index.html gcc-9/changes.html
28    gcc-8/index.html gcc-8/changes.html
29    gcc-7/index.html gcc-7/changes.html
30    gcc-6/index.html gcc-6/changes.html
31    gcc-5/index.html gcc-5/changes.html
32    gcc-4.9/index.html gcc-4.9/changes.html
33    gcc-4.8/index.html gcc-4.8/changes.html
34    gcc-4.7/index.html gcc-4.7/changes.html
35    gcc-4.6/index.html gcc-4.6/changes.html
36    gcc-4.5/index.html gcc-4.5/changes.html
37    gcc-4.4/index.html gcc-4.4/changes.html
38    gcc-4.3/index.html gcc-4.3/changes.html
39    gcc-4.2/index.html gcc-4.2/changes.html
40    gcc-4.1/index.html gcc-4.1/changes.html
41    gcc-4.0/index.html gcc-4.0/changes.html
42    gcc-3.4/index.html gcc-3.4/changes.html
43    gcc-3.3/index.html gcc-3.3/changes.html
44    gcc-3.2/index.html gcc-3.2/changes.html
45    gcc-3.1/index.html gcc-3.1/changes.html
46    gcc-3.0/index.html gcc-3.0/features.html gcc-3.0/caveats.html
47    gcc-2.95/index.html gcc-2.95/features.html gcc-2.95/caveats.html
48    egcs-1.1/index.html egcs-1.1/features.html egcs-1.1/caveats.html
49    egcs-1.0/index.html egcs-1.0/features.html egcs-1.0/caveats.html"
50
51set -e
52
53cat <<EOF
54This file contains information about GCC releases which has been generated
55automatically from the online release notes.  It covers releases of GCC
56(and the former EGCS project) since EGCS 1.0, on the line of development
57that led to GCC 3. For information on GCC 2.8.1 and older releases of GCC 2,
58see ONEWS.
59
60EOF
61
62header="======================================================================"
63
64echo $header
65
66for file in $files; do
67    wfile=$website$file
68    echo $wfile
69    # We lie to Lynx about the kind of terminal in use because we
70    # want to get consistent output everywhere, and we want this
71    # script to work even when it is not run interactively.
72    env TERM=vt100 lynx -dump $wfile
73    echo $header
74done
75