| OLD | NEW |
| 1 # Copyright 2011 Google Inc. | 1 # Copyright 2011 Google Inc. |
| 2 # | 2 # |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 # "Makefile" replacement to build skia for Windows. | 6 # "Makefile" replacement to build skia for Windows. |
| 7 # More info at https://sites.google.com/site/skiadocs/ | 7 # More info at https://sites.google.com/site/skiadocs/ |
| 8 # | 8 # |
| 9 # Some usage examples: | 9 # Some usage examples: |
| 10 # make clean | 10 # make clean |
| 11 # make tests | 11 # make tests |
| 12 # make bench BUILDTYPE=Release | 12 # make bench BUILDTYPE=Release |
| 13 # make gm GYP_DEFINES=skia_scalar=fixed BUILDTYPE=Release | 13 # make gm GYP_DEFINES=skia_scalar=fixed BUILDTYPE=Release |
| 14 # make all | 14 # make all |
| 15 | 15 |
| 16 import os | 16 import os |
| 17 import shutil | 17 import shutil |
| 18 import sys | 18 import sys |
| 19 | 19 |
| 20 BUILDTYPE = 'Debug' | 20 BUILDTYPE = 'Debug' |
| 21 | 21 |
| 22 # special targets | 22 # special targets |
| 23 TARGET_ALL = 'all' | 23 TARGET_ALL = 'all' |
| 24 TARGET_CLEAN = 'clean' | 24 TARGET_CLEAN = 'clean' |
| 25 TARGET_DEFAULT = 'most' | 25 TARGET_DEFAULT = 'most' |
| 26 TARGET_GYP = 'gyp' | 26 TARGET_GYP = 'gyp' |
| 27 | 27 |
| 28 SCRIPT_DIR = os.path.abspath(os.path.dirname(__file__)) | 28 SCRIPT_DIR = os.path.abspath(os.path.dirname(__file__)) |
| 29 OUT_SUBDIR = 'out' | 29 OUT_SUBDIR = os.environ.get('SKIA_OUT', 'out') |
| 30 GYP_SUBDIR = 'gyp' | 30 GYP_SUBDIR = 'gyp' |
| 31 | 31 |
| 32 | 32 |
| 33 # Simple functions that report what they are doing, and exit(1) on failure. | 33 # Simple functions that report what they are doing, and exit(1) on failure. |
| 34 def cd(path): | 34 def cd(path): |
| 35 print '> cd %s' % path | 35 print '> cd %s' % path |
| 36 if not os.path.isdir(path): | 36 if not os.path.isdir(path): |
| 37 print 'directory %s does not exist' % path | 37 print 'directory %s does not exist' % path |
| 38 sys.exit(1) | 38 sys.exit(1) |
| 39 os.chdir(path) | 39 os.chdir(path) |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 print 'unknown platform (os.name=%s, sys.platform=%s); see %s' % ( | 179 print 'unknown platform (os.name=%s, sys.platform=%s); see %s' % ( |
| 180 os.name, sys.platform, 'https://sites.google.com/site/skiadocs/') | 180 os.name, sys.platform, 'https://sites.google.com/site/skiadocs/') |
| 181 sys.exit(1) | 181 sys.exit(1) |
| 182 sys.exit(0) | 182 sys.exit(0) |
| 183 | 183 |
| 184 | 184 |
| 185 # main() | 185 # main() |
| 186 Make(sys.argv[1:]) | 186 Make(sys.argv[1:]) |
| 187 | 187 |
| 188 | 188 |
| OLD | NEW |