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

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, 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 | « no previous file | frog/reader.dart » ('j') | tools/create_sdk.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/frog_options.dart
===================================================================
--- frog/frog_options.dart (revision 1719)
+++ frog/frog_options.dart (working copy)
@@ -22,6 +22,9 @@
/** Where to place the generated code. */
String outfile;
+ /* TODO(dgrove): fix this. For now, either 'sdk' or 'dev'. */
Siggi Cherem (dart-lang) 2011/11/21 23:44:23 nit: use // comments for TODOs rather than /* (so
dgrove 2011/11/22 00:41:24 Done.
+ final config = 'dev';
+
// Options that modify behavior significantly
bool enableLeg = false;
bool legOnly = false;
@@ -46,7 +49,15 @@
List<String> childArgs;
FrogOptions(String homedir, List<String> args, FileSystem files) {
- libDir = homedir + '/lib'; // Default value for --libdir.
+ if (config == 'dev') {
+ libDir = homedir + '/lib'; // Default value for --libdir.
+ } else if (config == 'sdk') {
+ libDir = homedir + '/../lib/corelib/frog';
Siggi Cherem (dart-lang) 2011/11/21 23:44:23 it might be good to call [joinPaths] and [dirname]
dgrove 2011/11/22 00:41:24 Done.
+ } else {
+ world.error('Invalid reader configuration $config', null);
+ throw('Invalid reader config');
+ }
+
bool ignoreUnrecognizedFlags = false;
bool passedLibDir = false;
childArgs = [];
@@ -133,7 +144,7 @@
}
// TODO(jimhug): Remove this hack.
- if (!passedLibDir && !files.fileExists(libDir)) {
+ if (!passedLibDir && !files.fileExists(libDir + "/corelib.dart")) {
Siggi Cherem (dart-lang) 2011/11/21 23:44:23 why is this change needed?
dgrove 2011/11/22 00:41:24 A good question - because files.fileExists doesn't
// Try locally
var temp = 'frog/lib';
if (files.fileExists(temp)) {
« no previous file with comments | « no previous file | frog/reader.dart » ('j') | tools/create_sdk.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698