Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 1 | There is a potential race when building libbb, as some header files |
| 2 | needed by libbb are not generated yet (or are being modified) at the time |
| 3 | libbb is compiled. |
| 4 | This patch avoids this scenario by building libbb as the last directory. |
| 5 | |
| 6 | Upstream-Status: Submitted |
| 7 | Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> |
| 8 | |
| 9 | Index: busybox-1.24.1/Makefile |
| 10 | =================================================================== |
| 11 | diff --git a/Makefile b/Makefile |
| 12 | index 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 |