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>
This commit is contained in:
Martin Roth 2016-03-16 15:00:37 -06:00
parent c410b18337
commit 4793ec3ea1
1 changed files with 18 additions and 8 deletions

View File

@ -13,9 +13,12 @@
## GNU General Public License for more details. ## GNU General Public License for more details.
## ##
TAG-y=origin/master
NAME-y=MASTER
project_name=Memtest86+ project_name=Memtest86+
project_dir=$(CURDIR)/memtest86plus project_dir=$(CURDIR)/memtest86plus
project_git_repo=https://review.coreboot.org/memtest86plus project_git_repo=https://review.coreboot.org/memtest86plus.git
all: build all: build
@ -24,13 +27,20 @@ $(project_dir):
git clone $(project_git_repo) $(project_dir) git clone $(project_git_repo) $(project_dir)
fetch: $(project_dir) fetch: $(project_dir)
cd $(project_dir); \ -cd $(project_dir); git show $(TAG-y) >/dev/null 2>&1 ; \
test -e '.git' && \ if [ $$? -ne 0 ] || [ "$(TAG-y)" = "origin/master" ]; then \
git fetch && \ echo " Fetching new commits from the $(project_name) git repo"; \
git checkout origin/master git fetch; fi
build: fetch checkout: fetch
echo " MAKE $(project_name)" echo " Checking out $(project_name) revision $(NAME-y)"
cd $(project_dir); \
git checkout master; \
git branch -D coreboot 2>/dev/null; \
git checkout -b coreboot $(TAG-y)
build: checkout
echo " MAKE $(project_name) $(NAME-y)"
$(MAKE) -C $(project_dir) all $(MAKE) -C $(project_dir) all
clean: clean:
@ -42,4 +52,4 @@ distclean:
print-repo-info: print-repo-info:
echo "$(project_git_repo) $(project_dir)" 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