diff options
author | Felix Fietkau <nbd@openwrt.org> | 2007-10-21 07:18:10 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2007-10-21 07:18:10 +0000 |
commit | b0a3b73cfe58e06a8b4a13910f5734ac93893340 (patch) | |
tree | f92194542dbb330b1ca98255caa9f3704fa21127 /include | |
parent | 0b79377a32dd8f7ace0c3f135310dc41ec223c51 (diff) | |
download | upstream-b0a3b73cfe58e06a8b4a13910f5734ac93893340.tar.gz upstream-b0a3b73cfe58e06a8b4a13910f5734ac93893340.tar.bz2 upstream-b0a3b73cfe58e06a8b4a13910f5734ac93893340.zip |
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
Diffstat (limited to 'include')
-rw-r--r-- | include/subdir.mk | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/subdir.mk b/include/subdir.mk index 68afcc48a2..d62df7efa7 100644 --- a/include/subdir.mk +++ b/include/subdir.mk @@ -17,6 +17,10 @@ define subtarget 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)) @@ -29,6 +33,8 @@ define subdir # 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))) |