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

Unified Diff: frog/frog_options.dart

Issue 8619005: Initial CL to create SDK directory (this will be done as a build step). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 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 | « dart.gyp ('k') | frog/reader.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/frog_options.dart
===================================================================
--- frog/frog_options.dart (revision 2028)
+++ frog/frog_options.dart (working copy)
@@ -22,6 +22,10 @@
/** Where to place the generated code. */
String outfile;
+ // TODO(dgrove): fix this. For now, either 'sdk' or 'dev'.
+ final config = 'dev';
+
+
// Options that modify behavior significantly
bool enableLeg = false;
bool legOnly = false;
@@ -48,7 +52,15 @@
List<String> childArgs;
FrogOptions(String homedir, List<String> args, FileSystem files) {
- libDir = homedir + '/lib'; // Default value for --libdir.
+ if (config == 'dev') {
+ libDir = joinPaths(homedir, '/lib'); // Default value for --libdir.
+ } else if (config == 'sdk') {
+ libDir = joinPaths(homedir, '/../lib');
+ } else {
+ world.error('Invalid configuration $config', null);
+ throw('Invalid configuration');
+ }
+
bool ignoreUnrecognizedFlags = false;
bool passedLibDir = false;
childArgs = [];
@@ -143,7 +155,7 @@
}
// TODO(jimhug): Remove this hack.
- if (!passedLibDir && !files.fileExists(libDir)) {
+ if (!passedLibDir && config == 'dev' && !files.fileExists(libDir)) {
// Try locally
var temp = 'frog/lib';
if (files.fileExists(temp)) {
« no previous file with comments | « dart.gyp ('k') | frog/reader.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698