GN: get echo-headers sources via exec_script

exec_script runs every time gn does, which is explicitly on every one of our
bot runs.  That should be enough to obviate the .git/logs/HEAD hack.

Easiest way to do this was to swap around find.py's argument order to allow
multiple search directories.  This is the root of all the .gyp changes.

This moves the blacklist into BUILD.gn, which I think is nice.
It expands it a little as we're now searching recursively, into include/gpu/vk
which we can't include safely without the Vulkan SDK.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2205903004

Review-Url: https://codereview.chromium.org/2205903004
diff --git a/gyp/bench.gypi b/gyp/bench.gypi
index 69e7086..a58e66e 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 247a576..d784dc2 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 a2d1ade..d96feec 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 f19ff17..0dfc0bd 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 746fea1..3bfd289 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 5bdc2be..f8127a9 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 4a98503..f1a89c7 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 0f7eab1..b09bd42 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 0704ba1..9138561 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 079876c..21712fc 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 b1ce798..eb2b9c8 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 7b93617..b5ec804 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 b2563ef..f94c875 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',