gyp: generate "everything" and "most" targets instead of "all"
"make all" at the toplevel now chains to "make everything" BUG=http://code.google.com/p/skia/issues/detail?id=932 Review URL: https://codereview.appspot.com/6651064 git-svn-id: http://skia.googlecode.com/svn/trunk@6116 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
f28dd8ab10
commit
6714ea4e4d
44
Makefile
44
Makefile
@ -25,21 +25,27 @@
|
||||
# If you want more fine-grained control, you can run gyp and then build the
|
||||
# gyp-generated projects yourself.
|
||||
#
|
||||
# See http://code.google.com/p/skia/wiki/DocRoot for complete documentation.
|
||||
# See https://sites.google.com/site/skiadocs/ for complete documentation.
|
||||
|
||||
BUILDTYPE ?= Debug
|
||||
CWD := $(shell pwd)
|
||||
ALL_TARGETS := skia_base_libs \
|
||||
bench \
|
||||
gm \
|
||||
most \
|
||||
SampleApp \
|
||||
tests \
|
||||
tools
|
||||
|
||||
ifneq (,$(findstring skia_os=android, $(GYP_DEFINES)))
|
||||
ALL_TARGETS += SkiaAndroidApp
|
||||
endif
|
||||
# Soon we should be able to get rid of VALID_TARGETS, and just pass control
|
||||
# to the gyp-generated Makefile for *any* target name.
|
||||
# But that will be a bit complicated, so let's keep it for a future CL.
|
||||
# Tracked as https://code.google.com/p/skia/issues/detail?id=947 ('eliminate
|
||||
# need for VALID_TARGETS in toplevel Makefile')
|
||||
VALID_TARGETS := \
|
||||
bench \
|
||||
debugger \
|
||||
everything \
|
||||
gm \
|
||||
most \
|
||||
SampleApp \
|
||||
SkiaAndroidApp \
|
||||
skia_base_libs \
|
||||
tests \
|
||||
tools
|
||||
|
||||
# Default target. This must be listed before all other targets.
|
||||
.PHONY: default
|
||||
@ -54,21 +60,19 @@ default: most
|
||||
|
||||
uname := $(shell uname)
|
||||
ifneq (,$(findstring CYGWIN, $(uname)))
|
||||
$(error Cannot build using Make on Windows. See http://code.google.com/p/skia/wiki/GettingStartedOnWindows)
|
||||
$(error Cannot build using Make on Windows. See https://sites.google.com/site/skiadocs/user-documentation/quick-start-guides/windows)
|
||||
endif
|
||||
|
||||
# If user requests "make all", chain to our explicitly-declared "everything"
|
||||
# target. See https://code.google.com/p/skia/issues/detail?id=932 ("gyp
|
||||
# automatically creates "all" target on some build flavors but not others")
|
||||
.PHONY: all
|
||||
all: $(ALL_TARGETS)
|
||||
all: everything
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf out xcodebuild
|
||||
|
||||
# Add the debugger to the target list after the 'all' target is defined so that the
|
||||
# debugger is only executed with 'make debugger' and not 'make all' as well. The reason
|
||||
# for this is unless the user has Qt installed the debugger target will fail.
|
||||
ALL_TARGETS += debugger
|
||||
|
||||
# Run gyp no matter what.
|
||||
.PHONY: gyp
|
||||
gyp:
|
||||
@ -99,8 +103,8 @@ out/Makefile:
|
||||
# the gyp-generated buildfiles.
|
||||
#
|
||||
# For the Mac, we create a convenience symlink to the generated binary.
|
||||
.PHONY: $(ALL_TARGETS)
|
||||
$(ALL_TARGETS):: gyp_if_needed
|
||||
.PHONY: $(VALID_TARGETS)
|
||||
$(VALID_TARGETS):: gyp_if_needed
|
||||
ifneq (,$(findstring skia_os=android, $(GYP_DEFINES)))
|
||||
$(MAKE) -C out $@ BUILDTYPE=$(BUILDTYPE)
|
||||
else ifneq (,$(findstring Linux, $(uname)))
|
||||
|
41
gyp/all.gyp
41
gyp/all.gyp
@ -1,41 +0,0 @@
|
||||
# Creates a Makefile that is capable of building all executable targets.
|
||||
#
|
||||
# To build on Linux:
|
||||
# ./gyp_skia && make all
|
||||
#
|
||||
# Building on other platforms not tested yet.
|
||||
#
|
||||
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
# THIS IS DEPRECATED IN FAVOR OF trunk/skia.gyp !!!
|
||||
# Questions? Contact epoger@google.com
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
|
||||
{
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'all',
|
||||
'type': 'none',
|
||||
'dependencies': [
|
||||
'bench.gyp:bench',
|
||||
'gm.gyp:gm',
|
||||
'SampleApp.gyp:SampleApp',
|
||||
'tests.gyp:tests',
|
||||
'tools.gyp:tools',
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
# Local Variables:
|
||||
# tab-width:2
|
||||
# indent-tabs-mode:nil
|
||||
# End:
|
||||
# vim: set expandtab tabstop=2 shiftwidth=2:
|
31
gyp/everything.gyp
Normal file
31
gyp/everything.gyp
Normal file
@ -0,0 +1,31 @@
|
||||
# Build EVERYTHING provided by Skia.
|
||||
# (Start with the "most" target, and then add targets that we intentionally
|
||||
# left out of "most". See most.gyp for an explanation of which targets are
|
||||
# left out of "most".)
|
||||
#
|
||||
# We used to call this the 'all' target, but in SOME cases that
|
||||
# conflicted with an automatically-generated 'all' target.
|
||||
# See https://code.google.com/p/skia/issues/detail?id=932
|
||||
#
|
||||
{
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'everything',
|
||||
'type': 'none',
|
||||
'dependencies': ['most.gyp:most'],
|
||||
'conditions': [
|
||||
['skia_os == "ios" or skia_os == "android" or (skia_os == "mac" and skia_arch_width == 32)', {
|
||||
# debugger is not supported on this platform
|
||||
}, {
|
||||
'dependencies': [ 'debugger.gyp:debugger' ],
|
||||
}],
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
# Local Variables:
|
||||
# tab-width:2
|
||||
# indent-tabs-mode:nil
|
||||
# End:
|
||||
# vim: set expandtab tabstop=2 shiftwidth=2:
|
6
make.py
6
make.py
@ -24,7 +24,6 @@ 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__))
|
||||
OUT_SUBDIR = 'out'
|
||||
@ -141,8 +140,11 @@ def Make(args):
|
||||
|
||||
targets = []
|
||||
for arg in args:
|
||||
# If user requests "make all", chain to our explicitly-declared "everything"
|
||||
# target. See https://code.google.com/p/skia/issues/detail?id=932 ("gyp
|
||||
# automatically creates "all" target on some build flavors but not others")
|
||||
if arg == TARGET_ALL:
|
||||
targets.extend(LIST_OF_ALL_TARGETS)
|
||||
targets.append('everything')
|
||||
elif arg == TARGET_CLEAN:
|
||||
MakeClean()
|
||||
elif arg.startswith('BUILDTYPE='):
|
||||
|
26
skia.gyp
26
skia.gyp
@ -6,36 +6,16 @@
|
||||
# More targets are defined within the gyp/ directory, but those are
|
||||
# not intended for external use and may change without notice.
|
||||
#
|
||||
# Full documentation at http://code.google.com/p/skia/wiki/DocRoot
|
||||
# Full documentation at https://sites.google.com/site/skiadocs/
|
||||
#
|
||||
{
|
||||
'targets': [
|
||||
{
|
||||
# Use this target to build everything provided by Skia.
|
||||
'target_name': 'all',
|
||||
'target_name': 'alltargets',
|
||||
'type': 'none',
|
||||
'dependencies': [
|
||||
# The minimal set of static libraries for basic Skia functionality.
|
||||
'gyp/skia_base_libs.gyp:skia_base_libs',
|
||||
|
||||
'gyp/bench.gyp:bench',
|
||||
'gyp/gm.gyp:gm',
|
||||
'gyp/everything.gyp:everything',
|
||||
'gyp/most.gyp:most',
|
||||
'gyp/SampleApp.gyp:SampleApp',
|
||||
'gyp/tests.gyp:tests',
|
||||
'gyp/tools.gyp:tools',
|
||||
],
|
||||
'conditions': [
|
||||
['skia_os == "android"', {
|
||||
'dependencies': [
|
||||
'gyp/android_system.gyp:SkiaAndroidApp',
|
||||
],
|
||||
}],
|
||||
|
||||
# The debugger is not supported for iOS, Android and 32-bit Mac builds.
|
||||
['skia_os != "ios" and skia_os != "android" and (skia_os != "mac" or skia_arch_width == 64)', {
|
||||
'dependencies': [ 'gyp/debugger.gyp:debugger' ],
|
||||
}],
|
||||
],
|
||||
},
|
||||
],
|
||||
|
Loading…
Reference in New Issue
Block a user