File: clean-gnu-efi.sh

package info (click to toggle)
syslinux 3%3A6.04~git20190206.bf6db5b4%2Bdfsg1-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 16,940 kB
  • sloc: ansic: 189,351; asm: 5,148; pascal: 4,825; perl: 1,980; makefile: 1,980; python: 266; sh: 176; xml: 39
file content (37 lines) | stat: -rwxr-xr-x 715 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/sh

set -e

# Initialise the gnu-efi submodule and ensure the source is up-to-date.
# Then build and install it for the given architecture.

if [ $# -lt 2 ]; then
cat <<EOF
Usage: $0: <arch> <objdir>

Build the <arch> gnu-efi libs and header files and install in <objdir>.

  <arch>   - A gnu-efi \$ARCH argument, i.e. ia32, x86_64
  <objdir> - The Syslinux object directory

EOF
    exit 1
fi

ARCH="$1"
objdir=$(readlink -f "$2")

(
	cd ../..
	if [ -d .git ]; then
	    git submodule update --init
	fi
)

if [ -d "$objdir/gnu-efi" ];then
	cd "$objdir/gnu-efi"
	EFIDIR="$(readlink -f "$objdir/../gnu-efi")"
	make SRCDIR="$EFIDIR" TOPDIR="$EFIDIR" -f "$EFIDIR/Makefile" ARCH=$ARCH clean
fi

cd "$objdir/efi"