forked from tpm2-software/tpm2-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap
executable file
·34 lines (26 loc) · 840 Bytes
/
bootstrap
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/sh
# SPDX-License-Identifier: BSD-3-Clause
set -e
# generate list of source files for use in Makefile.am
# if you add new source files, you must run ./bootstrap again
src_listvar () {
basedir=$1
suffix=$2
var=$3
find "${basedir}" -name "${suffix}" | LC_ALL=C sort | tr '\n' ' ' | (printf "${var} = " && cat)
echo ""
}
VARS_FILE=src_vars.mk
AUTORECONF=${AUTORECONF:-autoreconf}
echo "Generating file lists: ${VARS_FILE}"
(
src_listvar "lib" "*.c" "LIB_C"
src_listvar "lib" "*.h" "LIB_H"
printf "LIB_SRC = \$(LIB_C) \$(LIB_H)\n"
src_listvar "test/integration/tests" "*.sh" "SYSTEM_TESTS"
printf "ALL_SYSTEM_TESTS = \$(SYSTEM_TESTS)\n"
src_listvar "test/integration/fapi" "*.sh" "FAPI_TESTS"
printf "ALL_FAPI_TESTS = \$(FAPI_TESTS)\n"
) > ${VARS_FILE}
mkdir -p m4
${AUTORECONF} --install --sym