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