genode/base-foc/Makefile

91 lines
2.6 KiB
Makefile
Raw Normal View History

2011-12-22 15:19:25 +00:00
#
# \brief Checkout Fiasco.OC and addtional needed tools (sigma0, bootstrap)
# \author Stefan Kalkowski
# \author Sebastian Sumpf
2011-12-22 15:19:25 +00:00
# \date 2011-03-31
#
VERBOSE ?= @
ECHO = @echo
SVN_URI = http://svn.tudos.org/repos/oc/tudos/trunk
GIT_URI = http://github.com/ssumpf/foc.git
GIT_BRANCH = r56
2011-12-22 15:19:25 +00:00
CONTRIB_DIR = contrib
GNU_FIND ?= find
2011-12-22 15:19:25 +00:00
SVN_TARGETS = tools/preprocess \
kernel/fiasco \
l4/conf \
l4/doc \
l4/mk \
l4/tool \
l4/pkg/bootstrap \
l4/pkg/cxx \
l4/pkg/drivers-frst \
l4/pkg/l4sys \
l4/pkg/l4util \
l4/pkg/ldscripts \
l4/pkg/libgcc-pure \
l4/pkg/libgcc \
2011-12-22 15:19:25 +00:00
l4/pkg/libsigma0 \
l4/pkg/sigma0 \
l4/pkg/uclibc-headers \
l4/pkg/uclibc-minimal \
l4/pkg/uclibc \
l4/pkg/libvcpu
#
# Utility to check if a tool is installed
#
check_tool = $(if $(shell which $(1)),,$(error Need to have '$(1)' installed.))
$(call check_tool,git)
2013-01-21 14:50:47 +00:00
$(call check_tool,svn)
$(call check_tool,$(GNU_FIND))
2011-12-22 15:19:25 +00:00
#
# Print help information by default
#
help::
$(CONTRIB_DIR)/.git:
$(VERBOSE)git clone $(GIT_URI) $(CONTRIB_DIR)
prepare: $(CONTRIB_DIR)/.git
$(VERBOSE)cd $(CONTRIB_DIR); git fetch origin
$(VERBOSE)cd $(CONTRIB_DIR); git checkout $(GIT_BRANCH)
$(VERBOSE)cd $(CONTRIB_DIR); git rebase origin/$(GIT_BRANCH)
$(SVN_REV)/%:
$(VERBOSE)svn co -r $(SVN_REV) $(SVN_URI)/$* $@
checkout_base:
ifeq ($(SVN_REV),)
$(error Syntax 'make checkout SVN_REV=<revision>')
2011-12-22 15:19:25 +00:00
endif
$(VERBOSE)svn export -r $(SVN_REV) $(SVN_URI)/l4/COPYING-GPL-2 $(SVN_REV)
$(VERBOSE)svn co -r $(SVN_REV) --depth immediates $(SVN_URI) $(SVN_REV)
$(VERBOSE)svn co -r $(SVN_REV) --depth files $(SVN_URI)/l4 $(SVN_REV)/l4
$(VERBOSE)svn co -r $(SVN_REV) --depth files $(SVN_URI)/l4/pkg $(SVN_REV)/l4/pkg
2011-12-22 15:19:25 +00:00
checkout: checkout_base $(addprefix $(SVN_REV)/,$(SVN_TARGETS))
$(VERBOSE)$(GNU_FIND) $(SVN_REV) -depth -name .svn -type d -exec rm -r {} ";"
2011-12-22 15:19:25 +00:00
help::
$(ECHO)
$(ECHO) "Check out upstream source code of Fiasco.OC"
$(ECHO)
$(ECHO) "The source code will be located at the '$(CONTRIB_DIR)/' directory."
$(ECHO)
$(ECHO) "--- available commands ---"
$(ECHO) "prepare - checkout upstream source codes"
$(ECHO) "checkout SVN_REV=<rev> - checkout out <rev> revision of Fiasco.OC/L4RE from the official repositiry"
$(ECHO) " and store in directory <rev>"
$(ECHO) "clean - remove upstream source codes"
2011-12-22 15:19:25 +00:00
$(ECHO)
clean::
$(VERBOSE)rm -rf $(CONTRIB_DIR)
.NOTPARALLEL: