aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2015-05-16 15:47:10 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-05-16 15:47:10 -0700
commitb91f7562c409f1e88edd133293e09146cd437743 (patch)
tree41035257d00aa0edb375762be4c216d6d40d79b0
parent6bad28de5268cbcf504799782477a7e33991610c (diff)
Experiment with find as a road to Gyp sanity.
-rw-r--r--gyp/bench.gyp11
-rw-r--r--gyp/bench.gypi96
-rw-r--r--gyp/find.py22
-rw-r--r--gyp/iOSShell.gyp8
-rw-r--r--gyp/nanomsg.gyp87
5 files changed, 28 insertions, 196 deletions
diff --git a/gyp/bench.gyp b/gyp/bench.gyp
index b2459f9116..de564a96db 100644
--- a/gyp/bench.gyp
+++ b/gyp/bench.gyp
@@ -14,14 +14,6 @@
'type': 'executable',
'sources': [
'../gm/gm.cpp',
- '../bench/CodecBench.cpp',
- '../bench/DecodingBench.cpp',
- '../bench/DecodingSubsetBench.cpp',
- '../bench/GMBench.cpp',
- '../bench/RecordingBench.cpp',
- '../bench/SKPAnimationBench.cpp',
- '../bench/SKPBench.cpp',
- '../bench/nanobench.cpp',
],
'includes': [
'bench.gypi',
@@ -48,9 +40,6 @@
'../../../frameworks/base/libs/hwui/',
'../../../frameworks/native/include/',
],
- 'sources': [
- '../bench/nanobenchAndroid.cpp',
- ],
'dependencies': [
'utils.gyp:android_utils',
],
diff --git a/gyp/bench.gypi b/gyp/bench.gypi
index 3e87f6bc8c..f0a203e29e 100644
--- a/gyp/bench.gypi
+++ b/gyp/bench.gypi
@@ -10,6 +10,8 @@
'../src/utils',
'../tools',
],
+ 'sources': [ '<!@(python find.py ../bench "*.cpp")' ],
+
'dependencies': [
'etc1.gyp:libetc1',
'skia_lib.gyp:skia_lib',
@@ -21,96 +23,8 @@
'include_dirs': [ '../src/gpu' ],
'dependencies': [ 'gputest.gyp:skgputest' ],
}],
- ],
- 'sources': [
- '../bench/Benchmark.cpp',
- '../bench/Benchmark.h',
-
- '../bench/AAClipBench.cpp',
- '../bench/AlternatingColorPatternBench.cpp',
- '../bench/BezierBench.cpp',
- '../bench/BigPathBench.cpp',
- '../bench/BitmapBench.cpp',
- '../bench/BitmapRectBench.cpp',
- '../bench/BitmapScaleBench.cpp',
- '../bench/BlurBench.cpp',
- '../bench/BlurImageFilterBench.cpp',
- '../bench/BlurRectBench.cpp',
- '../bench/BlurRectsBench.cpp',
- '../bench/BlurRoundRectBench.cpp',
- '../bench/ChartBench.cpp',
- '../bench/ChecksumBench.cpp',
- '../bench/ChromeBench.cpp',
- '../bench/CmapBench.cpp',
- '../bench/ColorCubeBench.cpp',
- '../bench/ColorFilterBench.cpp',
- '../bench/ColorPrivBench.cpp',
- '../bench/ControlBench.cpp',
- '../bench/CoverageBench.cpp',
- '../bench/DashBench.cpp',
- '../bench/DeferredSurfaceCopyBench.cpp',
- '../bench/DisplacementBench.cpp',
- '../bench/ETCBitmapBench.cpp',
- '../bench/FSRectBench.cpp',
- '../bench/FontCacheBench.cpp',
- '../bench/FontScalerBench.cpp',
- '../bench/GameBench.cpp',
- '../bench/GeometryBench.cpp',
- '../bench/GrMemoryPoolBench.cpp',
- '../bench/GrResourceCacheBench.cpp',
- '../bench/GrOrderedSetBench.cpp',
- '../bench/GradientBench.cpp',
- '../bench/HairlinePathBench.cpp',
- '../bench/ImageCacheBench.cpp',
- '../bench/ImageFilterDAGBench.cpp',
- '../bench/ImageFilterCollapse.cpp',
- '../bench/InterpBench.cpp',
- '../bench/LightingBench.cpp',
- '../bench/LineBench.cpp',
- '../bench/MagnifierBench.cpp',
- '../bench/MathBench.cpp',
- '../bench/Matrix44Bench.cpp',
- '../bench/MatrixBench.cpp',
- '../bench/MatrixConvolutionBench.cpp',
- '../bench/MemcpyBench.cpp',
- '../bench/MemoryBench.cpp',
- '../bench/MemsetBench.cpp',
- '../bench/MergeBench.cpp',
- '../bench/MipMapBench.cpp',
- '../bench/MorphologyBench.cpp',
- '../bench/MutexBench.cpp',
- '../bench/PMFloatBench.cpp',
- '../bench/PatchBench.cpp',
- '../bench/PatchGridBench.cpp',
- '../bench/PathBench.cpp',
- '../bench/PathIterBench.cpp',
- '../bench/PerlinNoiseBench.cpp',
- '../bench/PictureNestingBench.cpp',
- '../bench/PictureOverheadBench.cpp',
- '../bench/PicturePlaybackBench.cpp',
- '../bench/PremulAndUnpremulAlphaOpsBench.cpp',
- '../bench/RTreeBench.cpp',
- '../bench/ReadPixBench.cpp',
- '../bench/RectBench.cpp',
- '../bench/RectanizerBench.cpp',
- '../bench/RectoriBench.cpp',
- '../bench/RefCntBench.cpp',
- '../bench/RegionBench.cpp',
- '../bench/RegionContainBench.cpp',
- '../bench/RepeatTileBench.cpp',
- '../bench/RotatedRectBench.cpp',
- '../bench/ScalarBench.cpp',
- '../bench/ShaderMaskBench.cpp',
- '../bench/SkipZeroesBench.cpp',
- '../bench/SortBench.cpp',
- '../bench/StrokeBench.cpp',
- '../bench/TableBench.cpp',
- '../bench/TextBench.cpp',
- '../bench/TextBlobBench.cpp',
- '../bench/TileBench.cpp',
- '../bench/VertBench.cpp',
- '../bench/WritePixelsBench.cpp',
- '../bench/WriterBench.cpp',
- '../bench/XfermodeBench.cpp',
+ ['not skia_android_framework', {
+ 'sources!': [ '../bench/nanobenchAndroid.cpp' ],
+ }],
],
}
diff --git a/gyp/find.py b/gyp/find.py
new file mode 100644
index 0000000000..a5f40db180
--- /dev/null
+++ b/gyp/find.py
@@ -0,0 +1,22 @@
+# Copyright 2015 Google Inc.
+#
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+'''
+find.py is a poor-man's emulation of `find $1 -name=$2` on Unix.
+
+Call python find.py <directory> <glob> to list all files matching glob under
+directory (recursively). E.g.
+ $ python find.py ../tests/ '*.cpp'
+will print all .cpp files under ../tests/.
+'''
+
+import fnmatch
+import os
+import sys
+
+for d, kids, files in os.walk(sys.argv[1]):
+ for f in files:
+ if fnmatch.fnmatch(f, sys.argv[2]):
+ print os.path.join(d, f).replace('\\', '/') # Gyp wants Unix paths.
diff --git a/gyp/iOSShell.gyp b/gyp/iOSShell.gyp
index bc7a2fbf6e..fe43ebcbdb 100644
--- a/gyp/iOSShell.gyp
+++ b/gyp/iOSShell.gyp
@@ -22,14 +22,6 @@
'xml.gyp:xml',
],
'sources': [
- '../bench/CodecBench.cpp',
- '../bench/DecodingBench.cpp',
- '../bench/DecodingSubsetBench.cpp',
- '../bench/GMBench.cpp',
- '../bench/RecordingBench.cpp',
- '../bench/SKPBench.cpp',
- '../bench/SKPAnimationBench.cpp',
- '../bench/nanobench.cpp',
'../tests/skia_test.cpp',
'../tools/iOSShell.cpp',
'../src/views/mac/SkEventNotifier.mm',
diff --git a/gyp/nanomsg.gyp b/gyp/nanomsg.gyp
index 987702ba93..0f7eab11d1 100644
--- a/gyp/nanomsg.gyp
+++ b/gyp/nanomsg.gyp
@@ -25,93 +25,8 @@
'include_dirs': [ '../third_party/externals' ]
},
- # To refresh: cd gyp; find ../third_party/externals/nanomsg/src -name "*.c"
'sources': [
- '../third_party/externals/nanomsg/src/aio/ctx.c',
- '../third_party/externals/nanomsg/src/aio/fsm.c',
- '../third_party/externals/nanomsg/src/aio/poller.c',
- '../third_party/externals/nanomsg/src/aio/pool.c',
- '../third_party/externals/nanomsg/src/aio/timer.c',
- '../third_party/externals/nanomsg/src/aio/timerset.c',
- '../third_party/externals/nanomsg/src/aio/usock.c',
- '../third_party/externals/nanomsg/src/aio/worker.c',
- '../third_party/externals/nanomsg/src/core/device.c',
- '../third_party/externals/nanomsg/src/core/ep.c',
- '../third_party/externals/nanomsg/src/core/epbase.c',
- '../third_party/externals/nanomsg/src/core/global.c',
- '../third_party/externals/nanomsg/src/core/pipe.c',
- '../third_party/externals/nanomsg/src/core/poll.c',
- '../third_party/externals/nanomsg/src/core/sock.c',
- '../third_party/externals/nanomsg/src/core/sockbase.c',
- '../third_party/externals/nanomsg/src/core/symbol.c',
- '../third_party/externals/nanomsg/src/protocols/bus/bus.c',
- '../third_party/externals/nanomsg/src/protocols/bus/xbus.c',
- '../third_party/externals/nanomsg/src/protocols/pair/pair.c',
- '../third_party/externals/nanomsg/src/protocols/pair/xpair.c',
- '../third_party/externals/nanomsg/src/protocols/pipeline/pull.c',
- '../third_party/externals/nanomsg/src/protocols/pipeline/push.c',
- '../third_party/externals/nanomsg/src/protocols/pipeline/xpull.c',
- '../third_party/externals/nanomsg/src/protocols/pipeline/xpush.c',
- '../third_party/externals/nanomsg/src/protocols/pubsub/pub.c',
- '../third_party/externals/nanomsg/src/protocols/pubsub/sub.c',
- '../third_party/externals/nanomsg/src/protocols/pubsub/trie.c',
- '../third_party/externals/nanomsg/src/protocols/pubsub/xpub.c',
- '../third_party/externals/nanomsg/src/protocols/pubsub/xsub.c',
- '../third_party/externals/nanomsg/src/protocols/reqrep/rep.c',
- '../third_party/externals/nanomsg/src/protocols/reqrep/req.c',
- '../third_party/externals/nanomsg/src/protocols/reqrep/xrep.c',
- '../third_party/externals/nanomsg/src/protocols/reqrep/xreq.c',
- '../third_party/externals/nanomsg/src/protocols/survey/respondent.c',
- '../third_party/externals/nanomsg/src/protocols/survey/surveyor.c',
- '../third_party/externals/nanomsg/src/protocols/survey/xrespondent.c',
- '../third_party/externals/nanomsg/src/protocols/survey/xsurveyor.c',
- '../third_party/externals/nanomsg/src/protocols/utils/dist.c',
- '../third_party/externals/nanomsg/src/protocols/utils/excl.c',
- '../third_party/externals/nanomsg/src/protocols/utils/fq.c',
- '../third_party/externals/nanomsg/src/protocols/utils/lb.c',
- '../third_party/externals/nanomsg/src/protocols/utils/priolist.c',
- '../third_party/externals/nanomsg/src/transports/inproc/binproc.c',
- '../third_party/externals/nanomsg/src/transports/inproc/cinproc.c',
- '../third_party/externals/nanomsg/src/transports/inproc/inproc.c',
- '../third_party/externals/nanomsg/src/transports/inproc/ins.c',
- '../third_party/externals/nanomsg/src/transports/inproc/msgqueue.c',
- '../third_party/externals/nanomsg/src/transports/inproc/sinproc.c',
- '../third_party/externals/nanomsg/src/transports/ipc/aipc.c',
- '../third_party/externals/nanomsg/src/transports/ipc/bipc.c',
- '../third_party/externals/nanomsg/src/transports/ipc/cipc.c',
- '../third_party/externals/nanomsg/src/transports/ipc/ipc.c',
- '../third_party/externals/nanomsg/src/transports/ipc/sipc.c',
- '../third_party/externals/nanomsg/src/transports/tcp/atcp.c',
- '../third_party/externals/nanomsg/src/transports/tcp/btcp.c',
- '../third_party/externals/nanomsg/src/transports/tcp/ctcp.c',
- '../third_party/externals/nanomsg/src/transports/tcp/stcp.c',
- '../third_party/externals/nanomsg/src/transports/tcp/tcp.c',
- '../third_party/externals/nanomsg/src/transports/utils/backoff.c',
- '../third_party/externals/nanomsg/src/transports/utils/dns.c',
- '../third_party/externals/nanomsg/src/transports/utils/iface.c',
- '../third_party/externals/nanomsg/src/transports/utils/literal.c',
- '../third_party/externals/nanomsg/src/transports/utils/port.c',
- '../third_party/externals/nanomsg/src/transports/utils/streamhdr.c',
- '../third_party/externals/nanomsg/src/utils/alloc.c',
- '../third_party/externals/nanomsg/src/utils/atomic.c',
- '../third_party/externals/nanomsg/src/utils/chunk.c',
- '../third_party/externals/nanomsg/src/utils/chunkref.c',
- '../third_party/externals/nanomsg/src/utils/clock.c',
- '../third_party/externals/nanomsg/src/utils/closefd.c',
- '../third_party/externals/nanomsg/src/utils/efd.c',
- '../third_party/externals/nanomsg/src/utils/err.c',
- '../third_party/externals/nanomsg/src/utils/glock.c',
- '../third_party/externals/nanomsg/src/utils/hash.c',
- '../third_party/externals/nanomsg/src/utils/list.c',
- '../third_party/externals/nanomsg/src/utils/msg.c',
- '../third_party/externals/nanomsg/src/utils/mutex.c',
- '../third_party/externals/nanomsg/src/utils/queue.c',
- '../third_party/externals/nanomsg/src/utils/random.c',
- '../third_party/externals/nanomsg/src/utils/sem.c',
- '../third_party/externals/nanomsg/src/utils/sleep.c',
- '../third_party/externals/nanomsg/src/utils/stopwatch.c',
- '../third_party/externals/nanomsg/src/utils/thread.c',
- '../third_party/externals/nanomsg/src/utils/wire.c',
+ '<!@(python find.py ../third_party/externals/nanomsg/src "*.c")'
],
# TODO(mtklein): Support Windows?