New redo-sources and redo-targets commands.

Suggested by djb in personal email, and on the mailing list.  redo-targets
lists all the targets in the database; redo-sources lists all the existing
sources (ie. files that are referred to but which aren't targets).

redo-ifcreate filenames aren't included in the redo-sources list.
This commit is contained in:
Avery Pennarun 2010-12-19 01:38:38 -08:00
commit f2d34fa685
6 changed files with 57 additions and 18 deletions

18
redo-sources.py Executable file
View file

@ -0,0 +1,18 @@
#!/usr/bin/python
import sys, os
import vars_init
vars_init.init([])
import state
from log import err
if len(sys.argv[1:]) != 0:
err('%s: no arguments expected.\n' % sys.argv[0])
sys.exit(1)
for f in state.files():
if f.name.startswith('//'):
continue # special name, ignore
if not f.is_generated and f.read_stamp() != state.STAMP_MISSING:
print f.nicename()