2010-08-23 08:37:29 +00:00
|
|
|
#! /usr/bin/env bash
|
2002-12-27 08:53:07 +00:00
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2010-08-23 08:02:59 +00:00
|
|
|
autogen --version >/dev/null || exit 1
|
2010-06-08 12:07:17 +00:00
|
|
|
|
2010-07-12 19:13:28 +00:00
|
|
|
echo "Importing unicode..."
|
|
|
|
python util/import_unicode.py unicode/UnicodeData.txt unicode/BidiMirroring.txt unicode/ArabicShaping.txt grub-core/unidata.c
|
|
|
|
|
2010-06-03 06:22:33 +00:00
|
|
|
echo "Importing libgcrypt..."
|
2010-08-17 13:33:22 +00:00
|
|
|
python util/import_gcry.py grub-core/lib/libgcrypt/ grub-core
|
2009-11-17 10:22:54 +00:00
|
|
|
|
2010-08-20 12:51:31 +00:00
|
|
|
echo "Creating Makefile.tpl..."
|
|
|
|
python gentpl.py | sed -e '/^$/{N;/^\n$/D;}' > Makefile.tpl
|
|
|
|
|
|
|
|
echo "Running autogen..."
|
2010-09-24 08:48:27 +00:00
|
|
|
|
|
|
|
# Automake doesn't like including files from a path outside the project.
|
|
|
|
rm -f contrib grub-core/contrib
|
|
|
|
if [ "x${GRUB_CONTRIB}" != x ]; then
|
|
|
|
[ "${GRUB_CONTRIB}" = contrib ] || ln -s "${GRUB_CONTRIB}" contrib
|
|
|
|
[ "${GRUB_CONTRIB}" = grub-core/contrib ] || ln -s ../contrib grub-core/contrib
|
|
|
|
fi
|
|
|
|
|
|
|
|
UTIL_DEFS=Makefile.util.def
|
|
|
|
CORE_DEFS='grub-core/Makefile.core.def grub-core/Makefile.gcry.def'
|
|
|
|
|
|
|
|
for extra in contrib/*/Makefile.util.def; do
|
|
|
|
if test -e "$extra"; then
|
|
|
|
UTIL_DEFS="$UTIL_DEFS $extra"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
for extra in contrib/*/Makefile.core.def; do
|
|
|
|
if test -e "$extra"; then
|
|
|
|
CORE_DEFS="$CORE_DEFS $extra"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
cat $UTIL_DEFS | autogen -T Makefile.tpl | sed -e '/^$/{N;/^\n$/D;}' > Makefile.util.am
|
|
|
|
cat $CORE_DEFS | autogen -T Makefile.tpl | sed -e '/^$/{N;/^\n$/D;}' > grub-core/Makefile.core.am
|
|
|
|
|
|
|
|
for extra in contrib/*/Makefile.common; do
|
|
|
|
if test -e "$extra"; then
|
|
|
|
echo "include $extra" >> Makefile.util.am
|
|
|
|
echo "include $extra" >> grub-core/Makefile.core.am
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
for extra in contrib/*/Makefile.util.common; do
|
|
|
|
if test -e "$extra"; then
|
|
|
|
echo "include $extra" >> Makefile.util.am
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
for extra in contrib/*/Makefile.core.common; do
|
|
|
|
if test -e "$extra"; then
|
|
|
|
echo "include $extra" >> grub-core/Makefile.core.am
|
|
|
|
fi
|
|
|
|
done
|
2010-08-20 12:51:31 +00:00
|
|
|
|
2010-06-03 06:22:33 +00:00
|
|
|
echo "Saving timestamps..."
|
2010-05-06 06:04:04 +00:00
|
|
|
echo timestamp > stamp-h.in
|
2002-12-27 08:53:07 +00:00
|
|
|
|
2010-06-03 06:22:33 +00:00
|
|
|
echo "Running autoreconf..."
|
|
|
|
autoreconf -vi
|
2002-12-27 08:53:07 +00:00
|
|
|
exit 0
|