forked from tpm2-software/tpm2-tss
-
Notifications
You must be signed in to change notification settings - Fork 1
/
bootstrap
executable file
·39 lines (32 loc) · 1.01 KB
/
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
35
36
37
38
39
#!/bin/sh
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}" | tr '\n' ' ' | (echo -n "${var} = " && cat)
echo ""
}
VARS_FILE=src_vars.mk
echo "Generating file lists: ${VARS_FILE}"
(
src_listvar "sysapi/sysapi" "*.c" "SYSAPI_C"
src_listvar "sysapi/sysapi_util" "*.c" "SYSAPIUTIL_C"
printf "SYSAPI_SRC = \$(SYSAPI_H) \$(SYSAPI_C) \$(SYSAPIUTIL_C)\n"
src_listvar "common" "*.c" "COMMON_C"
src_listvar "common" "*.h" "COMMON_H"
printf "COMMON_SRC = \$(COMMON_C) \$(COMMON_H)\n"
src_listvar "test/common/sample" "*.c" "SAMPLE_C"
src_listvar "test/common/sample" "*.h" "SAMPLE_H"
printf "SAMPLE_SRC = \$(SAMPLE_C) \$(SAMPLE_H)\n"
) > ${VARS_FILE}
printf "Running libtoolize ...\n"
libtoolize --install
printf "Running aclocal ...\n"
aclocal
printf "Running autoconf ...\n"
autoconf
printf "Running automake ...\n"
automake --add-missing