Run 'git fetch' in SeaBIOS only when really needed
[coreboot.git] / payloads / external / SeaBIOS / Makefile.inc
1
2
3 TAG-$(CONFIG_SEABIOS_MASTER)=origin/master
4 TAG-$(CONFIG_SEABIOS_STABLE)=1efb10b9ea30c45a8c9c6230234fefa10d2886ed
5
6 unexport KCONFIG_AUTOCONFIG
7
8 all: build
9
10 seabios:
11         echo "    Cloning SeaBIOS from Git"
12         git clone git://git.seabios.org/seabios.git
13
14 fetch: seabios
15         cd seabios; git show $(TAG-y) >/dev/null 2>&1 ; if [ $$? -ne 0 ]; \
16         then echo "    Fetching new commits from the SeaBIOS git repo"; git fetch; fi
17
18 checkout: fetch
19         echo "    Checking out SeaBIOS revision $(TAG-y)"
20         cd seabios; git checkout master; git branch -D coreboot 2>/dev/null; git checkout -b coreboot $(TAG-y)
21
22 config: checkout
23         echo "    CONFIG     SeaBIOS $(TAG-y)"
24         $(MAKE) -C seabios defconfig
25         echo "CONFIG_COREBOOT=y" >> seabios/.config
26         echo "CONFIG_DEBUG_SERIAL=y" >> seabios/.config
27         echo "CONFIG_COREBOOT_FLASH=y" >> seabios/.config
28         echo "CONFIG_LZMA=y" >> seabios/.config
29         echo "CONFIG_FLASH_FLOPPY=y" >> seabios/.config
30         echo "CONFIG_VGAHOOKS=y" >> seabios/.config
31         # This shows how to force a previously set .config option *off*
32         #echo "# CONFIG_SMBIOS is not set" >> seabios/.config
33
34 build: config
35         echo "    MAKE       SeaBIOS $(TAG-y)"
36         $(MAKE) -C seabios
37
38 clean:
39         test -d seabios && $(MAKE) -C seabios clean || exit 0
40
41 distclean:
42         rm -rf seabios
43
44 .PHONY: checkout config build clean distclean clone fetch