diff options
-rw-r--r-- | BUILD.gn | 20 | ||||
-rw-r--r-- | gn/echo_headers.py | 16 | ||||
-rw-r--r-- | gyp/bench.gypi | 2 | ||||
-rw-r--r-- | gyp/find.py | 19 | ||||
-rw-r--r-- | gyp/fuzz.gyp | 2 | ||||
-rw-r--r-- | gyp/gmslides.gypi | 2 | ||||
-rw-r--r-- | gyp/gputest.gyp | 2 | ||||
-rw-r--r-- | gyp/harfbuzz.gyp | 2 | ||||
-rw-r--r-- | gyp/icu.gyp | 2 | ||||
-rw-r--r-- | gyp/nanomsg.gyp | 2 | ||||
-rw-r--r-- | gyp/sfntly.gyp | 2 | ||||
-rw-r--r-- | gyp/skiaserve.gyp | 5 | ||||
-rw-r--r-- | gyp/tests.gypi | 6 | ||||
-rw-r--r-- | gyp/tools.gyp | 2 | ||||
-rw-r--r-- | gyp/viewer.gyp | 4 |
15 files changed, 44 insertions, 44 deletions
@@ -285,11 +285,23 @@ component("skia") { } } +skia_h_headers = exec_script("gyp/find.py", + [ "*.h" ] + rebase_path(skia_public_includes), + "list lines", + []) - + [ + rebase_path("include/gpu/gl/GrGLConfig_chrome.h"), + rebase_path("include/gpu/vk/GrVkBackendContext.h"), + rebase_path("include/gpu/vk/GrVkDefines.h"), + rebase_path("include/gpu/vk/GrVkInterface.h"), + rebase_path("include/gpu/vk/GrVkTypes.h"), + rebase_path("include/ports/SkFontMgr_fontconfig.h"), + ] + action("skia.h") { script = "gn/echo_headers.py" args = [ rebase_path("$target_gen_dir/skia.h", root_build_dir) ] + - rebase_path(skia_public_includes, root_build_dir) - inputs = [ ".git/logs/HEAD" ] # ~~> Run any time GIT state changes. + rebase_path(skia_h_headers, root_build_dir) outputs = [ "$target_gen_dir/skia.h", ] @@ -401,8 +413,8 @@ test_lib("tool_utils") { gm_sources = exec_script("gyp/find.py", [ - rebase_path("gm"), "*.c*", + rebase_path("gm"), ], "list lines", []) @@ -418,8 +430,8 @@ test_lib("gm") { bench_sources = exec_script("gyp/find.py", [ - rebase_path("bench"), "*.c*", + rebase_path("bench"), ], "list lines", []) diff --git a/gn/echo_headers.py b/gn/echo_headers.py index 83938b3e2a..059838a6ff 100644 --- a/gn/echo_headers.py +++ b/gn/echo_headers.py @@ -6,23 +6,11 @@ # found in the LICENSE file. import sys -import os -import os.path -blacklist = [ - 'GrGLConfig_chrome.h', - 'SkFontMgr_fontconfig.h', -] - -headers = [] -for d in sys.argv[2:]: - headers.extend([f for f in os.listdir(d) - if os.path.isfile(os.path.join(d,f)) and f.endswith('.h')]) with open(sys.argv[1], "w") as f: f.write('// skia.h generated by GN.\n') f.write('#ifndef skia_h_DEFINED\n') f.write('#define skia_h_DEFINED\n') - for h in headers: - if h not in blacklist: - f.write('#include "' + h + '"\n') + for h in sys.argv[2:]: + f.write('#include "' + h + '"\n') f.write('#endif//skia_h_DEFINED\n') diff --git a/gyp/bench.gypi b/gyp/bench.gypi index 69e7086ca9..a58e66e091 100644 --- a/gyp/bench.gypi +++ b/gyp/bench.gypi @@ -13,7 +13,7 @@ '../src/pdf', '../src/utils', ], - 'sources': [ '<!@(python find.py ../bench "*.cpp")' ], + 'sources': [ '<!@(python find.py "*.cpp" ../bench)' ], 'dependencies': [ 'etc1.gyp:libetc1', diff --git a/gyp/find.py b/gyp/find.py index 247a576228..d784dc26b3 100644 --- a/gyp/find.py +++ b/gyp/find.py @@ -4,20 +4,21 @@ # found in the LICENSE file. ''' -find.py is a poor-man's emulation of `find $1 -name=$2` on Unix. +find.py is a poor-man's emulation of `find -name=$1 $2` on Unix. -Call python find.py <directory> <glob> to list all files matching glob under +Call python find.py <glob> <directory>... to list all files matching glob under directory (recursively). E.g. - $ python find.py ../tests/ '*.cpp' -will print all .cpp files under ../tests/. + $ python find.py '*.cpp' ../tests/ ../bench/ +will print all .cpp files under ../tests/ and ../bench/. ''' import fnmatch import os import sys -for d, kids, files in os.walk(sys.argv[1]): - files.sort() - for f in files: - if fnmatch.fnmatch(f, sys.argv[2]): - print os.path.join(d, f).replace('\\', '/') # Gyp wants Unix paths. +for directory in sys.argv[2:]: + for d, kids, files in os.walk(directory): + files.sort() + for f in files: + if fnmatch.fnmatch(f, sys.argv[1]): + print os.path.join(d, f).replace('\\', '/') # Gyp wants Unix paths. diff --git a/gyp/fuzz.gyp b/gyp/fuzz.gyp index a2d1ade12a..d96feec216 100644 --- a/gyp/fuzz.gyp +++ b/gyp/fuzz.gyp @@ -12,7 +12,7 @@ 'SK_FUZZ_LOGGING', ], 'sources': [ - '<!@(python find.py ../fuzz "*.cpp")', + '<!@(python find.py "*.cpp" ../fuzz)', '../tests/PathOpsDebug.cpp', ], 'dependencies': [ diff --git a/gyp/gmslides.gypi b/gyp/gmslides.gypi index f19ff17fee..0dfc0bd63e 100644 --- a/gyp/gmslides.gypi +++ b/gyp/gmslides.gypi @@ -19,7 +19,7 @@ # It'd be nice to do this in SampleApp.gypi, but I can't find a way to make it work. [ 'not ("<(_target_name)" == "SampleApp" and skia_is_bot)', { 'sources': [ - '<!@(python find.py ../gm "*.c*")', + '<!@(python find.py "*.c*" ../gm)', # Files needed by particular GMs '../src/gpu/batches/GrTestBatch.h', diff --git a/gyp/gputest.gyp b/gyp/gputest.gyp index 746fea180e..3bfd289b1a 100644 --- a/gyp/gputest.gyp +++ b/gyp/gputest.gyp @@ -29,7 +29,7 @@ 'skia_lib.gyp:skia_lib', ], 'sources': [ - '<!@(python find.py ../tools/gpu "*")' + '<!@(python find.py "*" ../tools/gpu)' ], 'conditions': [ [ 'skia_mesa', { 'dependencies': [ 'osmesa' ] } ], diff --git a/gyp/harfbuzz.gyp b/gyp/harfbuzz.gyp index 5bdc2be864..f8127a926e 100644 --- a/gyp/harfbuzz.gyp +++ b/gyp/harfbuzz.gyp @@ -17,7 +17,7 @@ 'HB_NO_MT', ], 'sources': [ - '<!@(python find.py <(hb_directory)/src "hb-*.c*")', + '<!@(python find.py "hb-*.c*" <(hb_directory)/src)', ], 'sources!': [ '<(hb_directory)/src/hb-directwrite.cc', diff --git a/gyp/icu.gyp b/gyp/icu.gyp index 4a985032c2..f1a89c798e 100644 --- a/gyp/icu.gyp +++ b/gyp/icu.gyp @@ -15,7 +15,7 @@ 'target_name': 'icuuc', 'type': '<(component)', 'sources': [ - '<!@(python find.py ../third_party/externals/icu/source/common "*.c*")' + '<!@(python find.py "*.c*" ../third_party/externals/icu/source/common)' ], 'defines': [ 'U_COMMON_IMPLEMENTATION', diff --git a/gyp/nanomsg.gyp b/gyp/nanomsg.gyp index 0f7eab11d1..b09bd42d7f 100644 --- a/gyp/nanomsg.gyp +++ b/gyp/nanomsg.gyp @@ -26,7 +26,7 @@ }, 'sources': [ - '<!@(python find.py ../third_party/externals/nanomsg/src "*.c")' + '<!@(python find.py "*.c" ../third_party/externals/nanomsg/src)' ], # TODO(mtklein): Support Windows? diff --git a/gyp/sfntly.gyp b/gyp/sfntly.gyp index 0704ba194a..91385618a5 100644 --- a/gyp/sfntly.gyp +++ b/gyp/sfntly.gyp @@ -22,7 +22,7 @@ 'sources': [ '<(sfntly_src_path)/sample/chromium/font_subsetter.cc', '<(sfntly_src_path)/sample/chromium/subsetter_impl.cc', - '<!@(python find.py "<(sfntly_src_path)/sfntly" "*.c*")' + '<!@(python find.py "*.c*" "<(sfntly_src_path)/sfntly")' ], 'include_dirs': [ '<(sfntly_src_path)', diff --git a/gyp/skiaserve.gyp b/gyp/skiaserve.gyp index 079876ca28..21712fcbbf 100644 --- a/gyp/skiaserve.gyp +++ b/gyp/skiaserve.gyp @@ -19,7 +19,7 @@ '../tools/debugger', '../tools/json', ], - 'sources': [ + 'sources': [ # Stuff for the debug canvas '../tools/debugger/SkDrawCommand.h', '../tools/debugger/SkDrawCommand.cpp', @@ -31,8 +31,7 @@ '../tools/debugger/SkObjectParser.cpp', '../tools/debugger/SkOverdrawMode.h', '../tools/debugger/SkOverdrawMode.cpp', - '<!@(python find.py ../tools/skiaserve "*.cpp")', - '<!@(python find.py ../tools/skiaserve/urlhandlers "*.cpp")', + '<!@(python find.py "*.cpp" ../tools/skiaserve ../tools/skiaserve/urlhandlers)', ], 'dependencies': [ 'flags.gyp:flags', diff --git a/gyp/tests.gypi b/gyp/tests.gypi index b1ce798c0d..eb2b9c8a94 100644 --- a/gyp/tests.gypi +++ b/gyp/tests.gypi @@ -35,17 +35,17 @@ [ 'not skia_pdf', { 'dependencies!': [ 'pdf.gyp:pdf', 'zlib.gyp:zlib' ], 'dependencies': [ 'pdf.gyp:nopdf' ], - 'sources!': [ '<!@(python find.py ../tests "PDF*.c*")', ], + 'sources!': [ '<!@(python find.py "PDF*.c*" ../tests)', ], }], [ 'skia_gpu_extra_tests_path', { 'sources': [ - '<!@(python find.py <(skia_gpu_extra_tests_path) "*.c*")', + '<!@(python find.py "*.c*" <(skia_gpu_extra_tests_path))', ], }], ], 'sources': [ '../tests/Test.h', - '<!@(python find.py ../tests "*.c*")', + '<!@(python find.py "*.c*" ../tests)', '../tools/debugger/SkDrawCommand.h', '../tools/debugger/SkDrawCommand.cpp', '../tools/debugger/SkDebugCanvas.h', diff --git a/gyp/tools.gyp b/gyp/tools.gyp index 7b936171fd..b5ec80473e 100644 --- a/gyp/tools.gyp +++ b/gyp/tools.gyp @@ -116,7 +116,7 @@ 'sources': [ '../tools/monobench.cpp', '../bench/Benchmark.cpp', - '<!@(python find.py ../bench "*Bench.cpp")', + '<!@(python find.py "*Bench.cpp" ../bench)', ], 'sources!': [ '../bench/GMBench.cpp', diff --git a/gyp/viewer.gyp b/gyp/viewer.gyp index b2563ef537..f94c87558e 100644 --- a/gyp/viewer.gyp +++ b/gyp/viewer.gyp @@ -31,7 +31,7 @@ ], 'sources': [ '../gm/gm.cpp', - '<!@(python find.py ../tools/viewer "*.cpp")', + '<!@(python find.py "*.cpp" ../tools/viewer)', # views (subset of files for the Android build) '../src/views/SkEvent.cpp', @@ -48,7 +48,7 @@ 'sources!': [ '../samplecode/SampleSkLayer.cpp', #relies on SkMatrix44 which doesn't compile '../samplecode/SampleFontCache.cpp', #relies on pthread.h - ], + ], 'dependencies': [ 'flags.gyp:flags', 'gputest.gyp:skgputest', |