Makefile.private: correct the names of prerelease tarballs
[syslinux/sherbszt.git] / efi / check-gnu-efi.sh
blob7d99e9ab2ba50e2a21d5d1b50b684bd4cae8e49e
1 #!/bin/sh
3 # Verify that gnu-efi is installed in the object directory for our
4 # firmware. If it isn't, build it.
6 if [ $# -lt 2 ]; then
7 cat <<EOF
8 Usage: $0: <arch> <objdir>
10 Check for gnu-efi libraries and header files in <objdir> and, if none
11 exist, build and install them.
13 <arch> - A gnu-efi \$ARCH argument, i.e. ia32, x86_64
14 <objdir> - The Syslinux object directory
16 EOF
17 exit 1
20 ARCH=$1
21 objdir=$2
23 if [ ! \( -f "$objdir/include/efi/$ARCH/efibind.h" -a -f "$objdir/lib/libefi.a" -a -f "$objdir/lib/libgnuefi.a" \) ]; then
24 # Build the external project with a clean make environment, as
25 # Syslinux disables built-in implicit rules.
26 export MAKEFLAGS=
28 ../../efi/build-gnu-efi.sh $ARCH "$objdir"
29 if [ $? -ne 0 ]; then
30 printf "Failed to build gnu-efi. "
31 printf "Execute the following command for full details: \n\n"
32 printf "build-gnu-efi.sh $ARCH $objdir\n\n"
34 exit 1
36 else
37 printf "skip gnu-efi build/install\n"