Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(562)

Unified Diff: test/rules-rebuild/src/make-sources.py

Issue 300016: Fix generators to make sure changes to rule inputs trigger correct rebuilds.... (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: add same_target.gyp Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/rules-rebuild/src/main.c ('k') | test/rules-rebuild/src/prog1.in » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/rules-rebuild/src/make-sources.py
===================================================================
--- test/rules-rebuild/src/make-sources.py (revision 0)
+++ test/rules-rebuild/src/make-sources.py (revision 0)
@@ -0,0 +1,15 @@
+#!/usr/bin/env python
+import sys
+
+assert len(sys.argv) == 4, sys.argv
+
+(in_file, c_file, h_file) = sys.argv[1:]
+
+def write_file(filename, contents):
+ open(filename, 'wb').write(contents)
+
+write_file(c_file, open(in_file, 'rb').read())
+
+write_file(h_file, '#define NAME "%s"\n' % in_file)
+
+sys.exit(0)
« no previous file with comments | « test/rules-rebuild/src/main.c ('k') | test/rules-rebuild/src/prog1.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698