1c1ced77af959d11dd80252ab471e89906ea70f09maruel@chromium.org#!/usr/bin/env python
20064df5e9ec0afc53d4103d7c61c0c7f75b6c641jrg@chromium.org
3c1ced77af959d11dd80252ab471e89906ea70f09maruel@chromium.org# Copyright (c) 2011 Google Inc. All rights reserved.
4c1ced77af959d11dd80252ab471e89906ea70f09maruel@chromium.org# Use of this source code is governed by a BSD-style license that can be
5c1ced77af959d11dd80252ab471e89906ea70f09maruel@chromium.org# found in the LICENSE file.
6c1ced77af959d11dd80252ab471e89906ea70f09maruel@chromium.org
7c1ced77af959d11dd80252ab471e89906ea70f09maruel@chromium.org"""Confirms presence of files generated by our targets we depend on.
8c1ced77af959d11dd80252ab471e89906ea70f09maruel@chromium.orgIf they exist, create a new file.
9c1ced77af959d11dd80252ab471e89906ea70f09maruel@chromium.org
10c1ced77af959d11dd80252ab471e89906ea70f09maruel@chromium.orgNote target's input files are explicitly NOT defined in the gyp file
11c1ced77af959d11dd80252ab471e89906ea70f09maruel@chromium.orgso they can't easily be passed to this script as args.
12c1ced77af959d11dd80252ab471e89906ea70f09maruel@chromium.org"""
130064df5e9ec0afc53d4103d7c61c0c7f75b6c641jrg@chromium.org
140064df5e9ec0afc53d4103d7c61c0c7f75b6c641jrg@chromium.orgimport os
150064df5e9ec0afc53d4103d7c61c0c7f75b6c641jrg@chromium.orgimport sys
160064df5e9ec0afc53d4103d7c61c0c7f75b6c641jrg@chromium.org
170064df5e9ec0afc53d4103d7c61c0c7f75b6c641jrg@chromium.orgoutfile = sys.argv[1]  # Example value we expect: deps_all_done_first_123.txt
180064df5e9ec0afc53d4103d7c61c0c7f75b6c641jrg@chromium.orgif (os.path.exists("dep_1.txt") and
190064df5e9ec0afc53d4103d7c61c0c7f75b6c641jrg@chromium.org    os.path.exists("dep_2.txt") and
200064df5e9ec0afc53d4103d7c61c0c7f75b6c641jrg@chromium.org    os.path.exists("dep_3.txt")):
210064df5e9ec0afc53d4103d7c61c0c7f75b6c641jrg@chromium.org  open(outfile, "w")
22