9
# FIXME: automake doesn't like that there's no Makefile.am
10
automake -a -c -f || true
5
autogen --version >/dev/null || exit 1
7
echo "Importing unicode..."
8
python util/import_unicode.py unicode/UnicodeData.txt unicode/BidiMirroring.txt unicode/ArabicShaping.txt grub-core/unidata.c
10
echo "Importing libgcrypt..."
11
python util/import_gcry.py grub-core/lib/libgcrypt/ grub-core
13
echo "Creating Makefile.tpl..."
14
python gentpl.py | sed -e '/^$/{N;/^\n$/D;}' > Makefile.tpl
16
echo "Running autogen..."
18
# Automake doesn't like including files from a path outside the project.
19
rm -f contrib grub-core/contrib
20
if [ "x${GRUB_CONTRIB}" != x ]; then
21
[ "${GRUB_CONTRIB}" = contrib ] || ln -s "${GRUB_CONTRIB}" contrib
22
[ "${GRUB_CONTRIB}" = grub-core/contrib ] || ln -s ../contrib grub-core/contrib
25
UTIL_DEFS=Makefile.util.def
26
CORE_DEFS='grub-core/Makefile.core.def grub-core/Makefile.gcry.def'
28
for extra in contrib/*/Makefile.util.def; do
29
if test -e "$extra"; then
30
UTIL_DEFS="$UTIL_DEFS $extra"
34
for extra in contrib/*/Makefile.core.def; do
35
if test -e "$extra"; then
36
CORE_DEFS="$CORE_DEFS $extra"
40
cat $UTIL_DEFS | autogen -T Makefile.tpl | sed -e '/^$/{N;/^\n$/D;}' > Makefile.util.am
41
cat $CORE_DEFS | autogen -T Makefile.tpl | sed -e '/^$/{N;/^\n$/D;}' > grub-core/Makefile.core.am
43
for extra in contrib/*/Makefile.common; do
44
if test -e "$extra"; then
45
echo "include $extra" >> Makefile.util.am
46
echo "include $extra" >> grub-core/Makefile.core.am
50
for extra in contrib/*/Makefile.util.common; do
51
if test -e "$extra"; then
52
echo "include $extra" >> Makefile.util.am
56
for extra in contrib/*/Makefile.core.common; do
57
if test -e "$extra"; then
58
echo "include $extra" >> grub-core/Makefile.core.am
62
echo "Saving timestamps..."
12
63
echo timestamp > stamp-h.in
14
python util/import_gcry.py lib/libgcrypt/ .
16
python util/import_unicode.py unicode/UnicodeData.txt unicode/BidiMirroring.txt unicode/ArabicShaping.txt unidata.c
18
for rmk in conf/*.rmk ${GRUB_CONTRIB}/*/conf/*.rmk; do
19
if test -e $rmk ; then
20
ruby genmk.rb < $rmk > `echo $rmk | sed 's/\.rmk$/.mk/'`
23
sh gendistlist.sh > DISTLIST
65
echo "Running autoreconf..."