2010-08-23 08:37:29 +00:00
|
|
|
#! /usr/bin/env bash
|
2002-12-27 08:53:07 +00:00
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2011-04-08 11:57:56 +00:00
|
|
|
export LC_COLLATE=C
|
|
|
|
unset LC_ALL
|
|
|
|
|
2013-10-03 21:24:47 +00:00
|
|
|
find . -iname '*.[ch]' ! -ipath './grub-core/lib/libgcrypt-grub/*' ! -ipath './build-aux/*' ! -ipath './grub-core/lib/libgcrypt/src/misc.c' ! -ipath './grub-core/lib/libgcrypt/src/global.c' ! -ipath './grub-core/lib/libgcrypt/src/secmem.c' ! -ipath './util/grub-gen-widthspec.c' ! -ipath './util/grub-gen-asciih.c' |sort > po/POTFILES.in
|
2013-08-12 12:29:36 +00:00
|
|
|
find util -iname '*.in' ! -name Makefile.in |sort > po/POTFILES-shell.in
|
2013-04-28 11:49:21 +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
|
2013-01-11 20:32:42 +00:00
|
|
|
sed -n -f util/import_gcrypth.sed < grub-core/lib/libgcrypt/src/gcrypt.h.in > include/grub/gcrypt/gcrypt.h
|
2013-01-12 15:14:09 +00:00
|
|
|
if [ -f include/grub/gcrypt/g10lib.h ]; then
|
|
|
|
rm include/grub/gcrypt/g10lib.h
|
|
|
|
fi
|
|
|
|
if [ -d grub-core/lib/libgcrypt-grub/mpi/generic ]; then
|
|
|
|
rm -rf grub-core/lib/libgcrypt-grub/mpi/generic
|
|
|
|
fi
|
2013-01-11 20:32:42 +00:00
|
|
|
ln -s ../../../grub-core/lib/libgcrypt-grub/src/g10lib.h include/grub/gcrypt/g10lib.h
|
|
|
|
cp -R grub-core/lib/libgcrypt/mpi/generic grub-core/lib/libgcrypt-grub/mpi/generic
|
|
|
|
|
|
|
|
for x in mpi-asm-defs.h mpih-add1.c mpih-sub1.c mpih-mul1.c mpih-mul2.c mpih-mul3.c mpih-lshift.c mpih-rshift.c; do
|
2013-04-16 14:18:12 +00:00
|
|
|
if [ -h grub-core/lib/libgcrypt-grub/mpi/"$x" ] || [ -f grub-core/lib/libgcrypt-grub/mpi/"$x" ]; then
|
2013-01-12 15:14:09 +00:00
|
|
|
rm grub-core/lib/libgcrypt-grub/mpi/"$x"
|
|
|
|
fi
|
2013-01-11 20:32:42 +00:00
|
|
|
ln -s generic/"$x" grub-core/lib/libgcrypt-grub/mpi/"$x"
|
|
|
|
done
|
2009-11-17 10:22:54 +00:00
|
|
|
|
2013-11-13 12:42:24 +00:00
|
|
|
echo "Generating Automake input..."
|
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
|
|
|
|
|
2011-04-22 17:04:21 +00:00
|
|
|
UTIL_DEFS='Makefile.util.def Makefile.utilgcry.def'
|
2010-09-24 08:48:27 +00:00
|
|
|
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
|
|
|
|
|
2013-11-13 12:42:24 +00:00
|
|
|
python gentpl.py $UTIL_DEFS > Makefile.util.am
|
|
|
|
python gentpl.py $CORE_DEFS > grub-core/Makefile.core.am
|
2010-09-24 08:48:27 +00:00
|
|
|
|
|
|
|
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
|