Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
14 lines (11 sloc) 257 Bytes
MKDIRS := $(sort $(MKDIRS))
define SAFE_MKDIR
CHILD := $(firstword $(filter $(1)/%,$(MKDIRS)))
ifeq ($$(strip $$(CHILD)),)
$(1) :
$(MKDIR) $$@
else
$(1) : | $$(CHILD)
endif
endef
$(foreach dir,$(MKDIRS),$(eval $(call SAFE_MKDIR,$(dir))))