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

Side by Side Diff: tools/build.py

Issue 569343003: Make 'tools/build.py -h' warn the user to run it from the repo root. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revert "quit on wrong CWD" and add warning to help output. Created 6 years, 3 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
4 # for details. All rights reserved. Use of this source code is governed by a 4 # for details. All rights reserved. Use of this source code is governed by a
5 # BSD-style license that can be found in the LICENSE file. 5 # BSD-style license that can be found in the LICENSE file.
6 # 6 #
7 7
8 import optparse 8 import optparse
9 import os 9 import os
10 import re 10 import re
(...skipping 16 matching lines...) Expand all
27 27
28 $ wget http://src.chromium.org/chrome/trunk/src/build/install-build-deps.sh 28 $ wget http://src.chromium.org/chrome/trunk/src/build/install-build-deps.sh
29 OR 29 OR
30 $ svn co http://src.chromium.org/chrome/trunk/src/build; cd build 30 $ svn co http://src.chromium.org/chrome/trunk/src/build; cd build
31 Then, 31 Then,
32 $ chmod u+x install-build-deps.sh 32 $ chmod u+x install-build-deps.sh
33 $ ./install-build-deps.sh --arm --no-chromeos-fonts 33 $ ./install-build-deps.sh --arm --no-chromeos-fonts
34 """ 34 """
35 DEFAULT_ARM_CROSS_COMPILER_PATH = '/usr/bin' 35 DEFAULT_ARM_CROSS_COMPILER_PATH = '/usr/bin'
36 36
37 usage = """\
38 usage: %%prog [options] [targets]
39
40 This script runs 'make' in the *current* directory. So, run it from
41 the Dart repo root,
42
43 %s ,
44
45 unless you really intend to use a non-default Makefile.""" % DART_ROOT
37 46
38 def BuildOptions(): 47 def BuildOptions():
39 result = optparse.OptionParser() 48 result = optparse.OptionParser(usage=usage)
40 result.add_option("-m", "--mode", 49 result.add_option("-m", "--mode",
41 help='Build variants (comma-separated).', 50 help='Build variants (comma-separated).',
42 metavar='[all,debug,release]', 51 metavar='[all,debug,release]',
43 default='debug') 52 default='debug')
44 result.add_option("-v", "--verbose", 53 result.add_option("-v", "--verbose",
45 help='Verbose output.', 54 help='Verbose output.',
46 default=False, action="store_true") 55 default=False, action="store_true")
47 result.add_option("-a", "--arch", 56 result.add_option("-a", "--arch",
48 help='Target architectures (comma-separated).', 57 help='Target architectures (comma-separated).',
49 metavar='[all,ia32,x64,simarm,arm,simmips,mips,simarm64,arm64,]', 58 metavar='[all,ia32,x64,simarm,arm,simmips,mips,simarm64,arm64,]',
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 else: 548 else:
540 if BuildOneConfig(options, target, target_os, 549 if BuildOneConfig(options, target, target_os,
541 mode, arch, cross_build) != 0: 550 mode, arch, cross_build) != 0:
542 return 1 551 return 1
543 552
544 return 0 553 return 0
545 554
546 555
547 if __name__ == '__main__': 556 if __name__ == '__main__':
548 sys.exit(Main()) 557 sys.exit(Main())
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698