From 43bf6a5be7de0a1358dd64f574b4cb53dbbce235 Mon Sep 17 00:00:00 2001 From: "brettw@chromium.org" <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> Date: Tue, 17 Sep 2013 16:54:24 +0000 Subject: This changes the current directory for script execution to be the build directory rather than the current BUILDfile directory. This makes things more consistent and simplifies some implementation. It adds a new function to_build_path() for buildfiles to convert files to the build directory for this kind of call. I removed all of the built-in relative* variables that were required to support this, and added one for target_out_dir and root_out_dir. I added some tests and a test helper object since I was doing this kind of Scope setup a lot. R=scottmg@chromium.org Review URL: https://codereview.chromium.org/23606031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@223622 0039d316-1c4b-4281-b951-d872f2087c98 --- tools/gn/variables.h | 32 ++++++++------------------------ 1 file changed, 8 insertions(+), 24 deletions(-) (limited to 'tools/gn/variables.h') diff --git a/tools/gn/variables.h b/tools/gn/variables.h index cdb50e6..7fb50cf 100644 --- a/tools/gn/variables.h +++ b/tools/gn/variables.h @@ -41,38 +41,22 @@ extern const char kPythonPath[]; extern const char kPythonPath_HelpShort[]; extern const char kPythonPath_Help[]; -extern const char kRelativeBuildToSourceRootDir[]; -extern const char kRelativeBuildToSourceRootDir_HelpShort[]; -extern const char kRelativeBuildToSourceRootDir_Help[]; - -extern const char kRelativeRootGenDir[]; -extern const char kRelativeRootGenDir_HelpShort[]; -extern const char kRelativeRootGenDir_Help[]; - -extern const char kRelativeRootOutputDir[]; -extern const char kRelativeRootOutputDir_HelpShort[]; -extern const char kRelativeRootOutputDir_Help[]; - -extern const char kRelativeSourceRootDir[]; -extern const char kRelativeSourceRootDir_HelpShort[]; -extern const char kRelativeSourceRootDir_Help[]; - -extern const char kRelativeTargetGenDir[]; -extern const char kRelativeTargetGenDir_HelpShort[]; -extern const char kRelativeTargetGenDir_Help[]; - -extern const char kRelativeTargetOutputDir[]; -extern const char kRelativeTargetOutputDir_HelpShort[]; -extern const char kRelativeTargetOutputDir_Help[]; - extern const char kRootGenDir[]; extern const char kRootGenDir_HelpShort[]; extern const char kRootGenDir_Help[]; +extern const char kRootOutDir[]; +extern const char kRootOutDir_HelpShort[]; +extern const char kRootOutDir_Help[]; + extern const char kTargetGenDir[]; extern const char kTargetGenDir_HelpShort[]; extern const char kTargetGenDir_Help[]; +extern const char kTargetOutDir[]; +extern const char kTargetOutDir_HelpShort[]; +extern const char kTargetOutDir_Help[]; + // Target vars ----------------------------------------------------------------- extern const char kAllDependentConfigs[]; -- cgit v1.1