2016-02-29 00:56:27 +01:00
|
|
|
##
|
|
|
|
## This file is part of the coreboot project.
|
|
|
|
##
|
|
|
|
## Copyright (C) 2016 Google Inc.
|
|
|
|
##
|
|
|
|
## This program is free software; you can redistribute it and/or modify
|
|
|
|
## it under the terms of the GNU General Public License as published by
|
|
|
|
## the Free Software Foundation; version 2 of the License.
|
|
|
|
##
|
|
|
|
## This program is distributed in the hope that it will be useful,
|
|
|
|
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
## GNU General Public License for more details.
|
|
|
|
##
|
|
|
|
|
2016-03-16 22:00:37 +01:00
|
|
|
TAG-y=origin/master
|
|
|
|
NAME-y=MASTER
|
|
|
|
|
2016-02-29 00:56:27 +01:00
|
|
|
project_name=Memtest86+
|
2016-03-08 20:32:40 +01:00
|
|
|
project_dir=$(CURDIR)/memtest86plus
|
2016-03-16 22:00:37 +01:00
|
|
|
project_git_repo=https://review.coreboot.org/memtest86plus.git
|
2016-02-29 00:56:27 +01:00
|
|
|
|
|
|
|
all: build
|
|
|
|
|
|
|
|
$(project_dir):
|
|
|
|
echo " Cloning $(project_name) from Git"
|
|
|
|
git clone $(project_git_repo) $(project_dir)
|
|
|
|
|
|
|
|
fetch: $(project_dir)
|
2016-03-16 22:00:37 +01:00
|
|
|
-cd $(project_dir); git show $(TAG-y) >/dev/null 2>&1 ; \
|
|
|
|
if [ $$? -ne 0 ] || [ "$(TAG-y)" = "origin/master" ]; then \
|
|
|
|
echo " Fetching new commits from the $(project_name) git repo"; \
|
|
|
|
git fetch; fi
|
|
|
|
|
|
|
|
checkout: fetch
|
|
|
|
echo " Checking out $(project_name) revision $(NAME-y)"
|
2016-02-29 00:56:27 +01:00
|
|
|
cd $(project_dir); \
|
2016-03-16 22:00:37 +01:00
|
|
|
git checkout master; \
|
|
|
|
git branch -D coreboot 2>/dev/null; \
|
|
|
|
git checkout -b coreboot $(TAG-y)
|
2016-02-29 00:56:27 +01:00
|
|
|
|
2016-03-16 22:00:37 +01:00
|
|
|
build: checkout
|
|
|
|
echo " MAKE $(project_name) $(NAME-y)"
|
2016-02-29 00:56:27 +01:00
|
|
|
$(MAKE) -C $(project_dir) all
|
|
|
|
|
|
|
|
clean:
|
|
|
|
test -d $(project_dir) && $(MAKE) -C $(project_dir) clean || exit 0
|
|
|
|
|
|
|
|
distclean:
|
|
|
|
rm -rf $(project_dir)
|
|
|
|
|
2016-03-16 19:42:05 +01:00
|
|
|
print-repo-info:
|
|
|
|
echo "$(project_git_repo) $(project_dir)"
|
|
|
|
|
2016-03-16 22:00:37 +01:00
|
|
|
.PHONY: all build checkout clean distclean fetch print-repo-info
|