diff --git a/Makefile b/Makefile index a12564ff96..dc4dbc64e1 100644 --- a/Makefile +++ b/Makefile @@ -1260,4 +1260,7 @@ include docs/manual/manual.mk .PHONY: $(noconfig_targets) +# .WAIT was introduced in make 4.4. For older make, define it as phony. +.PHONY: .WAIT + endif #umask / $(CURDIR) / $(O) diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk index d55edb1b74..6e944dd6b7 100644 --- a/package/pkg-generic.mk +++ b/package/pkg-generic.mk @@ -1063,17 +1063,17 @@ endif rm -f $$($(2)_TARGET_INSTALL_IMAGES) rm -f $$($(2)_TARGET_INSTALL_HOST) -$(1)-reinstall: $(1)-clean-for-reinstall $(1) +$(1)-reinstall: $(1)-clean-for-reinstall .WAIT $(1) $(1)-clean-for-rebuild: $(1)-clean-for-reinstall rm -f $$($(2)_TARGET_BUILD) -$(1)-rebuild: $(1)-clean-for-rebuild $(1) +$(1)-rebuild: $(1)-clean-for-rebuild .WAIT $(1) $(1)-clean-for-reconfigure: $(1)-clean-for-rebuild rm -f $$($(2)_TARGET_CONFIGURE) -$(1)-reconfigure: $(1)-clean-for-reconfigure $(1) +$(1)-reconfigure: $(1)-clean-for-reconfigure .WAIT $(1) # define the PKG variable for all targets, containing the # uppercase package variable prefix