summaryrefslogtreecommitdiff
path: root/payloads/external/Memtest86Plus/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'payloads/external/Memtest86Plus/Makefile')
-rw-r--r--payloads/external/Memtest86Plus/Makefile24
1 files changed, 17 insertions, 7 deletions
diff --git a/payloads/external/Memtest86Plus/Makefile b/payloads/external/Memtest86Plus/Makefile
index db8a51d92e..f77fa38a1c 100644
--- a/payloads/external/Memtest86Plus/Makefile
+++ b/payloads/external/Memtest86Plus/Makefile
@@ -13,9 +13,12 @@
## GNU General Public License for more details.
##
+TAG-y=origin/master
+NAME-y=MASTER
+
project_name=Memtest86+
project_dir=$(CURDIR)/memtest86plus
-project_git_repo=https://review.coreboot.org/memtest86plus
+project_git_repo=https://review.coreboot.org/memtest86plus.git
all: build
@@ -24,13 +27,20 @@ $(project_dir):
git clone $(project_git_repo) $(project_dir)
fetch: $(project_dir)
+ -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)"
cd $(project_dir); \
- test -e '.git' && \
- git fetch && \
- git checkout origin/master
+ git checkout master; \
+ git branch -D coreboot 2>/dev/null; \
+ git checkout -b coreboot $(TAG-y)
-build: fetch
- echo " MAKE $(project_name)"
+build: checkout
+ echo " MAKE $(project_name) $(NAME-y)"
$(MAKE) -C $(project_dir) all
clean:
@@ -42,4 +52,4 @@ distclean:
print-repo-info:
echo "$(project_git_repo) $(project_dir)"
-.PHONY: all build fetch clean distclean print-repo-info
+.PHONY: all build checkout clean distclean fetch print-repo-info