5 if [ ! -e grub-core
/lib
/gnulib
/stdlib.
in.h
]; then
6 echo "Gnulib not yet bootstrapped; run ./bootstrap instead." >&2
11 if [ -z "$PYTHON" ]; then
12 for i
in python3 python
; do
13 if command -v "$i" > /dev
/null
2>&1; then
15 echo "Using $PYTHON..."
20 if [ -z "$PYTHON" ]; then
21 echo "python not found." >&2
29 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' ! -ipath './gnulib/*' ! -ipath './grub-core/lib/gnulib/*' |
sort > po
/POTFILES.
in
30 find util
-iname '*.in' ! -name Makefile.
in |
sort > po
/POTFILES-shell.
in
32 echo "Importing unicode..."
33 ${PYTHON} util
/import_unicode.py unicode
/UnicodeData.txt unicode
/BidiMirroring.txt unicode
/ArabicShaping.txt grub-core
/unidata.c
35 echo "Importing libgcrypt..."
36 ${PYTHON} util
/import_gcry.py grub-core
/lib
/libgcrypt
/ grub-core
37 sed -n -f util
/import_gcrypth.
sed < grub-core
/lib
/libgcrypt
/src
/gcrypt.h.
in > include
/grub
/gcrypt
/gcrypt.h
38 if [ -f include
/grub
/gcrypt
/g10lib.h
]; then
39 rm include
/grub
/gcrypt
/g10lib.h
41 if [ -d grub-core
/lib
/libgcrypt-grub
/mpi
/generic
]; then
42 rm -rf grub-core
/lib
/libgcrypt-grub
/mpi
/generic
44 cp grub-core
/lib
/libgcrypt-grub
/src
/g10lib.h include
/grub
/gcrypt
/g10lib.h
45 cp -R grub-core
/lib
/libgcrypt
/mpi
/generic grub-core
/lib
/libgcrypt-grub
/mpi
/generic
47 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
48 if [ -h grub-core
/lib
/libgcrypt-grub
/mpi
/"$x" ] ||
[ -f grub-core
/lib
/libgcrypt-grub
/mpi
/"$x" ]; then
49 rm grub-core
/lib
/libgcrypt-grub
/mpi
/"$x"
51 cp grub-core
/lib
/libgcrypt-grub
/mpi
/generic
/"$x" grub-core
/lib
/libgcrypt-grub
/mpi
/"$x"
54 echo "Generating Automake input..."
56 # Automake doesn't like including files from a path outside the project.
57 rm -f contrib grub-core
/contrib
58 if [ "x${GRUB_CONTRIB}" != x
]; then
59 [ "${GRUB_CONTRIB}" = contrib
] ||
ln -s "${GRUB_CONTRIB}" contrib
60 [ "${GRUB_CONTRIB}" = grub-core
/contrib
] ||
ln -s ..
/contrib grub-core
/contrib
63 UTIL_DEFS
='Makefile.util.def Makefile.utilgcry.def'
64 CORE_DEFS
='grub-core/Makefile.core.def grub-core/Makefile.gcry.def'
66 for extra
in contrib
/*/Makefile.util.def
; do
67 if test -e "$extra"; then
68 UTIL_DEFS
="$UTIL_DEFS $extra"
72 for extra
in contrib
/*/Makefile.core.def
; do
73 if test -e "$extra"; then
74 CORE_DEFS
="$CORE_DEFS $extra"
78 ${PYTHON} gentpl.py
$UTIL_DEFS > Makefile.util.am
79 ${PYTHON} gentpl.py
$CORE_DEFS > grub-core
/Makefile.core.am
81 for extra
in contrib
/*/Makefile.common
; do
82 if test -e "$extra"; then
83 echo "include $extra" >> Makefile.util.am
84 echo "include $extra" >> grub-core
/Makefile.core.am
88 for extra
in contrib
/*/Makefile.util.common
; do
89 if test -e "$extra"; then
90 echo "include $extra" >> Makefile.util.am
94 for extra
in contrib
/*/Makefile.core.common
; do
95 if test -e "$extra"; then
96 echo "include $extra" >> grub-core
/Makefile.core.am
100 echo "Saving timestamps..."
101 echo timestamp
> stamp-h.
in
103 if [ -z "$FROM_BOOTSTRAP" ]; then
104 # Unaided autoreconf is likely to install older versions of many files
105 # than the ones provided by Gnulib, but in most cases this won't matter
106 # very much. This mode is provided so that you can run ./autogen.sh to
107 # regenerate the GRUB build system in an unpacked release tarball (perhaps
108 # after patching it), even on systems that don't have access to
110 echo "Running autoreconf..."
111 cp -a INSTALL INSTALL.grub
113 mv INSTALL.grub INSTALL