GDB (xrefs)
Functions | Variables
copyright Namespace Reference

Functions

def get_update_list ()
 
def update_files (update_list)
 
def may_have_copyright_notice (filename)
 
def main ()
 

Variables

tuple EXCLUDE_LIST
 Some constants, placed at the end because they take up a lot of room. More...
 
tuple EXCLUDE_ALL_LIST
 
tuple BY_HAND
 
tuple MULTIPLE_COPYRIGHT_HEADERS
 

Function Documentation

def copyright.get_update_list ( )
Return the list of files to update.

Assumes that the current working directory when called is the root
of the GDB source tree (NOT the gdb/ subdirectory!).  The names of
the files are relative to that root directory.

Definition at line 39 of file copyright.py.

Referenced by main().

def copyright.main ( )
The main subprogram.

Definition at line 142 of file copyright.py.

References get_update_list(), exsummary.help_and_exit(), exsummary.main(), and exsummary.mark_functions().

Referenced by maintenance_set_profile_cmd().

def copyright.may_have_copyright_notice (   filename)
Check that the given file does not seem to have a copyright notice.

The filename is relative to the root directory.
This function assumes that the current working directory is that root
directory.

The algorigthm is fairly crude, meaning that it might return
some false positives.  I do not think it will return any false
negatives...  We might improve this function to handle more
complex cases later...

Definition at line 113 of file copyright.py.

Referenced by update_files().

def copyright.update_files (   update_list)
Update the copyright header of the files in the given list.

We use gnulib's update-copyright script for that.

Definition at line 70 of file copyright.py.

References len, and may_have_copyright_notice().

Variable Documentation

tuple copyright.BY_HAND
Initial value:
1 = (
2  # These files are sensitive to line numbering.
3  "gdb/testsuite/gdb.base/step-line.inp",
4  "gdb/testsuite/gdb.base/step-line.c",
5 )

Definition at line 193 of file copyright.py.

tuple copyright.EXCLUDE_ALL_LIST
Initial value:
1 = (
2  "COPYING", "COPYING.LIB", "CVS", "configure", "copying.c",
3  "fdl.texi", "gpl.texi", "aclocal.m4",
4 )

Definition at line 187 of file copyright.py.

tuple copyright.EXCLUDE_LIST
Initial value:
1 = (
2  'gdb/nat/glibc_thread_db.h',
3  'gdb/CONTRIBUTE',
4  'gdb/gnulib/import'
5 )

Some constants, placed at the end because they take up a lot of room.

The actual value of these constants is not significant to the understanding of the script.

Definition at line 173 of file copyright.py.

tuple copyright.MULTIPLE_COPYRIGHT_HEADERS
Initial value:
1 = (
2  "gdb/doc/gdb.texinfo",
3  "gdb/doc/refcard.tex",
4  "gdb/gdbarch.sh",
5 )

Definition at line 202 of file copyright.py.