kpatch: use git instead of trying to create diffs by hand
[smatch.git] / smatch_scripts / implicit_dependencies / main.py
blob0df3baf5e4d77a9098b37d8545e299141546753a
1 import argparse
2 import sys
4 from constants import (
5 IMPL_DEP_FILE_STR,
6 OUTPUT_FILE_STR,
8 from parser import Parser
10 def main():
11 arg_parser = argparse.ArgumentParser(
12 description="Control module for tracking implicit dependencies"
14 arg_parser.add_argument(
15 "-f", "--file", default=IMPL_DEP_FILE_STR,
16 help="path to kernel.implicit_dependencies",
18 arg_parser.add_argument(
19 "-o", "--output", default=OUTPUT_FILE_STR,
20 help="where to output info",
22 arg_parser.add_argument(
23 "-v", "--verbose", action="store_true",
24 help="if verbose, we list what fields are responsible for the dependency"
26 arg_parser.add_argument(
27 "-p", "--pretty", action="store_true",
28 help="print implicit dependencies in pretty format"
30 args = arg_parser.parse_args()
32 p = Parser(args.file, output_file_str=args.output, verbose=args.verbose, pretty=args.pretty)
33 p.parse()
34 p.write()
35 p.close()
38 if __name__ == "__main__":
39 sys.exit(main())