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

Unified Diff: pylib/gyp/generator/make.py

Issue 113463003: Use gyp.common.EnsureDirExists() in more places. (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: Created 7 years 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 | « pylib/gyp/generator/eclipse.py ('k') | pylib/gyp/generator/msvs.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pylib/gyp/generator/make.py
===================================================================
--- pylib/gyp/generator/make.py (revision 1813)
+++ pylib/gyp/generator/make.py (working copy)
@@ -117,12 +117,6 @@
}
-def ensure_directory_exists(path):
- dir = os.path.dirname(path)
- if dir and not os.path.exists(dir):
- os.makedirs(dir)
-
-
# The .d checking code below uses these functions:
# wildcard, sort, foreach, shell, wordlist
# wildcard can handle spaces, the rest can't.
@@ -691,7 +685,7 @@
spec, configs: gyp info
part_of_all: flag indicating this target is part of 'all'
"""
- ensure_directory_exists(output_filename)
+ gyp.common.EnsureDirExists(output_filename)
self.fp = open(output_filename, 'w')
@@ -820,7 +814,7 @@
targets: list of "all" targets for this sub-project
build_dir: build output directory, relative to the sub-project
"""
- ensure_directory_exists(output_filename)
+ gyp.common.EnsureDirExists(output_filename)
self.fp = open(output_filename, 'w')
self.fp.write(header)
# For consistency with other builders, put sub-project build output in the
@@ -2067,7 +2061,7 @@
header_params['make_global_settings'] = make_global_settings
- ensure_directory_exists(makefile_path)
+ gyp.common.EnsureDirExists(makefile_path)
root_makefile = open(makefile_path, 'w')
root_makefile.write(SHARED_HEADER % header_params)
# Currently any versions have the same effect, but in future the behavior
« no previous file with comments | « pylib/gyp/generator/eclipse.py ('k') | pylib/gyp/generator/msvs.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698