5 if [ ! -e grub-core
/lib
/gnulib
/stdlib.
in.h
]; then
6 echo "Gnulib not yet bootstrapped; run ./bootstrap instead." >&2
10 # Set ${PYTHON} to plain 'python' if not set already
16 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
17 find util
-iname '*.in' ! -name Makefile.
in |
sort > po
/POTFILES-shell.
in
19 echo "Importing unicode..."
20 ${PYTHON} util
/import_unicode.py unicode
/UnicodeData.txt unicode
/BidiMirroring.txt unicode
/ArabicShaping.txt grub-core
/unidata.c
22 echo "Importing libgcrypt..."
23 ${PYTHON} util
/import_gcry.py grub-core
/lib
/libgcrypt
/ grub-core
24 sed -n -f util
/import_gcrypth.
sed < grub-core
/lib
/libgcrypt
/src
/gcrypt.h.
in > include
/grub
/gcrypt
/gcrypt.h
25 if [ -f include
/grub
/gcrypt
/g10lib.h
]; then
26 rm include
/grub
/gcrypt
/g10lib.h
28 if [ -d grub-core
/lib
/libgcrypt-grub
/mpi
/generic
]; then
29 rm -rf grub-core
/lib
/libgcrypt-grub
/mpi
/generic
31 cp grub-core
/lib
/libgcrypt-grub
/src
/g10lib.h include
/grub
/gcrypt
/g10lib.h
32 cp -R grub-core
/lib
/libgcrypt
/mpi
/generic grub-core
/lib
/libgcrypt-grub
/mpi
/generic
34 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
35 if [ -h grub-core
/lib
/libgcrypt-grub
/mpi
/"$x" ] ||
[ -f grub-core
/lib
/libgcrypt-grub
/mpi
/"$x" ]; then
36 rm grub-core
/lib
/libgcrypt-grub
/mpi
/"$x"
38 cp grub-core
/lib
/libgcrypt-grub
/mpi
/generic
/"$x" grub-core
/lib
/libgcrypt-grub
/mpi
/"$x"
41 echo "Generating Automake input..."
43 # Automake doesn't like including files from a path outside the project.
44 rm -f contrib grub-core
/contrib
45 if [ "x${GRUB_CONTRIB}" != x
]; then
46 [ "${GRUB_CONTRIB}" = contrib
] ||
ln -s "${GRUB_CONTRIB}" contrib
47 [ "${GRUB_CONTRIB}" = grub-core
/contrib
] ||
ln -s ..
/contrib grub-core
/contrib
50 UTIL_DEFS
='Makefile.util.def Makefile.utilgcry.def'
51 CORE_DEFS
='grub-core/Makefile.core.def grub-core/Makefile.gcry.def'
53 for extra
in contrib
/*/Makefile.util.def
; do
54 if test -e "$extra"; then
55 UTIL_DEFS
="$UTIL_DEFS $extra"
59 for extra
in contrib
/*/Makefile.core.def
; do
60 if test -e "$extra"; then
61 CORE_DEFS
="$CORE_DEFS $extra"
65 ${PYTHON} gentpl.py
$UTIL_DEFS > Makefile.util.am
66 ${PYTHON} gentpl.py
$CORE_DEFS > grub-core
/Makefile.core.am
68 for extra
in contrib
/*/Makefile.common
; do
69 if test -e "$extra"; then
70 echo "include $extra" >> Makefile.util.am
71 echo "include $extra" >> grub-core
/Makefile.core.am
75 for extra
in contrib
/*/Makefile.util.common
; do
76 if test -e "$extra"; then
77 echo "include $extra" >> Makefile.util.am
81 for extra
in contrib
/*/Makefile.core.common
; do
82 if test -e "$extra"; then
83 echo "include $extra" >> grub-core
/Makefile.core.am
87 echo "Saving timestamps..."
88 echo timestamp
> stamp-h.
in
90 if [ -z "$FROM_BOOTSTRAP" ]; then
91 # Unaided autoreconf is likely to install older versions of many files
92 # than the ones provided by Gnulib, but in most cases this won't matter
93 # very much. This mode is provided so that you can run ./autogen.sh to
94 # regenerate the GRUB build system in an unpacked release tarball (perhaps
95 # after patching it), even on systems that don't have access to
97 echo "Running autoreconf..."
98 cp -a INSTALL INSTALL.grub
100 mv INSTALL.grub INSTALL