[PATCH] Makerules: fix configure regeneration in subdirs

Andreas Schwab schwab@suse.de
Thu Nov 19 09:08:39 GMT 2026


Use $(..) to reference the toplevel dir.
---
 Makerules | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/Makerules b/Makerules
index 242821f503..c5a1866da1 100644
--- a/Makerules
+++ b/Makerules
@@ -1384,14 +1384,14 @@ endif
 ifneq ($(AUTOCONF),no)
 define autoconf-it
 @-rm -f $@.new
-$(AUTOCONF) $(ACFLAGS) $< > $@.new
-chmod a-w$(patsubst %,$(comma)a+x,$(filter .,$(@D))) $@.new
+$(AUTOCONF) $(patsubst %/,-I%,$(..)) $(ACFLAGS) $< > $@.new
+chmod a-w$(patsubst %,$(comma)a+x,$(filter $(patsubst %/,%,$(..)) .,$(@D))) $@.new
 mv -f $@.new $@
 endef
 
-configure: configure.ac aclocal.m4; $(autoconf-it)
-%/configure: %/configure.ac aclocal.m4; $(autoconf-it)
-%/preconfigure: %/preconfigure.ac aclocal.m4; $(autoconf-it)
+configure: configure.ac $(..)aclocal.m4; $(autoconf-it)
+%/configure: %/configure.ac $(..)aclocal.m4; $(autoconf-it)
+%/preconfigure: %/preconfigure.ac $(..)aclocal.m4; $(autoconf-it)
 
 # Use "touch aclocal.m4" to force execution of this rule.  Set
 # AUTOCONF=autoconf to activate it.
-- 
2.56.1


-- 
Andreas Schwab, SUSE Labs, schwab@suse.de


More information about the Libc-alpha mailing list