From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28999 invoked by alias); 9 Jan 2007 17:50:37 -0000 Received: (qmail 28987 invoked by uid 22791); 9 Jan 2007 17:50:36 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Tue, 09 Jan 2007 17:50:25 +0000 Received: from drow by nevyn.them.org with local (Exim 4.63) (envelope-from ) id 1H4L79-0006LH-0W for gdb-patches@sourceware.org; Tue, 09 Jan 2007 12:50:23 -0500 Date: Tue, 09 Jan 2007 17:50:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sourceware.org Subject: [commit] Copyright update script Message-ID: <20070109175022.GA23497@nevyn.them.org> Mail-Followup-To: gdb-patches@sourceware.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.13 (2006-08-11) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-01/txt/msg00260.txt.bz2 I've checked this in, with Eli's suggested changes and a few more of my own. Hopefully my copy-paste approach to lisp has not created anything too horrid. This version works on sim, which means it had to refuse to touch non-FSF copyrights. I've proofread it pretty thoroughly and am happy with it. Thanks a lot for the filling bits, Eli! Not breaking the FSF name is very nice, and I wouldn't have been able to figure that out on my own. I'm going to check in the corresponding updates in a moment (without a ChangeLog entry, since they touch almost every file and are completely mechanical). I've proofread them as best I can. I'm not going to do the files that I couldn't automate; we'll do those the old fashioned way, but this covers 99.9%. -- Daniel Jacobowitz CodeSourcery 2007-01-09 Daniel Jacobowitz Eli Zaretskii * copyright.sh: New file. Index: copyright.sh =================================================================== RCS file: copyright.sh diff -N copyright.sh --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ copyright.sh 9 Jan 2007 17:06:58 -0000 @@ -0,0 +1,162 @@ +#!/bin/sh +# Automatically update copyright for GDB, the GNU debugger. +# +# Copyright (C) 2007 Free Software Foundation, Inc. +# +# This file is part of GDB. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. + +# Usage: cd src/gdb && sh ./copyright.sh +# To use a different version of emacs, set the EMACS environment +# variable before running. + +# After running, update those files mentioned in $byhand by hand. +# Always review the output of this script before committing it! +# A useful command to review the output is: +# filterdiff -x \*.c -x \*.cc -x \*.h -x \*.exp updates.diff +# This removes the bulk of the changes which are most likely +# to be correct. + +#### +# Configuration +#### + +# As of Emacs 22.0 (snapshot), wrapping and copyright updating do not +# handle these file types - all reasonable: +# Assembly (weird comment characters, e.g. "!"); .S usually has C +# comments, which are fine) +# Fortran ("c" comment character) +# igen +# Autoconf input (dnl) +# texinfo (@c) +# tex (%) +# *.defs as C +# man +# So these need to be done by hand, as needed +byhand=" +*.s +*.f +*.f90 +*.igen +*.ac +*.texi +*.texinfo +*.tex +*.defs +*.1 +" + +# Files which should not be modified, either because they are +# generated, non-FSF, or otherwise special (e.g. license text). +prunes=" +COPYING +COPYING.LIB +CVS +configure +copying.c +gdbarch.c +gdbarch.h +fdl.texi +gpl.texi +gdbtk +gdb.gdbtk +osf-share +aclocal.m4 +" + +#### +# Main program +#### + +: ${EMACS:=emacs} + +# Disable filename expansion, so that we can get at the glob patterns +# from $byhand. +set -f + +version=`$EMACS --version | sed 's/GNU Emacs \([0-9]*\)\..*/\1/; 1q'` +if test "$version" -lt 22; then + echo "error: $EMACS is too old; use at least an Emacs 22 snapshot." >&2 + exit 1 +fi + +if test $# -lt 1; then + dir=. +else + dir=$1 +fi + +if ! test -f doc/gdbint.texinfo; then + echo "\"$dir\" is not a GDB source directory." + exit 1 +fi + +cat > copytmp.el <> copytmp.el <> copytmp.el <