mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #18031 from fjmolinas/pr_pkg_quieter
pkg/pkg.mk: silence info if QUIETER
This commit is contained in:
commit
c239f63cce
@ -4,6 +4,7 @@ FLASH_ADDR ?= 0x0
|
||||
export Q # Used in front of Makefile lines to suppress the printing of the command if user did not opt-in to see them.
|
||||
export QQ # as Q, but be more quiet
|
||||
export QUIET # The parameter to use whether to show verbose makefile commands or not.
|
||||
export QUIETER # The parameter to use to hide most makefile output
|
||||
|
||||
export OS # The operating system of the build host
|
||||
export OS_ARCH # The build host's hardware architecture
|
||||
|
@ -20,11 +20,11 @@ all: $(PKG_SOURCE_DIR)/
|
||||
$(QQ)"$(MAKE)" -C $(PKG_SOURCE_DIR)/src -f $(RIOTBASE)/Makefile.base MODULE=$(PKG_NAME)
|
||||
|
||||
$(PKG_SOURCE_DIR)/: $(PKGDIRBASE)/$(PKG_NAME)-$(PKG_VERSION).$(PKG_EXT)
|
||||
test "$(PKG_SHA512) $(PKG_ZIPFILE)" = "$$(sha512sum "${PKG_ZIPFILE}")"
|
||||
$(QQ)test "$(PKG_SHA512) $(PKG_ZIPFILE)" = "$$(sha512sum "${PKG_ZIPFILE}")"
|
||||
$(Q)$(UNZIP_HERE) -D -d $(PKGDIRBASE) $<
|
||||
|
||||
$(PKG_ZIPFILE):
|
||||
mkdir -p $(PKGDIRBASE)
|
||||
$(QQ)mkdir -p $(PKGDIRBASE)
|
||||
$(Q)$(DOWNLOAD_TO_FILE) $@ $(PKG_URL)/$(PKG_NAME)-$(PKG_VERSION).$(PKG_EXT)
|
||||
|
||||
clean::
|
||||
|
@ -12,10 +12,10 @@ CFLAGS += -Wno-newline-eof
|
||||
EDHOC_C_MODULES := $(filter edhoc-c_%,$(USEMODULE))
|
||||
|
||||
all: $(EDHOC_C_MODULES)
|
||||
"$(MAKE)" -C $(PKG_SOURCE_DIR)/src -f $(RIOTBASE)/Makefile.base MODULE=edhoc-c
|
||||
$(QQ)"$(MAKE)" -C $(PKG_SOURCE_DIR)/src -f $(RIOTBASE)/Makefile.base MODULE=edhoc-c
|
||||
|
||||
edhoc-c_crypto_%:
|
||||
"$(MAKE)" -C $(PKG_SOURCE_DIR)/src/crypto -f $(RIOTBASE)/Makefile.base MODULE=$@ SRC=$*.c
|
||||
$(QQ)"$(MAKE)" -C $(PKG_SOURCE_DIR)/src/crypto -f $(RIOTBASE)/Makefile.base MODULE=$@ SRC=$*.c
|
||||
|
||||
edhoc-c_cbor_%:
|
||||
"$(MAKE)" -C $(PKG_SOURCE_DIR)/src/cbor -f $(RIOTBASE)/Makefile.base MODULE=$@ SRC=$*.c
|
||||
$(QQ)"$(MAKE)" -C $(PKG_SOURCE_DIR)/src/cbor -f $(RIOTBASE)/Makefile.base MODULE=$@ SRC=$*.c
|
||||
|
@ -31,7 +31,7 @@ all: $(filter $(MYNEWT_CORE_MODULES),$(USEMODULE))
|
||||
@true
|
||||
|
||||
mynewt-core_%: rm_riot_provided_headers
|
||||
"$(MAKE)" -C $(PKG_SOURCE_DIR)/$(MYNEWT_CORE_PATH_$*) -f $(RIOTPKG)/$(PKG_NAME)/$@.mk MODULE=$@
|
||||
$(QQ)"$(MAKE)" -C $(PKG_SOURCE_DIR)/$(MYNEWT_CORE_PATH_$*) -f $(RIOTPKG)/$(PKG_NAME)/$@.mk MODULE=$@
|
||||
|
||||
# The following mynewt-core headers are provided by RIOT, remove them from
|
||||
# mynewt-core include paths to avoid header conflicts
|
||||
|
19
pkg/pkg.mk
19
pkg/pkg.mk
@ -111,40 +111,41 @@ gen_dependency_files = $(file >$1,$@: $2)$(foreach f,$2,$(file >>$1,$(f):))
|
||||
# * checkout the wanted base commit
|
||||
# * apply patches if there are any. (If none, it does nothing)
|
||||
$(PKG_PATCHED): $(PKG_PATCHED_PREREQUISITES)
|
||||
$(info [INFO] patch $(PKG_NAME))
|
||||
$(if $(QUIETER),,$(info [INFO] patch $(PKG_NAME)))
|
||||
$(call gen_dependency_files,$@.d,$(PKG_PATCHED_PREREQUISITES))
|
||||
$(Q)$(GIT_IN_PKG) clean $(GIT_QUIET) -xdff '**' -e $(PKG_STATE:$(PKG_SOURCE_DIR)/%='%*')
|
||||
$(Q)$(GIT_IN_PKG) checkout $(GIT_QUIET) -f $(PKG_VERSION)
|
||||
$(Q) if test -n "$(PKG_PATCHES)" ; then \
|
||||
$(GIT_IN_PKG) $(GITFLAGS) am $(GITAMFLAGS) $(PKG_PATCHES) ; \
|
||||
fi
|
||||
@touch $@
|
||||
$(Q)touch $@
|
||||
|
||||
$(PKG_DOWNLOADED): $(MAKEFILE_LIST) | $(PKG_SOURCE_DIR)/.git
|
||||
$(info [INFO] updating $(PKG_NAME) $(PKG_DOWNLOADED))
|
||||
$(if $(QUIETER),,$(info [INFO] updating $(PKG_NAME) $(PKG_DOWNLOADED)))
|
||||
$(Q)if ! $(GIT_IN_PKG) cat-file -e $(PKG_VERSION); then \
|
||||
printf "[INFO] fetching new $(PKG_NAME) version "$(PKG_VERSION)"\n"; \
|
||||
$(if $(QUIETER),,printf "[INFO] fetching new $(PKG_NAME) version "$(PKG_VERSION)"\n";) \
|
||||
$(GIT_IN_PKG) fetch $(GIT_QUIET) "$(PKG_URL)" "$(PKG_VERSION)"; \
|
||||
fi
|
||||
echo $(PKG_VERSION) > $@
|
||||
$(Q)echo $(PKG_VERSION) > $@
|
||||
|
||||
ifeq ($(GIT_CACHE_DIR),$(wildcard $(GIT_CACHE_DIR)))
|
||||
$(PKG_SOURCE_DIR)/.git: | $(PKG_CUSTOM_PREPARED)
|
||||
$(info [INFO] cloning $(PKG_NAME))
|
||||
$(if $(QUIETER),,$(info [INFO] cloning $(PKG_NAME)))
|
||||
$(Q)rm -Rf $(PKG_SOURCE_DIR)
|
||||
$(Q)mkdir -p $(PKG_SOURCE_DIR)
|
||||
$(Q)$(GITCACHE) clone $(PKG_URL) $(PKG_VERSION) $(PKG_SOURCE_DIR)
|
||||
else
|
||||
# redirect stderr so git sees a pipe and not a terminal see https://github.com/git/git/blob/master/progress.c#L138
|
||||
$(PKG_SOURCE_DIR)/.git: | $(PKG_CUSTOM_PREPARED)
|
||||
$(info [INFO] cloning without cache $(PKG_NAME))
|
||||
$(if $(QUIETER),,$(info [INFO] cloning without cache $(PKG_NAME)))
|
||||
$(Q)rm -Rf $(PKG_SOURCE_DIR)
|
||||
$(Q)mkdir -p $(PKG_SOURCE_DIR)
|
||||
$(Q)git init -q $(PKG_SOURCE_DIR)
|
||||
$(Q)git init $(GIT_QUIET) $(PKG_SOURCE_DIR)
|
||||
$(Q)$(GIT_IN_PKG) remote add origin $(PKG_URL)
|
||||
$(Q)$(GIT_IN_PKG) config extensions.partialClone origin
|
||||
$(Q)$(GIT_IN_PKG) config advice.detachedHead false
|
||||
$(Q)$(GIT_IN_PKG) fetch $(GIT_QUIET) --depth=1 -t --filter=blob:none origin $(PKG_VERSION)
|
||||
$(Q)$(GIT_IN_PKG) checkout $(GIT_QUIET) $(PKG_VERSION)
|
||||
$(Q)$(GIT_IN_PKG) checkout $(GIT_QUIET) $(PKG_VERSION) 2>&1 | cat
|
||||
endif
|
||||
|
||||
ifeq ($(PKG_SOURCE_DIR),$(PKG_BUILD_DIR))
|
||||
|
Loading…
Reference in New Issue
Block a user