libvpx: Fix generated offsets to work with WebView

For WebView use hardcoded unpack lib as an input trigger, but then
an abspath to find the lib.

BUG=377062
TBR=tomfinegan@chromium.org

Review URL: https://codereview.chromium.org/325313007

git-svn-id: http://src.chromium.org/svn/trunk/deps/third_party/libvpx@277778 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
diff --git a/libvpx.gyp b/libvpx.gyp
index 5c92b67..0992980 100644
--- a/libvpx.gyp
+++ b/libvpx.gyp
@@ -466,14 +466,17 @@
         'libvpx_obj_int_extract#host',
       ],
       'variables' : {
+        # unpack_lib is used as an input to unpack_lib_posix.gypi.
         'unpack_lib' : '<(shared_generated_dir)/libvpx_asm_offsets_vp8.a',
+        'unpack_lib_search_path' : '<(unpack_lib)',
         'output_format':'',
         'output_dir': '<(shared_generated_dir)',
         'conditions' : [
           ['android_webview_build==1', {
             # pass the empty string for 3rd and 4th arguments of
             # intermediates-dir-for macro.
-            'unpack_lib' : '$(abspath $(call intermediates-dir-for,STATIC_LIBRARIES,libvpx_asm_offsets_vp8,,,$(gyp_var_prefix)))/libvpx_asm_offsets_vp8.a',
+            'unpack_lib' : '$(call intermediates-dir-for,STATIC_LIBRARIES,libvpx_asm_offsets_vp8,,,$(gyp_var_prefix))/libvpx_asm_offsets_vp8.a',
+            'unpack_lib_search_path' : '$(abspath <(unpack_lib))',
           }],
           ['(target_arch=="arm" or target_arch=="armv7")', {
             'output_format': 'gas',
@@ -510,7 +513,7 @@
         }, {
           'variables': {
             'unpack_lib_search_path_list': [
-              '-a', '<(unpack_lib)',
+              '-a', '<(unpack_lib_search_path)',
             ],
             'object_file_output_dir':'<(INTERMEDIATE_DIR)',
             'object_file_to_extract':'vp8_asm_enc_offsets.o'
@@ -538,13 +541,15 @@
       ],
       'variables' : {
         'unpack_lib' : '<(shared_generated_dir)/libvpx_asm_offsets_vpx_scale.a',
+        'unpack_lib_search_path' : '<(unpack_lib)',
         'output_format':'',
         'output_dir': '<(shared_generated_dir)',
         'conditions' : [
           ['android_webview_build==1', {
             # pass the empty string for 3rd and 4th arguments of
             # intermediates-dir-for macro.
-            'unpack_lib' : '$(abspath $(call intermediates-dir-for,STATIC_LIBRARIES,libvpx_asm_offsets_vpx_scale,,,$(gyp_var_prefix)))/libvpx_asm_offsets_vpx_scale.a',
+            'unpack_lib' : '$(call intermediates-dir-for,STATIC_LIBRARIES,libvpx_asm_offsets_vpx_scale,,,$(gyp_var_prefix))/libvpx_asm_offsets_vpx_scale.a',
+            'unpack_lib_search_path' : '$(abspath <(unpack_lib))',
           }],
           ['(target_arch=="arm" or target_arch=="armv7")', {
             'output_format': 'gas',
@@ -581,7 +586,7 @@
         }, {
           'variables': {
             'unpack_lib_search_path_list': [
-              '-a', '<(unpack_lib)',
+              '-a', '<(unpack_lib_search_path)',
             ],
             'object_file_output_dir':'<(INTERMEDIATE_DIR)',
             'object_file_to_extract':'vpx_scale_asm_offsets.o'