summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Roth <martinroth@google.com>2016-03-16 15:00:37 -0600
committerMartin Roth <martinroth@google.com>2016-04-27 19:48:54 +0200
commit4793ec3ea18b099efab7d8acf97e0063e0f577b7 (patch)
tree501953a2a251c6ce14de496e021e3abdf9be706b
parentc410b183370609b58db5d8d94c527bddb3c79447 (diff)
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 <martinroth@google.com> Reviewed-on: https://review.coreboot.org/14152 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
-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