Manuel Pégourié-Gonnard | 3385cf4 | 2015-04-02 17:59:30 +0100 | [diff] [blame] | 1 | #!/bin/sh |
Bence Szépkúti | 468a76f | 2020-05-26 00:33:31 +0200 | [diff] [blame] | 2 | # |
| 3 | # Copyright (C) 2015, Arm Limited, All Rights Reserved |
Bence Szépkúti | 51b41d5 | 2020-05-26 01:54:15 +0200 | [diff] [blame^] | 4 | # SPDX-License-Identifier: Apache-2.0 |
| 5 | # |
| 6 | # Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 7 | # not use this file except in compliance with the License. |
| 8 | # You may obtain a copy of the License at |
| 9 | # |
| 10 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | # |
| 12 | # Unless required by applicable law or agreed to in writing, software |
| 13 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 14 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | # See the License for the specific language governing permissions and |
| 16 | # limitations under the License. |
Bence Szépkúti | 468a76f | 2020-05-26 00:33:31 +0200 | [diff] [blame] | 17 | # |
| 18 | # This file is part of Mbed TLS (https://tls.mbed.org) |
Manuel Pégourié-Gonnard | 3385cf4 | 2015-04-02 17:59:30 +0100 | [diff] [blame] | 19 | |
Manuel Pégourié-Gonnard | d1ddd29 | 2015-04-09 10:15:10 +0200 | [diff] [blame] | 20 | set -eu |
| 21 | |
| 22 | if [ -d include/mbedtls ]; then :; else |
| 23 | echo "$0: must be run from root" >&2 |
| 24 | exit 1 |
| 25 | fi |
Manuel Pégourié-Gonnard | 3385cf4 | 2015-04-02 17:59:30 +0100 | [diff] [blame] | 26 | |
Manuel Pégourié-Gonnard | e137ea6 | 2015-04-09 10:47:44 +0200 | [diff] [blame] | 27 | HEADERS=$( ls include/mbedtls/*.h | egrep -v 'compat-1\.3\.h' ) |
Manuel Pégourié-Gonnard | 3385cf4 | 2015-04-02 17:59:30 +0100 | [diff] [blame] | 28 | |
| 29 | sed -n -e 's/.*#define \([a-zA-Z0-9_]*\).*/\1/p' $HEADERS \ |
| 30 | | egrep -v '^(asm|inline|EMIT|_CRT_SECURE_NO_DEPRECATE)$|^MULADDC_' \ |
| 31 | | sort -u > macros |
| 32 | |
| 33 | wc -l macros |