mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-18 07:08:18 +00:00
@ -4,51 +4,22 @@
|
||||
# \date 2011-08-05
|
||||
#
|
||||
|
||||
VERBOSE ?= @
|
||||
ECHO = @echo
|
||||
GIT_URL = https://github.com/nfeske/codezero.git
|
||||
GIT_REV = 6fa4884a5a1cf6207372f69ae01e5faa6d5a39c8
|
||||
CONTRIB_DIR = contrib
|
||||
PATCHES = $(shell find patches -name *.patch)
|
||||
|
||||
#
|
||||
# Utility to check if a tool is installed
|
||||
#
|
||||
check_tool = $(if $(shell which $(1)),,$(error Need to have '$(1)' installed.))
|
||||
|
||||
$(call check_tool,git)
|
||||
$(call check_tool,patch)
|
||||
$(call check_tool,python2.6)
|
||||
$(call check_tool,scons)
|
||||
VERBOSE ?= @
|
||||
ECHO := @echo
|
||||
|
||||
#
|
||||
# Print help information by default
|
||||
#
|
||||
help::
|
||||
|
||||
prepare: $(CONTRIB_DIR)
|
||||
prepare:
|
||||
$(VERBOSE)../../tool/ports/prepare_port codezero
|
||||
|
||||
help::
|
||||
$(ECHO)
|
||||
$(ECHO) "Check out upstream source code of the Codezero kernel"
|
||||
$(ECHO)
|
||||
$(ECHO) "The source code will be located at the '$(CONTRIB_DIR)/' directory."
|
||||
$(ECHO) "Prepare the codezero base repository"
|
||||
$(ECHO)
|
||||
$(ECHO) "--- available commands ---"
|
||||
$(ECHO) "prepare - checkout upstream source codes"
|
||||
$(ECHO) "clean - remove upstream source codes"
|
||||
$(ECHO)
|
||||
|
||||
$(CONTRIB_DIR)/.git:
|
||||
$(VERBOSE)git clone $(GIT_URL) $(CONTRIB_DIR)
|
||||
|
||||
$(CONTRIB_DIR): $(CONTRIB_DIR)/.git
|
||||
$(VERBOSE)cd $(CONTRIB_DIR); git reset --hard $(GIT_REV)
|
||||
$(ECHO) "applying patches to '$(CONTRIB_DIR)/'"
|
||||
$(VERBOSE)for i in $(PATCHES); do patch -d $@ -p1 < $$i; done
|
||||
|
||||
.PHONY: $(CONTRIB_DIR)
|
||||
|
||||
clean::
|
||||
$(VERBOSE)rm -rf $(CONTRIB_DIR)
|
||||
|
||||
|
Reference in New Issue
Block a user