-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbootstrap
More file actions
executable file
·43 lines (34 loc) · 1.02 KB
/
Copy pathbootstrap
File metadata and controls
executable file
·43 lines (34 loc) · 1.02 KB
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
40
41
42
43
#!/bin/sh
echo "Preparing autotools for bootstrapping..."
make all-autotools || exit 1
echo
# Get the list of submodules to process.
# If arguments are provided, use them as the list.
# Otherwise, process all submodules.
if [ $# -gt 0 ]; then
SUBMODULES="$*"
echo "Specified submodules: $SUBMODULES"
else
SUBMODULES="binutils-os2 gcc-os2 libc cmake-os2"
echo "All submodules: $SUBMODULES"
fi
export PATH="$(pwd)/autotools/bin:$PATH"
for sub in $SUBMODULES; do
if test -L "$sub"; then
sub=$(readlink "$sub")
fi
echo "Initializing submodule $sub..."
git submodule update --init --recursive --force "$sub" || exit 1
echo "Applying patches for $sub..."
gitam_opt="-3"
if test "$sub" = "gcc-os2-ps" || test "$sub" = "libc"; then
gitam_opt="$gitam_opt --keep-cr"
fi
( cd "$sub" && git am $gitam_opt ../patches/"$sub"/*.patch ) || exit 1
if test -f "$sub/autogen.sh"; then
echo "Bootstrapping $sub..."
( cd "$sub" && chmod a+x autogen.sh && ./autogen.sh ) || exit 1
fi
echo
done
echo "Done."