1 #!/usr/bin/env python 2 3 # Copyright (c) 2011 Google Inc. All rights reserved. 4 # Use of this source code is governed by a BSD-style license that can be 5 # found in the LICENSE file. 6 7 """Confirms presence of files generated by our targets we depend on. 8 If they exist, create a new file. 9 10 Note target's input files are explicitly NOT defined in the gyp file 11 so they can't easily be passed to this script as args. 12 """ 13 14 import os 15 import sys 16 17 outfile = sys.argv[1] # Example value we expect: deps_all_done_first_123.txt 18 if (os.path.exists("dep_1.txt") and 19 os.path.exists("dep_2.txt") and 20 os.path.exists("dep_3.txt")): 21 open(outfile, "w") 22