Hi,

attached is a patch that changes the makefile of busybox to work with current 
gnu make versions.

Background: gnu make has changed behavious in 3.82 resulting in the rule a b: c
to be invalid.
Changing it to
a: c
b: c
with same content works.

Best regards,
 Clemens


 Clemens Helfmeier
Index: package/busybox/patches/990-Makefile-gmake-3.81.patch
===================================================================
--- package/busybox/patches/990-Makefile-gmake-3.81.patch	(revision 0)
+++ package/busybox/patches/990-Makefile-gmake-3.81.patch	(revision 0)
@@ -0,0 +1,31 @@
+GNU make has changed behaviour for multi target rules.
+Fix this by making the multi target rules to single target rules.
+
+--- busybox-1.4.2.orig/Makefile	2012-02-05 14:33:36.000000000 +0100
++++ busybox-1.4.2/Makefile	2012-02-05 14:34:00.000000000 +0100
+@@ -397,7 +397,12 @@ ifeq ($(config-targets),1)
+ -include $(srctree)/arch/$(ARCH)/Makefile
+ export KBUILD_DEFCONFIG
+ 
+-config %config: scripts_basic outputmakefile FORCE
++config: scripts_basic outputmakefile FORCE
++	$(Q)mkdir -p include
++	$(Q)$(MAKE) $(build)=scripts/kconfig $@
++	$(Q)$(MAKE) -C $(srctree) KBUILD_SRC= .kernelrelease
++
++%config: scripts_basic outputmakefile FORCE
+ 	$(Q)mkdir -p include
+ 	$(Q)$(MAKE) $(build)=scripts/kconfig $@
+ 	$(Q)$(MAKE) -C $(srctree) KBUILD_SRC= .kernelrelease
+@@ -1228,7 +1233,10 @@ endif
+ 	$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
+ 
+ # Modules
+-/ %/: prepare scripts FORCE
++/: prepare scripts FORCE
++	$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
++	$(build)=$(build-dir)
++%/: prepare scripts FORCE
+ 	$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
+ 	$(build)=$(build-dir)
+ %.ko: prepare scripts FORCE
_______________________________________________
freewrt-developers mailing list
[email protected]
https://www.freewrt.org/lists/listinfo/freewrt-developers

Reply via email to