X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=blobdiff_plain;f=tools%2FMakefile;h=2b0143e6b3473a95298087d1b2c8c4981349c40b;hp=49b30be44b01c0e8c5c7d1050ef52b613132ea09;hb=51b0850bd87af2ff4944398ef0e888dcacaab9d6;hpb=5fc2bd5412df35bbc66e5afbbdedc07f4ec1a314 diff --git a/tools/Makefile b/tools/Makefile index 49b30be44b..2b0143e6b3 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -6,8 +6,7 @@ # # Main makefile for the host tools # - -curdir:=$(patsubst %/Makefile,%,$(lastword $(MAKEFILE_LIST))) +curdir:=tools # 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 +15,17 @@ $(curdir)/builddirs := sed sstrip ipkg-utils ext2fs squashfs mtd-utils lzma mkim $(curdir)/squashfs/compile := $(curdir)/lzma/install # preparatory work +define copy_include $(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 -$(curdir)//prepare = $(STAGING_DIR)/include-host/.done $(curdir)//compile = $(1)/prepare $(curdir)//install = $(1)/compile