changeset c1a07ecb6619 in /z/repo/m5 details: http://repo.m5sim.org/m5?cmd=changeset;node=c1a07ecb6619 description: copyright: Add code for finding all copyright blocks and create a COPYING file
The end of the COPYING file was generated with: % python ./util/find_copyrights.py configs src system tests util Update -C command line option to spit out COPYING file diffstat: AUTHORS | 95 ---------------- COPYING | 47 ++++++++ LICENSE | 2 +- src/SConscript | 2 +- src/python/m5/main.py | 20 +-- util/find_copyrights.py | 273 ++++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 326 insertions(+), 113 deletions(-) diffs (truncated from 513 to 300 lines): diff -r 23711432221f -r c1a07ecb6619 AUTHORS --- a/AUTHORS Thu Jun 02 14:36:35 2011 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,109 +0,0 @@ - -Nathan L. Binkert ------------------------ -* Alpha full system support -* Statistics package -* Event queue -* Pseudo instructions -* Remote GDB facilities -* PC sampling -* Trace facilities -* Tru64 support -* Ethernet (Link, NSGIGE, Sinic) device support -* PCI device support -* Checkpoint framework -* Configuration system - -Steven K. Reinhardt ------------------------ -* Alpha support -* ISA parsing -* SWIG intergration -* New memory system -* New Caches -* Simple CPU -* Instruction tracing -* PC sampling -* Deprecated detailed CPU -* Binary Loading -* Configuration system - -Ali G. Saidi ------------------------ -* SPARC Full System Support -* Alpha Linux support -* Alpha (Tsunami) platform and devices -* I/O <-> memory interface -* PCI device interface -* Multiple ISA support -* Ethernet (Intel NIC) device model -* Memory bridge, bus, packet, port interfaces - -Kevin T. Lim ------------------------ -* New CPU model -* CPU checker -* CPU class restructuring -* Quiecsing/Draining - -Ronald G. Dreslinski Jr ------------------------ -* Caches/Cache coherence -* Prefetching -* New memory system (port, request, packet, cache porting) -* Tru64 MP support - -Lisa R. Hsu ------------------------ -* DP83820 NIC device model -* Kernel stats -* Linux Dist disk image building (current) - -Gabriel Black ------------------------ -* Multiple ISA support -* SPARC ISA support -* X86 ISA support -* Alpha support reorganization -* SPARC SE support -* X86 SE support -* Remote GDB in SE support -* TLB based translation in SE -* Statetrace debugging tool -* Microcode system - -Korey L. Sewell ------------------------ -* O3CPU SMT support -* MIPS ISA support -* Multiple ISA support in O3CPU - -Andrew L. Schultz ------------------------ -* IDE controller/disk model -* PCI devices interface -* Linux Dist disk image building (deprecated) - -Erik G. Hallnor ------------------------ -* Caches -* Trace reader support -* Checkpoint framework - -Steve E. Raasch ------------------------ -* Deprecated CPU model -* Generic CPU structures - -David Green ------------------------ -* Deprecated CPU model -* Caches - -Benjamin S. Nash ------------------------ -* Alpha FreeBSD support - -Miguel J. Serrano ------------------------ -* Alpha FreeBSD support diff -r 23711432221f -r c1a07ecb6619 COPYING --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/COPYING Thu Jun 02 17:36:07 2011 -0700 @@ -0,0 +1,47 @@ +Please see individual files for details of the license on each file. +The preferred license can be found in LICENSE. + +All files in this distribution (other than in the ext directory) have +licenses based on the BSD or MIT licenses. Some files in the ext +directory are GNU LGPL. No other licenses are found in this +distribution. + +Beyond the BSD license, some files include the following clarification +of the license as required by the copyright holder: + + The license below extends only to copyright in the software and + shall not be construed as granting a license to any other + intellectual property including but not limited to intellectual + property relating to a hardware implementation of the + functionality of the software licensed hereunder. You may use the + software subject to the license terms below provided that you + ensure that this notice is replicated unmodified and in its + entirety in all distributions of the software, modified or + unmodified, in source code or in binary form. + +The copyright holders include (not counting the ext directory): + +Copyright (c) 2000-2011 The Regents of The University of Michigan +Copyright (c) 1990,1993-1995,2007-2010 The Hewlett-Packard Development Company +Copyright (c) 1999-2009,2011 Mark D. Hill and David A. Wood +Copyright (c) 2009-2011 ARM Limited +Copyright (c) 2008-2009 Princeton University +Copyright (c) 2007 MIPS Technologies, Inc. +Copyright (c) 2009-2011 Advanced Micro Devices, Inc. +Copyright (c) 2009 The University of Edinburgh +Copyright (c) 2007-2008 The Florida State University +Copyright (c) 2010 Massachusetts Institute of Technology +Copyright (c) 1990-1993 The Regents of the University of California +Copyright (c) 2006-2009 Nathan Binkert +Copyright (c) 2001 The NetBSD Foundation, Inc. +Copyright (c) 2010-2011 Gabe Black +Copyright (c) 1994 Adam Glass +Copyright (c) 1990-1992 MIPS Computer Systems, Inc. +Copyright (c) 2004 Richard J. Wagner +Copyright (c) 2000 Computer Engineering and Communication Networks Lab +Copyright (c) 2001 Eric Jackson +Copyright (c) 1990 Hewlett-Packard Development Company +Copyright (c) 1994-1996 Carnegie-Mellon University. +Copyright (c) 1993-1994 Christopher G. Demetriou +Copyright (c) 1997-2002 Makoto Matsumoto and Takuji Nishimura +Copyright (c) 1998,2001 Manuel Bouyer. diff -r 23711432221f -r c1a07ecb6619 LICENSE --- a/LICENSE Thu Jun 02 14:36:35 2011 -0700 +++ b/LICENSE Thu Jun 02 17:36:07 2011 -0700 @@ -1,4 +1,4 @@ -Copyright (c) 2000-2011 The Regents of The University of Michigan +Copyright (c) <date> <copyright holder> All rights reserved. Redistribution and use in source and binary forms, with or without diff -r 23711432221f -r c1a07ecb6619 src/SConscript --- a/src/SConscript Thu Jun 02 14:36:35 2011 -0700 +++ b/src/SConscript Thu Jun 02 17:36:07 2011 -0700 @@ -516,7 +516,7 @@ # Generate a file that wraps the basic top level files env.Command('python/m5/info.py', - [ '#/AUTHORS', '#/LICENSE', '#/README', ], + [ '#/COPYING', '#/LICENSE', '#/README', ], MakeAction(makeInfoPyFile, Transform("INFO"))) PySource('m5', 'python/m5/info.py') diff -r 23711432221f -r c1a07ecb6619 src/python/m5/main.py --- a/src/python/m5/main.py Thu Jun 02 14:36:35 2011 -0700 +++ b/src/python/m5/main.py Thu Jun 02 17:36:07 2011 -0700 @@ -36,11 +36,8 @@ usage="%prog [gem5 options] script.py [script options]" version="%prog 2.0" -brief_copyright=''' -Copyright (c) 2001-2011 -The Regents of The University of Michigan -All Rights Reserved -''' +brief_copyright=\ + "gem5 is copyrighted software; use the --copyright option for details." def parse_options(): import config @@ -52,8 +49,6 @@ group = options.set_group # Help options - option('-A', "--authors", action="store_true", default=False, - help="Show author information") option('-B', "--build-info", action="store_true", default=False, help="Show build information") option('-C', "--copyright", action="store_true", default=False, @@ -211,14 +206,7 @@ if options.copyright: done = True - print info.LICENSE - print - - if options.authors: - done = True - print 'Author information:' - print - print info.AUTHORS + print info.COPYING print if options.readme: @@ -263,7 +251,7 @@ verbose = options.verbose - options.quiet if options.verbose >= 0: - print "gem5 Simulator System" + print "gem5 Simulator System. http://gem5.org" print brief_copyright print diff -r 23711432221f -r c1a07ecb6619 util/find_copyrights.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/util/find_copyrights.py Thu Jun 02 17:36:07 2011 -0700 @@ -0,0 +1,273 @@ +#!/usr/bin/env python + +import os +import re +import sys + +from file_types import lang_type, find_files + +mode_line = re.compile('(-\*- *mode:.* *-\*-)') +shell_comment = re.compile(r'^\s*#') +lisp_comment = re.compile(r';') +cpp_comment = re.compile(r'//') +c_comment_start = re.compile(r'/\*') +c_comment_end = re.compile(r'\*/') +def find_copyright_block(lines, lang_type): + start = None + if lang_type in ('python', 'make', 'shell', 'perl', 'scons'): + for i,line in enumerate(lines): + if i == 0 and (line.startswith('#!') or mode_line.search(line)): + continue + + if shell_comment.search(line): + if start is None: + start = i + elif start is None: + if line.strip(): + return + else: + yield start, i-1 + start = None + + elif lang_type in ('lisp', ): + for i,line in enumerate(lines): + if i == 0 and mode_line.search(line): + continue + + if lisp_comment.search(line): + if start is None: + start = i + elif start is None: + if line.strip(): + return + else: + yield start, i-1 + start = None + + elif lang_type in ('C', 'C++', 'swig', 'isa', 'asm', 'slicc', + 'lex', 'yacc'): + mode = None + for i,line in enumerate(lines): + if i == 0 and mode_line.search(line): + continue + + if mode == 'C': + assert start is not None, 'on line %d' % (i + 1) + match = c_comment_end.search(line) + if match: + yield start, i + mode = None + continue _______________________________________________ gem5-dev mailing list gem5-dev@m5sim.org http://m5sim.org/mailman/listinfo/gem5-dev