Returns list of prerequisites from Makefile-style dependency file, e.g. created by `cc -MD -MF `.
(path)
| 2986 | |
| 2987 | |
| 2988 | def _get_prerequisites(path): |
| 2989 | ''' |
| 2990 | Returns list of prerequisites from Makefile-style dependency file, e.g. |
| 2991 | created by `cc -MD -MF <path>`. |
| 2992 | ''' |
| 2993 | ret = list() |
| 2994 | if os.path.isfile(path): |
| 2995 | with open(path) as f: |
| 2996 | for line in f: |
| 2997 | for item in line.split(): |
| 2998 | if item.endswith( (':', '\\')): |
| 2999 | continue |
| 3000 | ret.append( item) |
| 3001 | return ret |
| 3002 | |
| 3003 | |
| 3004 | def _fs_mtime_newest( path): |
no test coverage detected
searching dependent graphs…