depot: add REBUILD argument to create, build tools

Fixes #2617
This commit is contained in:
Norman Feske
2017-12-14 20:11:59 +01:00
committed by Christian Helmuth
parent 7e3334ca02
commit 2f7217b29f
3 changed files with 15 additions and 4 deletions

View File

@@ -34,7 +34,7 @@ define HELP_MESSAGE
The following arguments tweak the operation of the tool:
FORCE=1 Replace existing archives with freshly created
REBUILD=1 Replace existing archives with freshly created
ones.
VERBOSE= Show individual operations.
@@ -134,7 +134,7 @@ execute_generated_build_mk_file: $(BUILD_MK_FILE)
$(VERBOSE)$(MAKE) $(if $(VERBOSE),--quiet) -f $(BUILD_MK_FILE) \
-C $(DEPOT_DIR) VERBOSE=$(VERBOSE)
ifneq ($(FORCE),)
ifneq ($(REBUILD),)
execute_generated_build_mk_file: wipe_existing_archives
endif

View File

@@ -53,10 +53,12 @@ versioned_archive = $(if $(call archive_has_type,$1,bin),$(call _versioned_src_o
# to be used within a rule body only (when the 'extract' rule has completed)
VERSIONED_ARCHIVES = $(strip $(foreach A,$(MAKECMDGOALS),$(call versioned_archive,$A)))
REBUILD ?= $(FORCE)
build: extract
$(if $(VERSIONED_ARCHIVES),\
$(VERBOSE)$(MAKE) -f $(GENODE_DIR)/tool/depot/build $(VERSIONED_ARCHIVES) \
VERBOSE=$(VERBOSE) FORCE=$(FORCE) \
VERBOSE=$(VERBOSE) REBUILD=$(REBUILD) \
KEEP_BUILD_DIR=$(KEEP_BUILD_DIR))
$(MAKECMDGOALS): build