From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by sourceware.org (Postfix) with ESMTPS id 162823836F90 for ; Tue, 12 Jul 2022 12:25:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 162823836F90 Received: by mail-ej1-x630.google.com with SMTP id dn9so13981773ejc.7 for ; Tue, 12 Jul 2022 05:25:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=SEHBYw1hup7IeSq9kj1ArtFQFB6Nq8W6/4ZDqdZr7Es=; b=G0P8PjDlpzd5VsZK8/UzgKByxqT7RNnMBzOAjnbZATXOGSDkOMlDDbdcr0rDj7RF0T lTiTmnfzpMdEgMgFtM5DEw3XlKirhU3srDNk2vRYnSFOIqW07h3qKLmovzYgfO5NaIYy HtXdnURpZKQiSRSghPSO/qU6Q7vWYpSXIyhJ0xzP6p6svPF2B/4+jT+hXrwPxLpA9tgu OF8hjo/JFZK8IiQktL/mB3Ihg4NEMG1WiTj/Z7umQxlPC+3ZUzjTI71C8VvbkvfwJJeQ 5aKQPZrvVIKFqE1iTb/yTPDZGrm40gJ6Ze+iFQdED92xgsHx9Y0lr3lp9eRSVU56YO1F Uvig== X-Gm-Message-State: AJIora+0LSfHll0hcQ7Q5aH/I2Zfyjy1XHpUNNn7uYkJhEF2VSeej9Jp Dz5Ah9TFUwuEQ06psB9cTvUQMcpqILUoWA== X-Google-Smtp-Source: AGRyM1tdsTBmpD+JJ5jKpaL0wViTO3YrtyUjPtKnbRTY5LwLV01MXua9VxaF+B5CUE5SBb4tT8so2g== X-Received: by 2002:a17:906:7482:b0:722:ea8f:3a12 with SMTP id e2-20020a170906748200b00722ea8f3a12mr24294278ejl.220.1657628731926; Tue, 12 Jul 2022 05:25:31 -0700 (PDT) Received: from adacore.com ([45.147.211.82]) by smtp.gmail.com with ESMTPSA id f1-20020a1709064dc100b006fe9ec4ba9esm3786615ejw.52.2022.07.12.05.25.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jul 2022 05:25:31 -0700 (PDT) Date: Tue, 12 Jul 2022 12:25:30 +0000 From: Pierre-Marie de Rodat To: gcc-patches@gcc.gnu.org Cc: Vasiliy Fofanov Subject: [Ada] Make it clear that gnatmake passes the ball to gprbuild if -P is set Message-ID: <20220712122530.GA3404897@adacore.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="HlL+5n6rz5pIUxbD" Content-Disposition: inline X-Spam-Status: No, score=-13.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jul 2022 12:25:34 -0000 --HlL+5n6rz5pIUxbD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Also move -P switch description to the top of the switches list. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * makeusg.adb, doc/gnat_ugn/building_executable_programs_with_gnat.rst: Move -P to the top of switches list and make it clear that gnatmake passes the ball to gprbuild if -P is set. * gnat_ugn.texi: Regenerate. --HlL+5n6rz5pIUxbD Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="patch.diff" diff --git a/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst b/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst --- a/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst +++ b/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst @@ -139,6 +139,17 @@ You may specify any of the following switches to ``gnatmake``: all other options. +.. index:: -P (gnatmake) + +:switch:`-P{project}` + Build GNAT project file ``project`` using GPRbuild. When this switch is + present, all other command-line switches are treated as GPRbuild switches + and not ``gnatmake`` switches. + +.. -- Comment: + :ref:`gnatmake_and_Project_Files`. + + .. index:: --GCC=compiler_name (gnatmake) :switch:`--GCC={compiler_name}` @@ -522,15 +533,6 @@ You may specify any of the following switches to ``gnatmake``: :switch:`-p` Same as :switch:`--create-missing-dirs` -.. index:: -P (gnatmake) - -:switch:`-P{project}` - Use project file ``project``. Only one such switch can be used. - -.. -- Comment: - :ref:`gnatmake_and_Project_Files`. - - .. index:: -q (gnatmake) :switch:`-q` diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi --- a/gcc/ada/gnat_ugn.texi +++ b/gcc/ada/gnat_ugn.texi @@ -21,7 +21,7 @@ @copying @quotation -GNAT User's Guide for Native Platforms , Jun 24, 2022 +GNAT User's Guide for Native Platforms , Jul 11, 2022 AdaCore @@ -7120,6 +7120,21 @@ If @code{--version} was not used, display usage, then exit disregarding all other options. @end table +@geindex -P (gnatmake) + + +@table @asis + +@item @code{-P@emph{project}} + +Build GNAT project file @code{project} using GPRbuild. When this switch is +present, all other command-line switches are treated as GPRbuild switches +and not @code{gnatmake} switches. +@end table + +@c -- Comment: +@c :ref:`gnatmake_and_Project_Files`. + @geindex --GCC=compiler_name (gnatmake) @@ -7620,19 +7635,6 @@ This switch cannot be used when invoking @code{gnatmake} with several Same as @code{--create-missing-dirs} @end table -@geindex -P (gnatmake) - - -@table @asis - -@item @code{-P@emph{project}} - -Use project file @code{project}. Only one such switch can be used. -@end table - -@c -- Comment: -@c :ref:`gnatmake_and_Project_Files`. - @geindex -q (gnatmake) diff --git a/gcc/ada/makeusg.adb b/gcc/ada/makeusg.adb --- a/gcc/ada/makeusg.adb +++ b/gcc/ada/makeusg.adb @@ -54,6 +54,13 @@ begin Display_Usage_Version_And_Help; + -- Line for -P + + Write_Str (" -Pproj Build GNAT Project File proj using GPRbuild"); + Write_Eol; + Write_Str (" Treats all other switches as GPRbuild switches"); + Write_Eol; + -- Line for -a Write_Str (" -a Consider all files, even readonly ali files"); @@ -169,11 +176,6 @@ begin Write_Str (" -p Create missing obj, lib and exec dirs"); Write_Eol; - -- Line for -P - - Write_Str (" -Pproj Use GNAT Project File proj"); - Write_Eol; - -- Line for -q Write_Str (" -q Be quiet/terse"); --HlL+5n6rz5pIUxbD--