fix kmod packaging for packages where some KCONFIG symbols are set to y
[openwrt-10.03/.git] / tools / Makefile
index ea4ce7081aff8aa99fe34db632876e6bf984e3a0..492c02709909a937becb4f0ee497a6f3b78a5eb4 100644 (file)
@@ -6,9 +6,7 @@
 #
 # Main makefile for the host tools
 #
-
-file:=${lastword ${MAKEFILE_LIST}}
-curdir:=$(patsubst %/Makefile,%,${file})
+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)
@@ -23,13 +21,13 @@ $(STAGING_DIR)/include-host/.done:
        @cp $(1)/include/*.h $$$$(dirname $$@)/
        @touch $$@
 $(curdir)//prepare = $(STAGING_DIR)/include-host/.done
+$(curdir)//compile = $(STAGING_DIR)/include-host/.done
 endef
 $(eval $(call copy_include,$(curdir)))
 
 # prerequisites for the individual targets
-$(curdir)/ := .config
-$(curdir)//compile = $(1)/prepare
+$(curdir)/ := .config prereq
 $(curdir)//install = $(1)/compile
 
-$(eval $(call stampfile,$(curdir),tools))
+$(eval $(call stampfile,$(curdir),tools,install))
 $(eval $(call subdir,$(curdir)))