OLD | NEW |
1 #!/bin/bash -e | 1 #!/bin/bash -e |
2 # | 2 # |
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 # This script is used to compare vpx_config.h and vpx_config.asm to | 7 # This script is used to compare vpx_config.h and vpx_config.asm to |
8 # verify the two files match. | 8 # verify the two files match. |
9 # | 9 # |
10 # Arguments: | 10 # Arguments: |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 # Remove all spaces. | 56 # Remove all spaces. |
57 combined_config="$(echo "$combined_config" | sed 's/[ \t]//g')" | 57 combined_config="$(echo "$combined_config" | sed 's/[ \t]//g')" |
58 | 58 |
59 # Remove #define in the header file. | 59 # Remove #define in the header file. |
60 combined_config="$(echo "$combined_config" | sed 's/.*define//')" | 60 combined_config="$(echo "$combined_config" | sed 's/.*define//')" |
61 | 61 |
62 # Remove equ in the ASM file. | 62 # Remove equ in the ASM file. |
63 combined_config="$(echo "$combined_config" | sed 's/\.equ//')" # gas style | 63 combined_config="$(echo "$combined_config" | sed 's/\.equ//')" # gas style |
64 combined_config="$(echo "$combined_config" | sed 's/equ//')" # rvds style | 64 combined_config="$(echo "$combined_config" | sed 's/equ//')" # rvds style |
65 | 65 |
| 66 # Remove %define in YASM ASM files. |
| 67 combined_config="$(echo "$combined_config" | sed 's/%define\s *//')" # yasm styl
e |
| 68 |
66 # Remove useless comma in gas style assembly file. | 69 # Remove useless comma in gas style assembly file. |
67 combined_config="$(echo "$combined_config" | sed 's/,//')" | 70 combined_config="$(echo "$combined_config" | sed 's/,//')" |
68 | 71 |
69 # Substitute 0 with =no. | 72 # Substitute 0 with =no. |
70 combined_config="$(echo "$combined_config" | sed 's/0$/=no/')" | 73 combined_config="$(echo "$combined_config" | sed 's/0$/=no/')" |
71 | 74 |
72 # Substitute 1 with =yes. | 75 # Substitute 1 with =yes. |
73 combined_config="$(echo "$combined_config" | sed 's/1$/=yes/')" | 76 combined_config="$(echo "$combined_config" | sed 's/1$/=yes/')" |
74 | 77 |
75 # Find the mismatch variables. | 78 # Find the mismatch variables. |
(...skipping 21 matching lines...) Expand all Loading... |
97 # Do some additional filter to make libvpx happy. | 100 # Do some additional filter to make libvpx happy. |
98 combined_config="$(echo "$combined_config" | grep -v ARCH_X86=no)" | 101 combined_config="$(echo "$combined_config" | grep -v ARCH_X86=no)" |
99 combined_config="$(echo "$combined_config" | grep -v ARCH_X86_64=no)" | 102 combined_config="$(echo "$combined_config" | grep -v ARCH_X86_64=no)" |
100 | 103 |
101 # Print out the unique configurations. | 104 # Print out the unique configurations. |
102 if [ -n "$out_file" ]; then | 105 if [ -n "$out_file" ]; then |
103 echo "$combined_config" | sort | uniq > $out_file | 106 echo "$combined_config" | sort | uniq > $out_file |
104 else | 107 else |
105 echo "$combined_config" | sort | uniq | 108 echo "$combined_config" | sort | uniq |
106 fi | 109 fi |
OLD | NEW |