From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from AUS01-ME3-obe.outbound.protection.outlook.com (mail-me3aus01olkn2160.outbound.protection.outlook.com [40.92.63.160]) by sourceware.org (Postfix) with ESMTPS id EF9F33857C4B for ; Tue, 23 Nov 2021 14:17:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EF9F33857C4B ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FdmBjWuP0aGEgIPi9WqXftP9BxG0f8DorQNjsLpUDLG7JDt/HpI8OEij1Jj55sfc5w5/1DijYTsfPHYcWkP8/guqhN6Ym2pGOC5VvtcmZHj66n2tF8ELTjw6dVkF/mmeLNU98sl1IIareAZrQI6hBUEkAfYsWkHHRFGRzYJNMjy5loZ4e/X4EGlZ0Ht0qoNOppeux/cyt5Y7ihCeSDvv/pyhmO7pw969McnqjVXXrzj9DNZaCW4x/+lkDj/pGLProfkAiFKm0TncAvIANB1Ow7HWoPFT2Ih0xGMpzPppWqqj1Oy06YgURLddG9M6jHRMSdoAN07CxBzpXI+lH0PEdw== 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=0vNs8OoIlUf1MsM78eMUu/i9vUuwehzycnJ/uacWKnI=; b=VUXZK+3ZfYJZN1l+NsrCOrZQR/pXRAR9uTNuYgnbieKAB3/d+rCaK2D0we2bPtFa2QHSwsmHmf48c0weJCB14HFXrDECcPoaWQS5GsekJhuCrA5mKzzCuKk7qYp3J1/23n1mMhJzXmaa7mmtYdGvyF+Yue+Hf2TWxTnMOAcr31Kq/XaxFqQDY6iArkLjAT+d3cJjdO4aaDzICNmwQDb7H2PHPv8LWEoMDOY/jhvJsOsxwrEISpw+4a0lciaV6fRCtbgoaQdkSkXouqdt+WXONUYBuQ/DHGOQnK1CfX4W9Q4M2CvTDnaK94kmyT2BL3dn7yY05V67oiwPjsFdf/gM1A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from MEAP282MB0293.AUSP282.PROD.OUTLOOK.COM (2603:10c6:220:71::10) by ME4P282MB0792.AUSP282.PROD.OUTLOOK.COM (2603:10c6:220:9c::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.21; Tue, 23 Nov 2021 14:16:58 +0000 Received: from MEAP282MB0293.AUSP282.PROD.OUTLOOK.COM ([fe80::b1d5:bf09:16b0:4b2c]) by MEAP282MB0293.AUSP282.PROD.OUTLOOK.COM ([fe80::b1d5:bf09:16b0:4b2c%7]) with mapi id 15.20.4713.026; Tue, 23 Nov 2021 14:16:58 +0000 From: Enze Li To: gdb-patches@sourceware.org, brobecker@adacore.com, simon.marchi@polymtl.ca Subject: [PATCH v2] gdb: AC_INIT should be called with package and version arguments Date: Tue, 23 Nov 2021 22:16:39 +0800 Message-ID: X-Mailer: git-send-email 2.33.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-TMN: [lxlCw6GttU4gvdeMHUqi8npSpuPM5pFd] X-ClientProxiedBy: HK2PR04CA0045.apcprd04.prod.outlook.com (2603:1096:202:14::13) To MEAP282MB0293.AUSP282.PROD.OUTLOOK.COM (2603:10c6:220:71::10) X-Microsoft-Original-Message-ID: <20211123141639.10161-1-lienze2010@hotmail.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (61.48.211.155) by HK2PR04CA0045.apcprd04.prod.outlook.com (2603:1096:202:14::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.21 via Frontend Transport; Tue, 23 Nov 2021 14:16:57 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c5b8d79c-d816-4989-81df-08d9ae8be90c X-MS-TrafficTypeDiagnostic: ME4P282MB0792: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: GnjEFGZP0x8FTSpu3alMivwmleUPjosD4xZ5Ka5ks61g9OH9KABETrZwAR+8WkGocLF0zbI/FvWdTEq46SwiuhpQp+MFAqCirRPm/+RFiNKaklu4ppCkA30Q+IvpOlb3tlcnYoUTTG1r2UzwyivCnafcS4McPY7X7OH1BSyLcog98M+Xe480cYs4jXnDBih4XACG4il9alO7shISo8/310IB7nI4NTOS+LONLjXszTkP4anpH1wFGDHfJh3FM5ATmk/ivm4+Vh28WqCqgHslmjeU0N5qYTyYiRJhUtCH6KPCDsaGtReURZq2TBRdJFAmB/ISc69Ra5OtUb+8Mm9rosFql9hp5EQfzn9n4GJdUnqjXmX/bJGeyDRgodMgTr30LaV5SIecngCwRjqOfRxXPl3OPoY8WBYrlypjI2+7nBQK1p06N5RIlIHmvfOENoem9mGrJ+97NKz9VQH33yi4TK/VHQQpFQ/urqTytmgu/xr8oLKeqgimgAE3RQE0ATBeaDOm4nBsYG6GV5f2PYv6ZtdrtH3owrnZAwwBnqN/zgljRcAjDBBc04eSsmipUnxJo6awaziz6DweEOx3TenRwFPVCL3VGX55tlfso9t0r86LAqq+Yg1447SDSGdLX+Rc X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: IhP5i8kUCOLl/JzhWXvpX/Y4DrXw6JtBprju/iydggD4p0w0vk+zMXRMtsKbXkqxz8Rl0te49AfG85NMndUPWvHkVxAeF82AXkeLOTmAkocU5AjpIeCnIqozgj+V1Dxsmaf8TrVoZ2fsuRL6RK9Kw09UmGTnrlB1bWyVXTMWbxp+4fGU6mcf5YfiE+Hng/ZZdUuc7iLtgG/VDZNCFoSv5iUkzmDQF1V0KrjjMUcsnaEBaf0CRsAPQujfJZ66Qwe0xZWSPAoyQWG9JoT/TMfzPijGzG7fpq2Iq6lJ4F596mEbJ519+YEfju80Fhj45XNzTqxBdOSxEn9DNI2gZTFyaMpN64KEbRSBR+dAO/b4gBeyFbcYoQaWez9K7tC5qxoXK9YUrWZyJ2cTz+JBakYpR9D0pUHCshnLPpxtggy7u8fFgbnclQ/xUBBTLzE8HVsD8bHlRQdgn4vJ6AziJsDF5euZBICCjYJP4Zr4SgnbpKW1UlQvXgo32o30O0OIP1Z7nhUnsX/K/yQ7FWNYEC8mGAuezDU2UCGQdlVagxVusdyzUvhm1QVdJwwESAWYymLcVXm5JDTWMbMA21/EdmN6dsvqFkPi1dl6EDO6H0IA8iAEXao+FZz1cNTzIARMmYeqbSmpWAhZMTiz9YcCNp5Z0x9Afx5yDZykdXRgMf+OBEjMivfl5EskDPSVIhplO+9RVlaM+poNGDe58NLe1aUS5g== X-OriginatorOrg: sct-15-20-3174-20-msonline-outlook-8dac2.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: c5b8d79c-d816-4989-81df-08d9ae8be90c X-MS-Exchange-CrossTenant-AuthSource: MEAP282MB0293.AUSP282.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Nov 2021 14:16:58.5562 (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: ME4P282MB0792 X-Spam-Status: No, score=-10.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, GIT_PATCH_0, KAM_ASCII_DIVIDERS, KAM_SHORT, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Nov 2021 14:17:08 -0000 This patch adds package and version parameters to AC_INIT and regenerates the configure script. When we execute the ". /configure --version", Before the patch: -------------------------------------------------------------------- configure generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. -------------------------------------------------------------------- With the patch: -------------------------------------------------------------------- gdb configure 12.0.50.20211123-git generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. -------------------------------------------------------------------- Tested on x86_64-linux. gdb/ * version.m4: New file. * configure.ac: Include version.m4. (AC_INIT): Update. * configure: Regenerate. --- gdb/configure | 33 ++++++++++++++++++--------------- gdb/configure.ac | 4 +++- gdb/version.m4 | 3 +++ 3 files changed, 24 insertions(+), 16 deletions(-) create mode 100644 gdb/version.m4 diff --git a/gdb/configure b/gdb/configure index fe685f2d3d5..b827af0ca12 100755 --- a/gdb/configure +++ b/gdb/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69. +# Generated by GNU Autoconf 2.69 for gdb 12.0.50.20211123-git. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -575,12 +575,12 @@ MFLAGS= MAKEFLAGS= # Identity of this package. -PACKAGE_NAME= -PACKAGE_TARNAME= -PACKAGE_VERSION= -PACKAGE_STRING= -PACKAGE_BUGREPORT= -PACKAGE_URL= +PACKAGE_NAME='gdb' +PACKAGE_TARNAME='gdb' +PACKAGE_VERSION='12.0.50.20211123-git' +PACKAGE_STRING='gdb 12.0.50.20211123-git' +PACKAGE_BUGREPORT='' +PACKAGE_URL='' ac_unique_file="main.c" # Factoring default headers for most tests. @@ -1000,7 +1000,7 @@ sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE}' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' @@ -1500,7 +1500,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures this package to adapt to many kinds of systems. +\`configure' configures gdb 12.0.50.20211123-git to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1548,7 +1548,7 @@ Fine tuning of the installation directories: --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] + --docdir=DIR documentation root [DATAROOTDIR/doc/gdb] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] @@ -1574,7 +1574,9 @@ _ACEOF fi if test -n "$ac_init_help"; then - + case $ac_init_help in + short | recursive ) echo "Configuration of gdb 12.0.50.20211123-git:";; + esac cat <<\_ACEOF Optional Features: @@ -1784,7 +1786,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -configure +gdb configure 12.0.50.20211123-git generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2640,7 +2642,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by $as_me, which was +It was created by gdb $as_me 12.0.50.20211123-git, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2996,6 +2998,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + ac_config_headers="$ac_config_headers config.h:config.in" @@ -20493,7 +20496,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by $as_me, which was +This file was extended by gdb $as_me 12.0.50.20211123-git, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -20563,7 +20566,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -config.status +gdb config.status 12.0.50.20211123-git configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/gdb/configure.ac b/gdb/configure.ac index 56e8a2d8044..9ed129cabcd 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac @@ -18,7 +18,9 @@ dnl along with this program. If not, see . dnl Process this file with autoconf to produce a configure script. -AC_INIT +m4_include(version.m4) +AC_INIT([gdb], GDB_VERSION) + AC_CONFIG_MACRO_DIRS([../config]) AC_CONFIG_SRCDIR([main.c]) AC_CONFIG_HEADERS(config.h:config.in, [echo > stamp-h]) diff --git a/gdb/version.m4 b/gdb/version.m4 new file mode 100644 index 00000000000..e7a4226dd39 --- /dev/null +++ b/gdb/version.m4 @@ -0,0 +1,3 @@ +m4_define([DAY], m4_esyscmd(date "+%Y%m%d" | tr -d "\n")) +m4_define([GDB_VERSION], m4_esyscmd(cat version.in | sed "s/DATE/DAY/g" | tr -d "\n")) +m4_undefine([DAY]) -- 2.33.1