From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id 4467D3857C6B; Sun, 7 Feb 2021 00:31:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 4467D3857C6B Received: from vapier.lan (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id F198F343681; Sun, 7 Feb 2021 00:31:44 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org, binutils@sourceware.org Subject: [PATCH] config/debuginfod: do not include pkg.m4 directly Date: Sat, 6 Feb 2021 19:31:41 -0500 Message-Id: <20210207003141.14617-1-vapier@gentoo.org> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Feb 2021 00:31:50 -0000 Any code using AC_DEBUGINFOD from this dir is using -I../config when running aclocal, so an explicit include on pkg.m4 is unnecessary: aclocal will find the pkg.m4 in this dir just as easily. This is seen in the only two dirs that use AC_DEBUGINFOD (binutils & gdb) as their aclocal.m4 already has m4_include on config m4 files. The include as written only works if aclocal is run on a dir that is at the same level of config/. Any other depth will fail. ./ |-- config/ |-- binutils/ # works |-- gdb/ # works `-- sim/ # works `-- / # fails It fails even if AC_DEBUGINFOD itself isn't used: sim/bfin/ $ aclocal -I../../config aclocal-1.15: error: ../../config/debuginfod.m4:8: file '../config/pkg.m4' does not exist config/ * debuginfod.m4: Delete m4_include(../config/pkg.m4). binutils/ * aclocal.m4: Regenerate. gdb/ * aclocal.m4: Regenerate. --- binutils/aclocal.m4 | 1 + config/debuginfod.m4 | 2 -- gdb/aclocal.m4 | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/binutils/aclocal.m4 b/binutils/aclocal.m4 index 8eca8cf94c73..e6b490ac4c6c 100644 --- a/binutils/aclocal.m4 +++ b/binutils/aclocal.m4 @@ -1201,6 +1201,7 @@ m4_include([../config/lib-link.m4]) m4_include([../config/lib-prefix.m4]) m4_include([../config/nls.m4]) m4_include([../config/override.m4]) +m4_include([../config/pkg.m4]) m4_include([../config/plugins.m4]) m4_include([../config/po.m4]) m4_include([../config/progtest.m4]) diff --git a/config/debuginfod.m4 b/config/debuginfod.m4 index f9eb0988e354..2c1bfbdb544b 100644 --- a/config/debuginfod.m4 +++ b/config/debuginfod.m4 @@ -5,8 +5,6 @@ dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. -m4_include([../config/pkg.m4]) - AC_DEFUN([AC_DEBUGINFOD], [ # Handle optional debuginfod support diff --git a/gdb/aclocal.m4 b/gdb/aclocal.m4 index 110b416e6156..cbea739c0e51 100644 --- a/gdb/aclocal.m4 +++ b/gdb/aclocal.m4 @@ -199,4 +199,5 @@ AC_DEFUN([_AM_SUBST_NOTMAKE]) # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) +m4_include([../config/pkg.m4]) m4_include([acinclude.m4]) -- 2.30.0