make/rules-configure.mk: Run autoreconf if configure is not provided.

This commit is contained in:
Arkadiusz Hiler 2025-04-09 22:38:39 +03:00
parent a3bd30ccf0
commit ae2a5cfa6f

View File

@ -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) \