projects
/
openwrt
/
openwrt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
aef9b31
)
make aliases for package targets if the package directories are in further subdirecto...
author
Felix Fietkau
<nbd@openwrt.org>
Sun, 21 Oct 2007 07:18:10 +0000
(07:18 +0000)
committer
Felix Fietkau
<nbd@openwrt.org>
Sun, 21 Oct 2007 07:18:10 +0000
(07:18 +0000)
SVN-Revision: 9384
include/subdir.mk
patch
|
blob
|
history
diff --git
a/include/subdir.mk
b/include/subdir.mk
index 68afcc48a25444a0226debbc61db6bab4453aec3..d62df7efa77571b64ce7e330bee88501b732a0e5 100644
(file)
--- a/
include/subdir.mk
+++ b/
include/subdir.mk
@@
-17,6
+17,10
@@
define subtarget
endef
endef
+
+lastdir=$(word $(words $(subst /, ,$(1))),$(subst /, ,$(1)))
+diralias=$(if $(findstring $(1),$(call lastdir,$(1))),,$(call lastdir,$(1)))
+
# Parameters: <subdir>
define subdir
$(call warn,$(1),d,D $(1))
# Parameters: <subdir>
define subdir
$(call warn,$(1),d,D $(1))
@@
-29,6
+33,8
@@
define subdir
# legacy targets
$(call warn_eval,$(1)/$(bd),l,T,$(1)/$(bd)-$(target): $(1)/$(bd)/$(target))
# legacy targets
$(call warn_eval,$(1)/$(bd),l,T,$(1)/$(bd)-$(target): $(1)/$(bd)/$(target))
+ # aliases
+ $(if $(call diralias,$(bd)),$(call warn_eval,$(1)/$(bd),l,T,$(1)/$(call diralias,$(bd))/$(target): $(1)/$(bd)/$(target)))
)
)
$(foreach target,$(SUBTARGETS),$(call subtarget,$(1),$(target)))
)
)
$(foreach target,$(SUBTARGETS),$(call subtarget,$(1),$(target)))