]> git.proxmox.com Git - grub2.git/blame - autogen.sh
Correct spelling of *scheduled*
[grub2.git] / autogen.sh
CommitLineData
9e860d54 1#! /usr/bin/env bash
6a161fa9 2
3set -e
4
be41c1cf
JM
5# Set ${PYTHON} to plain 'python' if not set already
6: ${PYTHON:=python}
7
18dd6b47
VS
8export LC_COLLATE=C
9unset LC_ALL
10
9ae393da 11find . -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
273349fe 12find util -iname '*.in' ! -name Makefile.in |sort > po/POTFILES-shell.in
965fa829 13
297f0c2b 14echo "Importing unicode..."
be41c1cf 15${PYTHON} util/import_unicode.py unicode/UnicodeData.txt unicode/BidiMirroring.txt unicode/ArabicShaping.txt grub-core/unidata.c
297f0c2b 16
a60f6ee1 17echo "Importing libgcrypt..."
be41c1cf 18${PYTHON} util/import_gcry.py grub-core/lib/libgcrypt/ grub-core
5e3b8dcb 19sed -n -f util/import_gcrypth.sed < grub-core/lib/libgcrypt/src/gcrypt.h.in > include/grub/gcrypt/gcrypt.h
4d7219f9
VS
20if [ -f include/grub/gcrypt/g10lib.h ]; then
21 rm include/grub/gcrypt/g10lib.h
22fi
23if [ -d grub-core/lib/libgcrypt-grub/mpi/generic ]; then
24 rm -rf grub-core/lib/libgcrypt-grub/mpi/generic
25fi
5e3b8dcb
VS
26ln -s ../../../grub-core/lib/libgcrypt-grub/src/g10lib.h include/grub/gcrypt/g10lib.h
27cp -R grub-core/lib/libgcrypt/mpi/generic grub-core/lib/libgcrypt-grub/mpi/generic
28
29for 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
740201f3 30 if [ -h grub-core/lib/libgcrypt-grub/mpi/"$x" ] || [ -f grub-core/lib/libgcrypt-grub/mpi/"$x" ]; then
4d7219f9
VS
31 rm grub-core/lib/libgcrypt-grub/mpi/"$x"
32 fi
5e3b8dcb
VS
33 ln -s generic/"$x" grub-core/lib/libgcrypt-grub/mpi/"$x"
34done
0ef45b93 35
ab4f1501 36echo "Generating Automake input..."
e1fd1939
CW
37
38# Automake doesn't like including files from a path outside the project.
39rm -f contrib grub-core/contrib
40if [ "x${GRUB_CONTRIB}" != x ]; then
41 [ "${GRUB_CONTRIB}" = contrib ] || ln -s "${GRUB_CONTRIB}" contrib
42 [ "${GRUB_CONTRIB}" = grub-core/contrib ] || ln -s ../contrib grub-core/contrib
43fi
44
dcd73ec0 45UTIL_DEFS='Makefile.util.def Makefile.utilgcry.def'
e1fd1939
CW
46CORE_DEFS='grub-core/Makefile.core.def grub-core/Makefile.gcry.def'
47
48for extra in contrib/*/Makefile.util.def; do
49 if test -e "$extra"; then
50 UTIL_DEFS="$UTIL_DEFS $extra"
51 fi
52done
53
54for extra in contrib/*/Makefile.core.def; do
55 if test -e "$extra"; then
56 CORE_DEFS="$CORE_DEFS $extra"
57 fi
58done
59
be41c1cf
JM
60${PYTHON} gentpl.py $UTIL_DEFS > Makefile.util.am
61${PYTHON} gentpl.py $CORE_DEFS > grub-core/Makefile.core.am
e1fd1939
CW
62
63for extra in contrib/*/Makefile.common; do
64 if test -e "$extra"; then
65 echo "include $extra" >> Makefile.util.am
66 echo "include $extra" >> grub-core/Makefile.core.am
67 fi
68done
69
70for extra in contrib/*/Makefile.util.common; do
71 if test -e "$extra"; then
72 echo "include $extra" >> Makefile.util.am
73 fi
74done
75
76for extra in contrib/*/Makefile.core.common; do
77 if test -e "$extra"; then
78 echo "include $extra" >> grub-core/Makefile.core.am
79 fi
80done
3d9d3542 81
a60f6ee1 82echo "Saving timestamps..."
8c411768 83echo timestamp > stamp-h.in
6a161fa9 84
a60f6ee1
BC
85echo "Running autoreconf..."
86autoreconf -vi
6a161fa9 87exit 0