[coreboot-gerrit] Patch set updated for coreboot: Memtest86Plus/Makefile: Update to common payload makefile format

Martin Roth (martinroth@google.com) gerrit at coreboot.org
Tue Apr 26 19:04:17 CEST 2016


Martin Roth (martinroth at google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14152

-gerrit

commit 4f498067f77a3338d907df5ba06ed02195b45b23
Author: Martin Roth <martinroth at google.com>
Date:   Wed Mar 16 15:00:37 2016 -0600

    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 at google.com>
---
 payloads/external/Memtest86Plus/Makefile | 24 +++++++++++++++++-------
 1 file changed, 17 insertions(+), 7 deletions(-)

diff --git a/payloads/external/Memtest86Plus/Makefile b/payloads/external/Memtest86Plus/Makefile
index db8a51d..f77fa38 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



More information about the coreboot-gerrit mailing list