add a "most" target, and make it the default
split out of https://codereview.appspot.com/6651064/ ('gyp: generate "everything" and "most" targets instead of "all"')
tests: "make most" now works, "make" now calls "make most"
Review URL: https://codereview.appspot.com/6740045
git-svn-id: http://skia.googlecode.com/svn/trunk@5999 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/Makefile b/Makefile
index 20dc224..e4ec9ef 100644
--- a/Makefile
+++ b/Makefile
@@ -32,6 +32,7 @@
ALL_TARGETS := skia_base_libs \
bench \
gm \
+ most \
SampleApp \
tests \
tools
@@ -42,7 +43,7 @@
# Default target. This must be listed before all other targets.
.PHONY: default
-default: $(ALL_TARGETS)
+default: most
# As noted in http://code.google.com/p/skia/issues/detail?id=330 , building
# multiple targets in parallel was failing. The special .NOTPARALLEL target
diff --git a/gyp/most.gyp b/gyp/most.gyp
new file mode 100644
index 0000000..319547e
--- /dev/null
+++ b/gyp/most.gyp
@@ -0,0 +1,34 @@
+# Build ALMOST everything provided by Skia; this should be the default target.
+#
+# This omits the following targets that many developers won't want to build:
+# - debugger: this requires QT to build
+#
+{
+ 'targets': [
+ {
+ 'target_name': 'most',
+ 'type': 'none',
+ 'dependencies': [
+ # The minimal set of static libraries for basic Skia functionality.
+ 'skia_base_libs.gyp:skia_base_libs',
+
+ 'bench.gyp:bench',
+ 'gm.gyp:gm',
+ 'SampleApp.gyp:SampleApp',
+ 'tests.gyp:tests',
+ 'tools.gyp:tools',
+ ],
+ 'conditions': [
+ ['skia_os == "android"', {
+ 'dependencies': [ 'android_system.gyp:SkiaAndroidApp' ],
+ }],
+ ],
+ },
+ ],
+}
+
+# Local Variables:
+# tab-width:2
+# indent-tabs-mode:nil
+# End:
+# vim: set expandtab tabstop=2 shiftwidth=2:
diff --git a/gyp_skia b/gyp_skia
index d6b5504..af08f07 100755
--- a/gyp_skia
+++ b/gyp_skia
@@ -88,6 +88,9 @@
# Tell make to write its output into the same dir
args.extend(['-Goutput_dir=.'])
+ # By default, we build 'most' instead of 'all' or 'everything'. See skia.gyp.
+ args.extend(['-Gdefault_target=most'])
+
# Special arguments for generating Visual Studio projects:
# - msvs_version forces generation of Visual Studio 2010 project so that we
# can use msbuild.exe
diff --git a/make.py b/make.py
index 1e0b7e7..03421fe 100644
--- a/make.py
+++ b/make.py
@@ -4,7 +4,7 @@
# found in the LICENSE file.
# "Makefile" replacement to build skia for Windows.
-# More info at http://code.google.com/p/skia/wiki/DocRoot
+# More info at https://sites.google.com/site/skiadocs/
#
# Some usage examples:
# make clean
@@ -20,9 +20,10 @@
BUILDTYPE = 'Debug'
# special targets
-TARGET_ALL = 'all'
-TARGET_CLEAN = 'clean'
-TARGET_GYP = 'gyp'
+TARGET_ALL = 'all'
+TARGET_CLEAN = 'clean'
+TARGET_DEFAULT = 'most'
+TARGET_GYP = 'gyp'
LIST_OF_ALL_TARGETS = ['SampleApp', 'bench', 'gm', 'tests', 'tools']
SCRIPT_DIR = os.path.abspath(os.path.dirname(__file__))
@@ -133,6 +134,11 @@
"""
# handle any variable-setting parameters or special targets
global BUILDTYPE
+
+ # if no targets were specified at all, make default target
+ if not args:
+ args = [TARGET_DEFAULT]
+
targets = []
for arg in args:
if arg == TARGET_ALL:
@@ -157,19 +163,19 @@
elif os.name == 'posix':
if sys.platform == 'darwin':
print 'Mac developers should not run this script; see ' \
- 'http://code.google.com/p/skia/wiki/GettingStartedOnMac'
+ 'https://sites.google.com/site/skiadocs/user-documentation/quick-start-guides/mac'
sys.exit(1)
elif sys.platform == 'cygwin':
- print 'Windows development on Cygwin is not currently supported; ' \
- 'see http://code.google.com/p/skia/wiki/GettingStartedOnWindows'
+ print 'Windows development on Cygwin is not currently supported; see ' \
+ 'https://sites.google.com/site/skiadocs/user-documentation/quick-start-guides/windows'
sys.exit(1)
else:
print 'Unix developers should not run this script; see ' \
- 'http://code.google.com/p/skia/wiki/GettingStartedOnLinux'
+ 'https://sites.google.com/site/skiadocs/user-documentation/quick-start-guides/linux'
sys.exit(1)
else:
print 'unknown platform (os.name=%s, sys.platform=%s); see %s' % (
- os.name, sys.platform, 'http://code.google.com/p/skia/wiki/DocRoot')
+ os.name, sys.platform, 'https://sites.google.com/site/skiadocs/')
sys.exit(1)
sys.exit(0)
diff --git a/skia.gyp b/skia.gyp
index d41df7f..0f3f375 100644
--- a/skia.gyp
+++ b/skia.gyp
@@ -20,6 +20,7 @@
'gyp/bench.gyp:bench',
'gyp/gm.gyp:gm',
+ 'gyp/most.gyp:most',
'gyp/SampleApp.gyp:SampleApp',
'gyp/tests.gyp:tests',
'gyp/tools.gyp:tools',