Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix dependency targets #4356

Merged
merged 1 commit into from
Jan 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions mk/spksrc.cross-meson-env.mk
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,14 @@ ifeq ($(findstring $(ARCH),$(x64_ARCHS)),$(ARCH))
MESON_CFG_FILE = x86_64.cfg
endif

ifeq ($(strip $(MESON_CFG_FILE)),)
$(warning No meson config file defined for $(ARCH))
else
ifeq ($(wildcard $(MESON_CFG_DIR)/$(MESON_CFG_FILE)),)
$(warning meson config file not found: $(MESON_CFG_DIR)/$(MESON_CFG_FILE))
# disable error handling for target dependency-list
ifneq ($(strip $(DEPENDENCY_WALK)),1)
ifeq ($(strip $(MESON_CFG_FILE)),)
$(error No meson config file defined for $(ARCH))
else
ifeq ($(wildcard $(MESON_CFG_DIR)/$(MESON_CFG_FILE)),)
$(error meson config file not found: $(MESON_CFG_DIR)/$(MESON_CFG_FILE))
endif
endif
endif

Expand Down
16 changes: 13 additions & 3 deletions mk/spksrc.dependency-tree.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,24 @@
### the list is sorted and does not include duplicate dependencies.
### sample:
### minio: cross/busybox cross/minio native/go native/go-1.4

###
### NOTES:
### o Packages with conditional dependencies must define such dependencies
### additionally with OPTIONAL_DEPENDS, otherwise not all dependencies are found.
###
### o dependency-tree and dependency-list call make for all dependencies without
### the definition of specific ARCH nor TCVERSION.
### Therefore every Makefile (including mk/*.mk) must not abort nor put
### output with error, warning or info directive when the variable
### DEPENDENCY_WALK is set to 1.
###

.PHONY: dependency-tree
dependency-tree:
@echo `perl -e 'print "\\\t" x $(MAKELEVEL),"\n"'`+ $(NAME) $(PKG_VERS)
@for depend in $(BUILD_DEPENDS) $(DEPENDS) $(OPTIONAL_DEPENDS) ; \
do \
$(MAKE) -s -C ../../$$depend dependency-tree ; \
DEPENDENCY_WALK=1 $(MAKE) -s -C ../../$$depend dependency-tree ; \
done


Expand All @@ -30,5 +40,5 @@ dependency-flat:
@echo "$(CURDIR)" | grep -Po "/\K(spk|cross|native|diyspk)/.*"
@for depend in $(BUILD_DEPENDS) $(DEPENDS) $(OPTIONAL_DEPENDS) ; \
do \
$(MAKE) -s -C ../../$$depend dependency-flat ; \
DEPENDENCY_WALK=1 $(MAKE) -s -C ../../$$depend dependency-flat ; \
done