genode/tool/ports/prepare_port
Martin Stein b039608e95 prepare_port: prepare multiple ports at once
The tool/prepare_port tool is now able to handle a list of ports that
shall be prepared. Additionally, one may state the number of ports that
shall be prepared in parallel at a max by using the -j parameter. If -j
is not set by the user, the tool acts as with -j1. The previous
implementation of the tool that prepares only a single port was moved to
tool/ports/mk/prepare_single_port.mk and acts as back end to the new
prepare_port tool. The interface of the new prepare_port tool is
backwards compatible. When called for one port only, the behavior is the
same as when calling tool/ports/mk/prepare_single_port.mk directly.

Removes "usage" rule from prepare_single_port.mk. Removes shebang line
from prepare_single_port.mk.

Ref #1872
2016-03-07 12:34:43 +01:00

34 lines
668 B
Makefile
Executable File

#!/usr/bin/make -f
#
# \brief Tool for preparing and updating ports
# \author Martin Stein
# \date 2016-02-03
#
ifndef VERBOSE
MAKEFLAGS += --no-print-directory
endif
export GENODE_DIR := $(realpath $(dir $(MAKEFILE_LIST))/../..)
usage:
@echo
@echo "Tool for preparing and updating ports"
@echo
@echo "usage:"
@echo
@echo " $(notdir $(MAKEFILE_LIST)) [-j<n>] <ports>"
@echo
@echo " -j<n> prepare <n> ports in parallel at a max, default is 1"
@echo
@echo " <ports> whitespace-separated list of ports"
@echo
TARGETS = $(sort $(MAKECMDGOALS))
.PHONY: $(TARGETS)
$(TARGETS):
@$(MAKE) -f $(GENODE_DIR)/tool/ports/mk/prepare_single_port.mk $@