GDB (xrefs)
|
Functions | |
get_update_list () | |
update_files (update_list) | |
may_have_copyright_notice (filename) | |
argparse.ArgumentParser | get_parser () |
Optional[int] | main (List[str] argv) |
Variables | |
tuple | EXCLUDE_LIST |
Some constants, placed at the end because they take up a lot of room. | |
tuple | EXCLUDE_ALL_LIST |
tuple | BY_HAND |
tuple | MULTIPLE_COPYRIGHT_HEADERS |
copyright.py This script updates the list of years in the copyright notices in most files maintained by the GDB project. Usage: cd src/gdb && ./copyright.py 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.
argparse.ArgumentParser copyright.get_parser | ( | ) |
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 43 of file copyright.py.
Referenced by main().
Optional[int] copyright.main | ( | List[str] | argv | ) |
The main subprogram.
Definition at line 168 of file copyright.py.
References get_parser(), get_update_list(), and update_files().
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 algorithm 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 130 of file copyright.py.
Referenced by update_files().
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 85 of file copyright.py.
References may_have_copyright_notice().
Referenced by main().
tuple copyright.BY_HAND |
Definition at line 248 of file copyright.py.
tuple copyright.EXCLUDE_ALL_LIST |
Definition at line 236 of file copyright.py.
tuple copyright.EXCLUDE_LIST |
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 217 of file copyright.py.
tuple copyright.MULTIPLE_COPYRIGHT_HEADERS |
Definition at line 255 of file copyright.py.