fix compile errors with make 3.80
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Mon, 30 Jul 2007 15:00:27 +0000 (15:00 +0000)
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Mon, 30 Jul 2007 15:00:27 +0000 (15:00 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@8230 3c298f89-4303-0410-b956-a3cf2f4a3e73

include/subdir.mk
toolchain/Makefile
tools/Makefile

index b2bc04b..16e4f4b 100644 (file)
@@ -25,6 +25,11 @@ endef
 
 SUBTARGETS:=clean download prepare compile install update refresh prereq
 
+define subtarget
+  $(call warn_eval,$(1),t,T,$(1)/$(2): $($(1)/) $(foreach bd,$(if $($(1)/builddirs-$(2)),$($(1)/builddirs-$(2)),$($(1)/builddirs)),$(1)/$(bd)/$(2)))
+
+endef
+
 # Parameters: <subdir>
 define subdir
   $(call warn,$(1),d,D $(1))
@@ -38,9 +43,7 @@ define subdir
       $(call warn_eval,$(1)/$(bd),l,T,$(1)/$(bd)-$(target): $(1)/$(bd)/$(target))
        )
   )
-  $(foreach target,$(SUBTARGETS),
-    $(call warn_eval,$(1),t,T,$(1)/$(target): $($(1)/) $(foreach bd,$(if $($(1)/builddirs-$(target)),$($(1)/builddirs-$(target)),$($(1)/builddirs)),$(1)/$(bd)/$(target)) ;)
-  )
+  $(foreach target,$(SUBTARGETS),$(call subtarget,$(1),$(target)))
 endef
 
 # Parameters: <subdir> <name>
index e0af602..e8ee24f 100644 (file)
@@ -7,7 +7,7 @@
 # Main makefile for the toolchain
 #
 file:=${lastword ${MAKEFILE_LIST}}
-curdir:=$(patsubst %/Makefile,%,${file})
+curdir:=toolchain
 
 # subdirectories to descend into
 $(curdir)/builddirs := kernel-headers $(if $(CONFIG_GDB),gdb) $(if $(CONFIG_NATIVE_TOOLCHAIN),,binutils gcc uClibc)
index ea4ce70..2c093c0 100644 (file)
@@ -8,7 +8,7 @@
 #
 
 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)