From c3b483d12abf6ea15ab4271afe7a29b6499fb3ce Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Fri, 16 Mar 2018 10:48:02 +0100 Subject: [PATCH] Prepate_port: create directories when downloading bare files Ref #2718 --- tool/ports/mk/install.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/tool/ports/mk/install.mk b/tool/ports/mk/install.mk index 94c88e482d..00fca6ea3e 100644 --- a/tool/ports/mk/install.mk +++ b/tool/ports/mk/install.mk @@ -201,6 +201,7 @@ _file_name = $(call _prefer,$(NAME($1)),$(notdir $(URL($1)))) %.file: $(VERBOSE)test -n "$(URL($*))" ||\ ($(ECHO) "Error: Undefined URL for $(call _file_name,$*)"; false); + $(VERBOSE)mkdir -p $(dir $(call _file_name,$*)) $(VERBOSE)name=$(call _file_name,$*);\ (test -f $$name || $(MSG_DOWNLOAD)$(URL($*))); \ (test -f $$name || wget --quiet --no-check-certificate $(URL($*)) -O $$name) || \