1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-05 06:26:15 +02:00

make aliases for package targets if the package directories are in further subdirectories

example: if there is a package/libs/foo/compile, then package/foo/compile will be an alias for it


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@9384 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nbd 2007-10-21 07:18:10 +00:00
parent b900f0c936
commit 6909e3464f

View File

@ -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> # Parameters: <subdir>
define subdir define subdir
$(call warn,$(1),d,D $(1)) $(call warn,$(1),d,D $(1))
@ -29,6 +33,8 @@ define subdir
# legacy targets # legacy targets
$(call warn_eval,$(1)/$(bd),l,T,$(1)/$(bd)-$(target): $(1)/$(bd)/$(target)) $(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)))