mirror of
https://github.com/openwrt/openwrt.git
synced 2026-10-12 06:57:57 +04:00
build: find the alias of a build directory with notdir
subdir calls diralias twice for every target of every build directory, and diralias splits the path into words twice to find its last component. This takes a quarter of the parse time of the main Makefile. Use notdir, which returns the same last component. The rules do not change. Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
1 parent
407e833140
commit
bc96efb443
1 file changed
+1
-2
+1
-2
@@ -26,8 +26,7 @@ define ERROR
|
||||
($(call MESSAGE, $(2)); $(if $(BUILD_LOG), echo "$(2)" >> $(BUILD_LOG_DIR)/$(1)/error.txt;) $(if $(3),, exit 1;))
|
||||
endef
|
||||
|
||||
lastdir=$(word $(words $(subst /, ,$(1))),$(subst /, ,$(1)))
|
||||
diralias=$(if $(findstring $(1),$(call lastdir,$(1))),,$(call lastdir,$(1)))
|
||||
diralias=$(if $(findstring /,$(1)),$(notdir $(1)))
|
||||
|
||||
subdir_make_opts = \
|
||||
$(if $(SUBDIR_MAKE_DEBUG),-d) -r -C $(1) \
|
||||
|
||||
Reference in new issue
Block a user