diff --git a/make/rules-configure.mk b/make/rules-configure.mk index a89875f4..906cbef4 100644 --- a/make/rules-configure.mk +++ b/make/rules-configure.mk @@ -8,7 +8,15 @@ define create-rules-configure $(call create-rules-common,$(1),$(2),$(3),$(4)) ifneq ($(findstring $(3)-$(4),$(ARCHS)),) -$$(OBJ)/.$(1)-$(3)-configure: +ifeq ($(wildcard $($(2)_ORIGIN)/configure),) +$(2)_CONFIGURE_DEPS = $$($(2)_SRC)/configure + +$$($(2)_SRC)/configure: $$($(2)_ORIGIN)/configure.ac | $$(OBJ)/.$(1)-post-source + @echo ":: autoreconfing $(1)..." >&2 + cd "$$($(2)_SRC)" && autoreconf -fiv +endif + +$$(OBJ)/.$(1)-$(3)-configure: $$($(2)_CONFIGURE_DEPS) @echo ":: configuring $(1)-$(3)..." >&2 cd "$$($(2)_$(3)_OBJ)" && env $$($(2)_$(3)_ENV) \