1There is a potential race when building libbb, as some header files 2needed by libbb are not generated yet (or are being modified) at the time 3libbb is compiled. 4This patch avoids this scenario by building libbb as the last directory. 5 6Upstream-Status: Submitted 7Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> 8 9Index: busybox-1.24.1/Makefile 10=================================================================== 11diff --git a/Makefile b/Makefile 12index 5cfc763..69f3831 100644 13--- a/Makefile 14+++ b/Makefile 15@@ -738,9 +738,18 @@ $(sort $(busybox-all)): $(busybox-dirs) ; 16 # Error messages still appears in the original language 17 18 PHONY += $(busybox-dirs) 19-$(busybox-dirs): prepare scripts 20+ 21+libbb-dir = $(filter libbb,$(busybox-dirs)) 22+busybox-dirs1 = $(filter-out libbb,$(busybox-dirs)) 23+ 24+$(busybox-dirs1): prepare scripts 25 $(Q)$(MAKE) $(build)=$@ 26 27+ifneq ($(libbb-dir),) 28+$(libbb-dir): | $(busybox-dirs1) 29+ $(Q)$(MAKE) $(build)=$@ 30+endif 31+ 32 # Build the kernel release string 33 # The KERNELRELEASE is stored in a file named .kernelrelease 34 # to be used when executing for example make install or make modules_install 35