From patchwork Tue Apr 4 15:07:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Enze Li X-Patchwork-Id: 79194 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp3100087vqo; Tue, 4 Apr 2023 08:07:50 -0700 (PDT) X-Google-Smtp-Source: AKy350aXioAQCMuUYkc6Ges7UGYpzyPvTXfJYhsf/0naLMT3lFDLBGHnnm668Ye8pF+VGibrJbLm X-Received: by 2002:a17:907:215a:b0:935:3028:ff58 with SMTP id rk26-20020a170907215a00b009353028ff58mr2342652ejb.55.1680620869840; Tue, 04 Apr 2023 08:07:49 -0700 (PDT) Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id cf22-20020a170906b2d600b009266f9b9f3esi915362ejb.756.2023.04.04.08.07.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Apr 2023 08:07:49 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b="MnuXWLF/"; arc=fail (signature failed); spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3A2503858296 for ; Tue, 4 Apr 2023 15:07:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3A2503858296 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1680620866; bh=ixXgE9LGBJv8Zn3jj0hKJgLWZeTq7jKjjOxHSAA6HDI=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=MnuXWLF/GR/NH24btuoXuVveVCa5MDFC6CVGB3eBLWvicF2DGKicLJ8zzmf0F1Fwt /CYkM3ICYceSFOaGqrf40F/p7Qg+/+z8S5Ege4iuFOaQHIcCqZrIKRU1qCkoVhQk4N /DCz8ChjAJGP0j3Rg7A+R+/0zV6NwitmAoSN1ol0= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01olkn2084.outbound.protection.outlook.com [40.92.99.84]) by sourceware.org (Postfix) with ESMTPS id 99F543858422; Tue, 4 Apr 2023 15:07:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 99F543858422 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZMtvpr5Ws1rV+ja+VUHMjI3imzcXGL6ufT7dV5ii8bTv1lwKe6P6NWwLO2N2DvSunUqC6xvIDxFFyKokI8MepdMm+4NRgLWe5/A0xyj5MZtXrPTRQi5Tl2hOLe+H8jupZmzfqXzIj3aRSOgoY7VOr1QfJmdnUVmlKtcbFJkATnZ/7wpYnthppPsl5/8llNCjli4nC4CP/REBCcusVt/69WYLJQuAS+iQp/pSRU2JlK4KGFzvttXti7aK9JbZRCG0sLSBvzClKNae+YY6YZluR1UAtHSFcfVkNicsaXrnvo1GYioE+5621txzRbSq8YujSc2Koa6F88tpwbcu8gfH8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ixXgE9LGBJv8Zn3jj0hKJgLWZeTq7jKjjOxHSAA6HDI=; b=J+aFf4zgt70b+W5ygioBnAxi00eDMyRo6P68nZka0i2oPJmOTHh+cxYwjSFx+SeWGoYPEFK1RgyrtZik5S3UW7WSxH8ZTctxkra/vwovGmeYEYPOZshr8fF9/0+VzDo3evpTRwfCD691r2QwbhhfnXla6s3KOoXzKC+ZjrEDBzkj8cZAuHwYzbFxLmFVhj84uks9g3ZaypVBtCOuwKLZLKWuUge7Oc7s3imQgT6UnlvZV+CaoeW5OiSUgO/UXLFn1GQRW4mHATajqiI8ieBHxsmWZbySBM1rwU84pyW9VVyPKMbINL6bcM3F9OKnyRRpCJH/ETyxZ+rIASjWnetbHg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from OS3P286MB2152.JPNP286.PROD.OUTLOOK.COM (2603:1096:604:197::9) by TYCP286MB2259.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:13a::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6254.35; Tue, 4 Apr 2023 15:07:29 +0000 Received: from OS3P286MB2152.JPNP286.PROD.OUTLOOK.COM ([fe80::1594:e1c9:6288:453c]) by OS3P286MB2152.JPNP286.PROD.OUTLOOK.COM ([fe80::1594:e1c9:6288:453c%4]) with mapi id 15.20.6254.035; Tue, 4 Apr 2023 15:07:29 +0000 To: binutils@sourceware.org Cc: gdb-patches@sourceware.org, enze.li@gmx.com Subject: [PATCH] bfd: add version check to makeinfo Date: Tue, 4 Apr 2023 23:07:13 +0800 Message-ID: X-Mailer: git-send-email 2.39.2 X-TMN: [mF5ulCK+lVNJrvsagwgbK7mBz2KaIj63] X-ClientProxiedBy: SG2PR01CA0109.apcprd01.prod.exchangelabs.com (2603:1096:4:40::13) To OS3P286MB2152.JPNP286.PROD.OUTLOOK.COM (2603:1096:604:197::9) X-Microsoft-Original-Message-ID: <20230404150713.9076-1-enze.li@hotmail.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OS3P286MB2152:EE_|TYCP286MB2259:EE_ X-MS-Office365-Filtering-Correlation-Id: 035c20df-07be-4fd7-ab72-08db351e4ead X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bFm9qwWG7odEVq/Pmhf8L0KNcYt/ILchqVfjXYh2U8RmaSYNLjsX1X+wvCPirn3I/HC3TyZdrSOIWM+72uG45tFHd7Jj8QhgcuO63hKXV9c9jj5f7gRbdbESlM71GLBRtMy2cL1AsL0CpPIjIxwsLVd4MEwJbJPKWEcRjfmGjl/qI8G6FfY2jd6e6QEj6ZyP4YL8sqlL+3GLfXr7aTGw9LvuvtvBClnkoto7AxLyDaxCUCrgfEyGSt+FZLY1HH9/lBtOIVWbvSCozpRm5XXvgHQTShMY0hYEJmu2vImp6l8pHQOPRd6Rgg9qGvMJmrNXisU+BGhG7mRfKo8wmtJImLanOhqqN3/Y2kUOE8vmylMff2OCtSab2O8lp8ualqBt7lsChU749eYvdBOe/isJkadv5WDyWBov+prKOwc5tiNXXnvrdzOE3bHgdlFz4T0pXHvmMQcdmMUW6v8F0jz6tbRGlvuq1MxonagYkE9dVW1o7W2Svh6o8MPQUhS242/ZhJ8zC9FfEOVJ0rRBTRIH/qSNOSK3xBv53Ceg6Rbdas4= X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: hVEF2EQ9xTAMwwEB+cZy4fCQUpJt67lQtJSjcTAqAif14QxSbUDEy9vhV/L0lv1CFzaPT01N/6KAE4/mjbgvt9kZasMdY3lk/DdVPEx2bCSDFE8BlzQy5HFWJBuxj8p6cDz2oqEKp3Fk3226wqbqVwHHgYwXygNALo8ndSFE3tiDwYBAmx0/T0WAWciojStUemrv/1nxUHtGhJAvVDzXK4lMpbLVTj0e2tDu7FZklvSsG0HUQ96QqBOCftIDq4zlSBggchgCVZhGKLQ3+b1Juh3FQfR4XFwAI1VX7PC2tVxW7Gqt5XQ+GlaPvtI6+1VkS8eH0RU//UDYgobEPYGLGrTcCp0kRXJftP55pLkRYa3E7zjBnuIJU4dqzjJV2WU+z+znRcJl9Og2FA22FiS4d1B5pwCCRjGDQ/56Pneim/H6Ze5W0pkGBWkiFp8A1rDxG2knZItkYjPQN11gh0jbCvIlRs8rd5EjTKSmtY+b1FzGfkngnqoPzt3T0bXsTpcmIzjHWvI1jcGByl5IPB7YcwvYxn/kWqg2cAhEOW9j8U1SrlqWOlxp1ozReoJ0gFNvgen6fwxPBUV8+4XWoDD10xL4N9befppcJmtpKCvHzmbjqpWtXrXREHpSqqHpjt7Z5+ZiVptaWZpMyzG5fcn5T/pZk9dCpSK3pRnt/RZl+So9rR59fob0y+QmMg6nktILMP2Ps/hAeDiOfcWXgxB1nor+lj+tPNJTyM/A05+razOtstsjixsSrzfr1kU7JWtrJH6I949WrfIe+B8aplN49LSpC5F1lhCvmNSLKkmw8sLXD74YJX/bRUIZW8wW21qNQi7shb46f67fWuZqFl3JhSvPUnawn1+mIg56URqEssIimmPM5eZoWAIylx7tjm3za1q3Jm/Z5qvIIXyF9Gf6TlWp80MxJOyZlHXEkSNr8KZnH7HpTJps9x1fgWkDoXPxbRbqf5s24QpsbP2T3uLOHO2/oNh/7UMoPlhCEQ4t2N7ln9WmKF08S0qNUBw5gAuidgvtP8TT/UZD7OuCo4nB3imcT/si1o50lFRq56fUi+MqISaO4nBYn2nQQ5YlzGayzb2u46vqZ42eea2lxzbQ3L/ALdz3BsL2O7Uq0RZYFlQgG8QX8Zm0P7dWTmKwESfmt4OSUzoRojgSlbJv4WMhCRHTgSG75o9Jj00sFfgezVTk5vh7rt4lDUuwoWWYCp1nFm+AiU/msx9PnWg4K9k5GA== X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-05f45.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 035c20df-07be-4fd7-ab72-08db351e4ead X-MS-Exchange-CrossTenant-AuthSource: OS3P286MB2152.JPNP286.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Apr 2023 15:07:29.2066 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCP286MB2259 X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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-Patchwork-Original-From: Enze Li via Binutils From: Enze Li Reply-To: Enze Li Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762258709444466702?= X-GMAIL-MSGID: =?utf-8?q?1762258709444466702?= In this commit, commit 8bb23cdbb498ff645bb0937bc8c0cb89e9e5ebd8 Date: Tue Feb 7 11:34:56 2023 -0700 Simplify @node use in BFD documentation we use a modern style available from makeinfo 5.0 or later. This patch adds a check for makeinfo that no documentation will be generated if it is below the specified version. The motivation for this work comes from the fact that compiling GDB on the latest version of NetBSD(9.3) produces the following errors because it comes with makeinfo 4.8. This patch workaround this issus. ====== MAKEINFO doc/bfd.info doc/bfd.texi:245: Node `Sections' requires a sectioning command (e.g., @unnumberedsubsec). doc/bfd.texi:248: Node `Symbols' requires a sectioning command (e.g., @unnumberedsubsubsec). doc/bfd.texi:251: Node `Archives' requires a sectioning command (e.g., @unnumberedsubsubsec). doc/bfd.texi:254: Node `Formats' requires a sectioning command (e.g., @unnumberedsubsubsec). doc/bfd.texi:257: Node `Relocations' requires a sectioning command (e.g., @unnumberedsubsubsec). doc/bfd.texi:260: Node `Core Files' requires a sectioning command (e.g., @unnumberedsubsubsec). doc/bfd.texi:263: Node `Targets' requires a sectioning command (e.g., @unnumberedsubsubsec). doc/bfd.texi:266: Node `Architectures' requires a sectioning command (e.g., @unnumberedsubsubsec). ... ====== bfd/ChangeLog: * Makefile.in: Regenerated. * configure: Likewise. * configure.ac: Add check functions, etc. * doc/local.mk: Add the judgment of whether to generate document or not. --- bfd/Makefile.in | 259 ++++++++++++++++++++++++----------------------- bfd/configure | 85 +++++++++++++++- bfd/configure.ac | 24 +++++ bfd/doc/local.mk | 10 ++ 4 files changed, 251 insertions(+), 127 deletions(-) base-commit: 02d44d76584e4d483fe0fc677c12066ec23d67f4 diff --git a/bfd/Makefile.in b/bfd/Makefile.in index 5be3d1b6e9f1..633805214c0f 100644 --- a/bfd/Makefile.in +++ b/bfd/Makefile.in @@ -110,6 +110,10 @@ host_triplet = @host@ target_triplet = @target@ @INSTALL_LIBBFD_FALSE@am__append_1 = -rpath $(rpath_bfdlibdir) @PLUGINS_TRUE@am__append_2 = $(INCDIR)/plugin-api.h +TEXI2DVI = texi2dvi +@BUILD_INFO_TRUE@am__append_3 = $(MKDOC) doc/*.o doc/*.stamp +@BUILD_INFO_TRUE@am__append_4 = doc/bfd.?? doc/bfd.??? texput.log +@BUILD_INFO_TRUE@am__append_5 = $(DOCFILES) doc/bfd.info subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \ @@ -259,7 +263,7 @@ DVIS = doc/bfd.dvi PDFS = doc/bfd.pdf PSS = doc/bfd.ps HTMLS = doc/bfd.html -TEXINFOS = doc/bfd.texi +TEXINFOS = TEXI2PDF = $(TEXI2DVI) --pdf --batch MAKEINFOHTML = $(MAKEINFO) --html AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS) @@ -488,12 +492,12 @@ zlibdir = @zlibdir@ zlibinc = @zlibinc@ AUTOMAKE_OPTIONS = no-dist foreign info-in-builddir no-texinfo.tex ACLOCAL_AMFLAGS = -I . -I .. -I ../config -MOSTLYCLEANFILES = ofiles stamp-ofiles $(MKDOC) doc/*.o doc/*.stamp +MOSTLYCLEANFILES = ofiles stamp-ofiles $(am__append_3) CLEANFILES = bfd.h dep.sed stmp-bfd-h DEP DEPA DEP1 DEP2 stmp-bin2-h \ stmp-lbfd-h stmp-lcoff-h DISTCLEANFILES = $(BUILD_CFILES) $(BUILD_HFILES) libtool-soversion \ - doc/bfd.?? doc/bfd.??? texput.log -MAINTAINERCLEANFILES = $(DOCFILES) doc/bfd.info + $(am__append_4) +MAINTAINERCLEANFILES = $(am__append_5) INCDIR = $(srcdir)/../include CSEARCH = -I. -I$(srcdir) -I$(INCDIR) SUBDIRS = po @@ -1228,66 +1232,66 @@ REGEN_HEADER = \ echo "\#endif"; \ ) -DOCFILES = \ - doc/aoutx.texi \ - doc/archive.texi \ - doc/archures.texi \ - doc/bfdio.texi \ - doc/bfdt.texi \ - doc/bfdver.texi \ - doc/bfdwin.texi \ - doc/cache.texi \ - doc/coffcode.texi \ - doc/corefile.texi \ - doc/elfcode.texi \ - doc/elf.texi \ - doc/format.texi \ - doc/hash.texi \ - doc/libbfd.texi \ - doc/linker.texi \ - doc/mmo.texi \ - doc/opncls.texi \ - doc/reloc.texi \ - doc/section.texi \ - doc/syms.texi \ - doc/targets.texi +@BUILD_INFO_TRUE@DOCFILES = \ +@BUILD_INFO_TRUE@ doc/aoutx.texi \ +@BUILD_INFO_TRUE@ doc/archive.texi \ +@BUILD_INFO_TRUE@ doc/archures.texi \ +@BUILD_INFO_TRUE@ doc/bfdio.texi \ +@BUILD_INFO_TRUE@ doc/bfdt.texi \ +@BUILD_INFO_TRUE@ doc/bfdver.texi \ +@BUILD_INFO_TRUE@ doc/bfdwin.texi \ +@BUILD_INFO_TRUE@ doc/cache.texi \ +@BUILD_INFO_TRUE@ doc/coffcode.texi \ +@BUILD_INFO_TRUE@ doc/corefile.texi \ +@BUILD_INFO_TRUE@ doc/elfcode.texi \ +@BUILD_INFO_TRUE@ doc/elf.texi \ +@BUILD_INFO_TRUE@ doc/format.texi \ +@BUILD_INFO_TRUE@ doc/hash.texi \ +@BUILD_INFO_TRUE@ doc/libbfd.texi \ +@BUILD_INFO_TRUE@ doc/linker.texi \ +@BUILD_INFO_TRUE@ doc/mmo.texi \ +@BUILD_INFO_TRUE@ doc/opncls.texi \ +@BUILD_INFO_TRUE@ doc/reloc.texi \ +@BUILD_INFO_TRUE@ doc/section.texi \ +@BUILD_INFO_TRUE@ doc/syms.texi \ +@BUILD_INFO_TRUE@ doc/targets.texi # SRCDOC, SRCPROT, SRCIPROT only used to sidestep Sun Make bug in interaction # between VPATH and suffix rules. If you use GNU Make, perhaps other Makes, # you don't need these three: -SRCDOC = \ - $(srcdir)/aoutx.h $(srcdir)/archive.c \ - $(srcdir)/archures.c $(srcdir)/bfd.c \ - $(srcdir)/bfdio.c $(srcdir)/bfdwin.c \ - $(srcdir)/cache.c $(srcdir)/coffcode.h \ - $(srcdir)/corefile.c $(srcdir)/elf.c \ - $(srcdir)/elfcode.h $(srcdir)/format.c \ - $(srcdir)/libbfd.c $(srcdir)/opncls.c \ - $(srcdir)/reloc.c $(srcdir)/section.c \ - $(srcdir)/syms.c $(srcdir)/targets.c \ - $(srcdir)/hash.c $(srcdir)/linker.c \ - $(srcdir)/mmo.c - -SRCPROT = $(srcdir)/archive.c $(srcdir)/archures.c \ - $(srcdir)/bfd.c $(srcdir)/coffcode.h $(srcdir)/corefile.c \ - $(srcdir)/format.c $(srcdir)/libbfd.c \ - $(srcdir)/bfdio.c $(srcdir)/bfdwin.c \ - $(srcdir)/opncls.c $(srcdir)/reloc.c \ - $(srcdir)/section.c $(srcdir)/syms.c \ - $(srcdir)/targets.c - -SRCIPROT = $(srcdir)/cache.c $(srcdir)/libbfd.c \ - $(srcdir)/bfdio.c $(srcdir)/bfdwin.c \ - $(srcdir)/reloc.c $(srcdir)/cpu-h8300.c \ - $(srcdir)/archures.c - -TEXIDIR = $(srcdir)/../texinfo/fsf -info_TEXINFOS = doc/bfd.texi -doc_bfd_TEXINFOS = $(DOCFILES) doc/bfdsumm.texi -AM_MAKEINFOFLAGS = --no-split -I "$(srcdir)/doc" -I doc -TEXI2DVI = texi2dvi -I "$(srcdir)/doc" -I doc -MKDOC = doc/chew$(EXEEXT_FOR_BUILD) +@BUILD_INFO_TRUE@SRCDOC = \ +@BUILD_INFO_TRUE@ $(srcdir)/aoutx.h $(srcdir)/archive.c \ +@BUILD_INFO_TRUE@ $(srcdir)/archures.c $(srcdir)/bfd.c \ +@BUILD_INFO_TRUE@ $(srcdir)/bfdio.c $(srcdir)/bfdwin.c \ +@BUILD_INFO_TRUE@ $(srcdir)/cache.c $(srcdir)/coffcode.h \ +@BUILD_INFO_TRUE@ $(srcdir)/corefile.c $(srcdir)/elf.c \ +@BUILD_INFO_TRUE@ $(srcdir)/elfcode.h $(srcdir)/format.c \ +@BUILD_INFO_TRUE@ $(srcdir)/libbfd.c $(srcdir)/opncls.c \ +@BUILD_INFO_TRUE@ $(srcdir)/reloc.c $(srcdir)/section.c \ +@BUILD_INFO_TRUE@ $(srcdir)/syms.c $(srcdir)/targets.c \ +@BUILD_INFO_TRUE@ $(srcdir)/hash.c $(srcdir)/linker.c \ +@BUILD_INFO_TRUE@ $(srcdir)/mmo.c + +@BUILD_INFO_TRUE@SRCPROT = $(srcdir)/archive.c $(srcdir)/archures.c \ +@BUILD_INFO_TRUE@ $(srcdir)/bfd.c $(srcdir)/coffcode.h $(srcdir)/corefile.c \ +@BUILD_INFO_TRUE@ $(srcdir)/format.c $(srcdir)/libbfd.c \ +@BUILD_INFO_TRUE@ $(srcdir)/bfdio.c $(srcdir)/bfdwin.c \ +@BUILD_INFO_TRUE@ $(srcdir)/opncls.c $(srcdir)/reloc.c \ +@BUILD_INFO_TRUE@ $(srcdir)/section.c $(srcdir)/syms.c \ +@BUILD_INFO_TRUE@ $(srcdir)/targets.c + +@BUILD_INFO_TRUE@SRCIPROT = $(srcdir)/cache.c $(srcdir)/libbfd.c \ +@BUILD_INFO_TRUE@ $(srcdir)/bfdio.c $(srcdir)/bfdwin.c \ +@BUILD_INFO_TRUE@ $(srcdir)/reloc.c $(srcdir)/cpu-h8300.c \ +@BUILD_INFO_TRUE@ $(srcdir)/archures.c + +@BUILD_INFO_TRUE@TEXIDIR = $(srcdir)/../texinfo/fsf +@BUILD_INFO_TRUE@info_TEXINFOS = doc/bfd.texi +@BUILD_INFO_TRUE@doc_bfd_TEXINFOS = $(DOCFILES) doc/bfdsumm.texi +@BUILD_INFO_TRUE@AM_MAKEINFOFLAGS = --no-split -I "$(srcdir)/doc" -I doc +@BUILD_INFO_TRUE@TEXI2DVI = texi2dvi -I "$(srcdir)/doc" -I doc +@BUILD_INFO_TRUE@MKDOC = doc/chew$(EXEEXT_FOR_BUILD) # We can't replace these rules with an implicit rule, because # makes without VPATH support couldn't find the .h files in `..'. @@ -1296,18 +1300,18 @@ MKDOC = doc/chew$(EXEEXT_FOR_BUILD) # files, and permit people to rebuild them, without requiring the makeinfo # program. If somebody tries to rebuild info, but none of the .texi files # have changed, then nothing will be rebuilt. -REGEN_TEXI = \ - ( \ - set -e; \ - $(MKDOC) -f $(srcdir)/doc/doc.str < $< > $@.tmp; \ - texi=$@; \ - texi=$${texi%.stamp}.texi; \ - test -e $$texi || test ! -f $(srcdir)/$$texi || $(LN_S) $(srcdir)/$$texi .; \ - $(SHELL) $(srcdir)/../move-if-change $@.tmp $$texi; \ - touch $@; \ - ) - -noinst_TEXINFOS = doc/bfdint.texi +@BUILD_INFO_TRUE@REGEN_TEXI = \ +@BUILD_INFO_TRUE@ ( \ +@BUILD_INFO_TRUE@ set -e; \ +@BUILD_INFO_TRUE@ $(MKDOC) -f $(srcdir)/doc/doc.str < $< > $@.tmp; \ +@BUILD_INFO_TRUE@ texi=$@; \ +@BUILD_INFO_TRUE@ texi=$${texi%.stamp}.texi; \ +@BUILD_INFO_TRUE@ test -e $$texi || test ! -f $(srcdir)/$$texi || $(LN_S) $(srcdir)/$$texi .; \ +@BUILD_INFO_TRUE@ $(SHELL) $(srcdir)/../move-if-change $@.tmp $$texi; \ +@BUILD_INFO_TRUE@ touch $@; \ +@BUILD_INFO_TRUE@ ) + +@BUILD_INFO_TRUE@noinst_TEXINFOS = doc/bfdint.texi all: $(BUILT_SOURCES) config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive @@ -1758,24 +1762,24 @@ doc/$(am__dirstamp): @$(MKDIR_P) doc @: > doc/$(am__dirstamp) -doc/bfd.info: doc/bfd.texi $(doc_bfd_TEXINFOS) - @test -f doc/$(am__dirstamp) || $(MAKE) $(AM_MAKEFLAGS) doc/$(am__dirstamp) - $(AM_V_MAKEINFO)restore=: && backupdir="$(am__leading_dot)am$$$$" && \ - rm -rf $$backupdir && mkdir $$backupdir && \ - if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ - for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \ - if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \ - done; \ - else :; fi && \ - if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I doc -I $(srcdir)/doc \ - -o $@ `test -f 'doc/bfd.texi' || echo '$(srcdir)/'`doc/bfd.texi; \ - then \ - rc=0; \ - else \ - rc=$$?; \ - $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \ - fi; \ - rm -rf $$backupdir; exit $$rc +@BUILD_INFO_TRUE@doc/bfd.info: doc/bfd.texi $(doc_bfd_TEXINFOS) +@BUILD_INFO_TRUE@ @test -f doc/$(am__dirstamp) || $(MAKE) $(AM_MAKEFLAGS) doc/$(am__dirstamp) +@BUILD_INFO_TRUE@ $(AM_V_MAKEINFO)restore=: && backupdir="$(am__leading_dot)am$$$$" && \ +@BUILD_INFO_TRUE@ rm -rf $$backupdir && mkdir $$backupdir && \ +@BUILD_INFO_TRUE@ if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ +@BUILD_INFO_TRUE@ for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \ +@BUILD_INFO_TRUE@ if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \ +@BUILD_INFO_TRUE@ done; \ +@BUILD_INFO_TRUE@ else :; fi && \ +@BUILD_INFO_TRUE@ if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I doc -I $(srcdir)/doc \ +@BUILD_INFO_TRUE@ -o $@ `test -f 'doc/bfd.texi' || echo '$(srcdir)/'`doc/bfd.texi; \ +@BUILD_INFO_TRUE@ then \ +@BUILD_INFO_TRUE@ rc=0; \ +@BUILD_INFO_TRUE@ else \ +@BUILD_INFO_TRUE@ rc=$$?; \ +@BUILD_INFO_TRUE@ $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \ +@BUILD_INFO_TRUE@ fi; \ +@BUILD_INFO_TRUE@ rm -rf $$backupdir; exit $$rc doc/bfd.dvi: doc/bfd.texi $(doc_bfd_TEXINFOS) doc/$(am__dirstamp) $(AM_V_TEXI2DVI)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ @@ -2064,6 +2068,7 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +@BUILD_INFO_FALSE@html-local: clean: clean-recursive clean-am: clean-aminfo clean-bfdlibLTLIBRARIES clean-generic \ @@ -2457,48 +2462,52 @@ coff-tic54x.lo: coff-tic54x.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< $(NO_WERROR) -$(MKDOC): doc/chew.stamp ; @true -doc/chew.stamp: $(srcdir)/doc/chew.c doc/$(am__dirstamp) - $(AM_V_CCLD)$(CC_FOR_BUILD) -o doc/chw$$$$$(EXEEXT_FOR_BUILD) $(CFLAGS_FOR_BUILD) \ - $(LDFLAGS_FOR_BUILD) \ - -I. -I$(srcdir) -Idoc -I$(srcdir)/../include -I$(srcdir)/../intl -I../intl \ - $(srcdir)/doc/chew.c && \ - $(SHELL) $(srcdir)/../move-if-change \ - doc/chw$$$$$(EXEEXT_FOR_BUILD) $(MKDOC) && \ - touch $@ - -.PRECIOUS: doc/%.stamp -doc/%.texi: doc/%.stamp ; @true -doc/%.stamp: $(srcdir)/%.h $(srcdir)/doc/doc.str $(MKDOC) doc/$(am__dirstamp) - $(AM_V_GEN)$(REGEN_TEXI) -doc/%.stamp: $(srcdir)/%.c $(srcdir)/doc/doc.str $(MKDOC) doc/$(am__dirstamp) - $(AM_V_GEN)$(REGEN_TEXI) +@BUILD_INFO_TRUE@$(MKDOC): doc/chew.stamp ; @true +@BUILD_INFO_TRUE@doc/chew.stamp: $(srcdir)/doc/chew.c doc/$(am__dirstamp) +@BUILD_INFO_TRUE@ $(AM_V_CCLD)$(CC_FOR_BUILD) -o doc/chw$$$$$(EXEEXT_FOR_BUILD) $(CFLAGS_FOR_BUILD) \ +@BUILD_INFO_TRUE@ $(LDFLAGS_FOR_BUILD) \ +@BUILD_INFO_TRUE@ -I. -I$(srcdir) -Idoc -I$(srcdir)/../include -I$(srcdir)/../intl -I../intl \ +@BUILD_INFO_TRUE@ $(srcdir)/doc/chew.c && \ +@BUILD_INFO_TRUE@ $(SHELL) $(srcdir)/../move-if-change \ +@BUILD_INFO_TRUE@ doc/chw$$$$$(EXEEXT_FOR_BUILD) $(MKDOC) && \ +@BUILD_INFO_TRUE@ touch $@ + +@BUILD_INFO_TRUE@.PRECIOUS: doc/%.stamp +@BUILD_INFO_TRUE@doc/%.texi: doc/%.stamp ; @true +@BUILD_INFO_TRUE@doc/%.stamp: $(srcdir)/%.h $(srcdir)/doc/doc.str $(MKDOC) doc/$(am__dirstamp) +@BUILD_INFO_TRUE@ $(AM_V_GEN)$(REGEN_TEXI) +@BUILD_INFO_TRUE@doc/%.stamp: $(srcdir)/%.c $(srcdir)/doc/doc.str $(MKDOC) doc/$(am__dirstamp) +@BUILD_INFO_TRUE@ $(AM_V_GEN)$(REGEN_TEXI) # Avoid the %.stamp generating a builddir/bfd.texi that overrides the # srcdir/ as well as regenerating doc/bfd.info for each make run. -doc/bfd.stamp: $(srcdir)/doc/bfd.texi ; $(AM_V_at)touch $@ +@BUILD_INFO_TRUE@doc/bfd.stamp: $(srcdir)/doc/bfd.texi ; $(AM_V_at)touch $@ # We use bfdt.texi, rather than bfd.texi, to avoid conflicting with # bfd.texi on an 8.3 filesystem. -doc/bfdt.stamp: $(srcdir)/bfd.c $(srcdir)/doc/doc.str $(MKDOC) doc/$(am__dirstamp) - $(AM_V_GEN)$(REGEN_TEXI) - -doc/bfdver.texi: $(srcdir)/Makefile.in - $(AM_V_GEN)\ - $(MKDIR_P) $(@D); \ - echo "@set VERSION $(VERSION)" > $@; \ - if test -n "$(PKGVERSION)"; then \ - echo "@set VERSION_PACKAGE $(PKGVERSION)" >> $@; \ - fi; \ - echo "@set UPDATED `date '+%B %Y'`" >> $@; \ - if test -n "$(REPORT_BUGS_TEXI)"; then \ - echo "@set BUGURL $(REPORT_BUGS_TEXI)" >> $@; \ - fi - -html-local: doc/bfd/index.html -doc/bfd/index.html: doc/bfd.texi $(bfd_TEXINFOS) doc/$(am__dirstamp) - $(AM_V_at)$(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) \ - --split=node -o doc/bfd $(srcdir)/doc/bfd.texi +@BUILD_INFO_TRUE@doc/bfdt.stamp: $(srcdir)/bfd.c $(srcdir)/doc/doc.str $(MKDOC) doc/$(am__dirstamp) +@BUILD_INFO_TRUE@ $(AM_V_GEN)$(REGEN_TEXI) + +@BUILD_INFO_TRUE@doc/bfdver.texi: $(srcdir)/Makefile.in +@BUILD_INFO_TRUE@ $(AM_V_GEN)\ +@BUILD_INFO_TRUE@ $(MKDIR_P) $(@D); \ +@BUILD_INFO_TRUE@ echo "@set VERSION $(VERSION)" > $@; \ +@BUILD_INFO_TRUE@ if test -n "$(PKGVERSION)"; then \ +@BUILD_INFO_TRUE@ echo "@set VERSION_PACKAGE $(PKGVERSION)" >> $@; \ +@BUILD_INFO_TRUE@ fi; \ +@BUILD_INFO_TRUE@ echo "@set UPDATED `date '+%B %Y'`" >> $@; \ +@BUILD_INFO_TRUE@ if test -n "$(REPORT_BUGS_TEXI)"; then \ +@BUILD_INFO_TRUE@ echo "@set BUGURL $(REPORT_BUGS_TEXI)" >> $@; \ +@BUILD_INFO_TRUE@ fi + +@BUILD_INFO_TRUE@html-local: doc/bfd/index.html +@BUILD_INFO_TRUE@doc/bfd/index.html: doc/bfd.texi $(bfd_TEXINFOS) doc/$(am__dirstamp) +@BUILD_INFO_TRUE@ $(AM_V_at)$(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) \ +@BUILD_INFO_TRUE@ --split=node -o doc/bfd $(srcdir)/doc/bfd.texi + +# Workaround bug in automake: it can't handle conditionally building info pages +# since GNU projects normally include info pages in the source distributions. +@BUILD_INFO_FALSE@doc/bfd.info: # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/bfd/configure b/bfd/configure index 41d280ef461d..e2377e8b80b7 100755 --- a/bfd/configure +++ b/bfd/configure @@ -651,6 +651,8 @@ wordsize TDEFINES SHARED_LIBADD SHARED_LDFLAGS +BUILD_INFO_FALSE +BUILD_INFO_TRUE LIBM ZSTD_LIBS ZSTD_CFLAGS @@ -11106,7 +11108,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11109 "configure" +#line 11111 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11212,7 +11214,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11215 "configure" +#line 11217 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -13697,6 +13699,81 @@ esac +build_info= +makeinfo_too_old= +for ac_prog in makeinfo +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MAKEINFO+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$MAKEINFO"; then + ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_MAKEINFO="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +MAKEINFO=$ac_cv_prog_MAKEINFO +if test -n "$MAKEINFO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5 +$as_echo "$MAKEINFO" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$MAKEINFO" && break +done +test -n "$MAKEINFO" || MAKEINFO="$MISSING makeinfo" + +case " $build_configdirs " in + *" texinfo "*) MAKEINFO='$$r/$(BUILD_SUBDIR)/texinfo/makeinfo/makeinfo' ;; +esac + + # We require texinfo to be 5.0 or later, otherwise we fall back + # to /bin/true. + if ${MAKEINFO} --version \ + | egrep 'texinfo[^0-9]*([5-9]|[1-9][0-9]\.)' >/dev/null 2>&1; then + build_info=yes + else + build_info= + makeinfo_too_old=t + fi + +if test -n "$makeinfo_too_old"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: +*** Makeinfo is too old. Info documentation for BFD will not be built." >&5 +$as_echo "$as_me: WARNING: +*** Makeinfo is too old. Info documentation for BFD will not be built." >&2;} +fi + + if test "${build_info}" = yes; then + BUILD_INFO_TRUE= + BUILD_INFO_FALSE='#' +else + BUILD_INFO_TRUE='#' + BUILD_INFO_FALSE= +fi + + # When building a shared libbfd, link against the pic version of libiberty # so that apps that use libbfd won't need libiberty just to satisfy any # libbfd references. @@ -15706,6 +15783,10 @@ if test -z "${INSTALL_LIBBFD_TRUE}" && test -z "${INSTALL_LIBBFD_FALSE}"; then Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${BUILD_INFO_TRUE}" && test -z "${BUILD_INFO_FALSE}"; then + as_fn_error $? "conditional \"BUILD_INFO\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 diff --git a/bfd/configure.ac b/bfd/configure.ac index f044616f4d97..f761d0632215 100644 --- a/bfd/configure.ac +++ b/bfd/configure.ac @@ -262,6 +262,30 @@ AC_CACHE_CHECK(linker --as-needed support, bfd_cv_ld_as_needed, LT_LIB_M +build_info= +makeinfo_too_old= +AC_CHECK_PROGS([MAKEINFO], makeinfo, [$MISSING makeinfo]) +case " $build_configdirs " in + *" texinfo "*) MAKEINFO='$$r/$(BUILD_SUBDIR)/texinfo/makeinfo/makeinfo' ;; +esac +changequote(,) + # We require texinfo to be 5.0 or later, otherwise we fall back + # to /bin/true. + if ${MAKEINFO} --version \ + | egrep 'texinfo[^0-9]*([5-9]|[1-9][0-9]\.)' >/dev/null 2>&1; then + build_info=yes + else + build_info= + makeinfo_too_old=t + fi +changequote([,]) +if test -n "$makeinfo_too_old"; then + AC_MSG_WARN([ +*** Makeinfo is too old. Info documentation for BFD will not be built.]) +fi +AC_SUBST(MAKEINFO) +AM_CONDITIONAL(BUILD_INFO, test "${build_info}" = yes) + # When building a shared libbfd, link against the pic version of libiberty # so that apps that use libbfd won't need libiberty just to satisfy any # libbfd references. diff --git a/bfd/doc/local.mk b/bfd/doc/local.mk index d80f70416a3f..fca382851f2d 100644 --- a/bfd/doc/local.mk +++ b/bfd/doc/local.mk @@ -17,6 +17,8 @@ ## . ## +if BUILD_INFO + DOCFILES = \ %D%/aoutx.texi \ %D%/archive.texi \ @@ -151,3 +153,11 @@ html-local: %D%/bfd/index.html --split=node -o %D%/bfd $(srcdir)/%D%/bfd.texi MAINTAINERCLEANFILES += %D%/bfd.info + +else + +# Workaround bug in automake: it can't handle conditionally building info pages +# since GNU projects normally include info pages in the source distributions. +%D%/bfd.info: + +endif