projects
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use $(curdir) again
[openwrt.git]
/
tools
/
Makefile
diff --git
a/tools/Makefile
b/tools/Makefile
index 49b30be44b01c0e8c5c7d1050ef52b613132ea09..ea4ce7081aff8aa99fe34db632876e6bf984e3a0 100644
(file)
--- a/
tools/Makefile
+++ b/
tools/Makefile
@@
-7,7
+7,8
@@
# Main makefile for the host tools
#
# Main makefile for the host tools
#
-curdir:=$(patsubst %/Makefile,%,$(lastword $(MAKEFILE_LIST)))
+file:=${lastword ${MAKEFILE_LIST}}
+curdir:=$(patsubst %/Makefile,%,${file})
# subdirectories to descend into
$(curdir)/builddirs := sed sstrip ipkg-utils ext2fs squashfs mtd-utils lzma mkimage firmware-utils patch-cmdline $(if $(CONFIG_CCACHE),ccache)
# subdirectories to descend into
$(curdir)/builddirs := sed sstrip ipkg-utils ext2fs squashfs mtd-utils lzma mkimage firmware-utils patch-cmdline $(if $(CONFIG_CCACHE),ccache)
@@
-16,14
+17,17
@@
$(curdir)/builddirs := sed sstrip ipkg-utils ext2fs squashfs mtd-utils lzma mkim
$(curdir)/squashfs/compile := $(curdir)/lzma/install
# preparatory work
$(curdir)/squashfs/compile := $(curdir)/lzma/install
# preparatory work
+define copy_include
$(STAGING_DIR)/include-host/.done:
$(STAGING_DIR)/include-host/.done:
- @mkdir -p $$(dirname $@)
- @cp $(curdir)/include/*.h $$(dirname $@)/
- @touch $@
+ @mkdir -p $$$$(dirname $$@)
+ @cp $(1)/include/*.h $$$$(dirname $$@)/
+ @touch $$@
+$(curdir)//prepare = $(STAGING_DIR)/include-host/.done
+endef
+$(eval $(call copy_include,$(curdir)))
# prerequisites for the individual targets
$(curdir)/ := .config
# prerequisites for the individual targets
$(curdir)/ := .config
-$(curdir)//prepare = $(STAGING_DIR)/include-host/.done
$(curdir)//compile = $(1)/prepare
$(curdir)//install = $(1)/compile
$(curdir)//compile = $(1)/prepare
$(curdir)//install = $(1)/compile