From 4793ec3ea18b099efab7d8acf97e0063e0f577b7 Mon Sep 17 00:00:00 2001 From: Martin Roth Date: Wed, 16 Mar 2016 15:00:37 -0600 Subject: Memtest86Plus/Makefile: Update to common payload makefile format This series of patches attempts to update all of the external payload makefiles to be as similar as possible. - Add .git to the git repo URL to show that it's a git repo. - Use the common checkout, fetch, and clone ($(project dir)) targets - Add TAG-y and NAME-y variables - just with origin/master for now. Stable will be added shortly. - Make sure all phony targets are in .PHONY Change-Id: If83c100841d5f91a9fab7ac44ba20ec2271c0594 Signed-off-by: Martin Roth Reviewed-on: https://review.coreboot.org/14152 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- payloads/external/Memtest86Plus/Makefile | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'payloads/external/Memtest86Plus') 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 -- cgit v1.2.3