blob: 1c14016149e725ec90901d2af8647ac2ac72154d [file] [log] [blame]
Manuel Pégourié-Gonnard3385cf42015-04-02 17:59:30 +01001#!/bin/sh
Bence Szépkúti468a76f2020-05-26 00:33:31 +02002#
3# Copyright (C) 2015, Arm Limited, All Rights Reserved
4#
5# This file is part of Mbed TLS (https://tls.mbed.org)
Manuel Pégourié-Gonnard3385cf42015-04-02 17:59:30 +01006
Manuel Pégourié-Gonnardd1ddd292015-04-09 10:15:10 +02007set -eu
8
9if [ -d include/mbedtls ]; then :; else
10 echo "$0: must be run from root" >&2
11 exit 1
12fi
Manuel Pégourié-Gonnard3385cf42015-04-02 17:59:30 +010013
Manuel Pégourié-Gonnarde137ea62015-04-09 10:47:44 +020014HEADERS=$( ls include/mbedtls/*.h | egrep -v 'compat-1\.3\.h' )
Manuel Pégourié-Gonnard3385cf42015-04-02 17:59:30 +010015
16sed -n -e 's/.*#define \([a-zA-Z0-9_]*\).*/\1/p' $HEADERS \
17 | egrep -v '^(asm|inline|EMIT|_CRT_SECURE_NO_DEPRECATE)$|^MULADDC_' \
18 | sort -u > macros
19
20wc -l macros