]>
Commit | Line | Data |
---|---|---|
9e860d54 | 1 | #! /usr/bin/env bash |
6a161fa9 | 2 | |
3 | set -e | |
4 | ||
18dd6b47 VS |
5 | export LC_CTYPE=C |
6 | export LC_COLLATE=C | |
7 | unset LC_ALL | |
8 | ||
40a4a8a9 | 9 | autogen --version >/dev/null || exit 1 |
ff174dbe | 10 | |
297f0c2b BC |
11 | echo "Importing unicode..." |
12 | python util/import_unicode.py unicode/UnicodeData.txt unicode/BidiMirroring.txt unicode/ArabicShaping.txt grub-core/unidata.c | |
13 | ||
a60f6ee1 | 14 | echo "Importing libgcrypt..." |
6304d292 | 15 | python util/import_gcry.py grub-core/lib/libgcrypt/ grub-core |
0ef45b93 | 16 | |
3d9d3542 BC |
17 | echo "Creating Makefile.tpl..." |
18 | python gentpl.py | sed -e '/^$/{N;/^\n$/D;}' > Makefile.tpl | |
19 | ||
20 | echo "Running autogen..." | |
e1fd1939 CW |
21 | |
22 | # Automake doesn't like including files from a path outside the project. | |
23 | rm -f contrib grub-core/contrib | |
24 | if [ "x${GRUB_CONTRIB}" != x ]; then | |
25 | [ "${GRUB_CONTRIB}" = contrib ] || ln -s "${GRUB_CONTRIB}" contrib | |
26 | [ "${GRUB_CONTRIB}" = grub-core/contrib ] || ln -s ../contrib grub-core/contrib | |
27 | fi | |
28 | ||
29 | UTIL_DEFS=Makefile.util.def | |
30 | CORE_DEFS='grub-core/Makefile.core.def grub-core/Makefile.gcry.def' | |
31 | ||
32 | for extra in contrib/*/Makefile.util.def; do | |
33 | if test -e "$extra"; then | |
34 | UTIL_DEFS="$UTIL_DEFS $extra" | |
35 | fi | |
36 | done | |
37 | ||
38 | for extra in contrib/*/Makefile.core.def; do | |
39 | if test -e "$extra"; then | |
40 | CORE_DEFS="$CORE_DEFS $extra" | |
41 | fi | |
42 | done | |
43 | ||
44 | cat $UTIL_DEFS | autogen -T Makefile.tpl | sed -e '/^$/{N;/^\n$/D;}' > Makefile.util.am | |
45 | cat $CORE_DEFS | autogen -T Makefile.tpl | sed -e '/^$/{N;/^\n$/D;}' > grub-core/Makefile.core.am | |
46 | ||
47 | for extra in contrib/*/Makefile.common; do | |
48 | if test -e "$extra"; then | |
49 | echo "include $extra" >> Makefile.util.am | |
50 | echo "include $extra" >> grub-core/Makefile.core.am | |
51 | fi | |
52 | done | |
53 | ||
54 | for extra in contrib/*/Makefile.util.common; do | |
55 | if test -e "$extra"; then | |
56 | echo "include $extra" >> Makefile.util.am | |
57 | fi | |
58 | done | |
59 | ||
60 | for extra in contrib/*/Makefile.core.common; do | |
61 | if test -e "$extra"; then | |
62 | echo "include $extra" >> grub-core/Makefile.core.am | |
63 | fi | |
64 | done | |
3d9d3542 | 65 | |
a60f6ee1 | 66 | echo "Saving timestamps..." |
8c411768 | 67 | echo timestamp > stamp-h.in |
6a161fa9 | 68 | |
a60f6ee1 BC |
69 | echo "Running autoreconf..." |
70 | autoreconf -vi | |
6a161fa9 | 71 | exit 0 |