From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12861 invoked by alias); 4 Dec 2001 20:14:47 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 12835 invoked from network); 4 Dec 2001 20:14:41 -0000 Received: from unknown (HELO smtprt16.wanadoo.fr) (193.252.19.183) by sources.redhat.com with SMTP; 4 Dec 2001 20:14:41 -0000 Received: from mel-rta7.wanadoo.fr (193.252.19.61) by smtprt16.wanadoo.fr; 4 Dec 2001 21:14:24 +0100 Received: from ulmo.localdomain (193.251.50.176) by mel-rta7.wanadoo.fr; 4 Dec 2001 20:38:01 +0100 Received: (from guerby@localhost) by ulmo.localdomain (8.11.6/8.11.6) id fB4JUhV29718; Tue, 4 Dec 2001 20:30:43 +0100 Date: Tue, 04 Dec 2001 12:14:00 -0000 Message-Id: <200112041930.fB4JUhV29718@ulmo.localdomain> X-Authentication-Warning: ulmo.localdomain: guerby set sender to guerby@acm.org using -f From: To: gcc@gcc.gnu.org CC: ebert@bms.de Subject: [Ada] new "-margs" flag to gnatmake Reply-to: guerby@acm.org X-SW-Source: 2001-12/txt/msg00152.txt.bz2 gnatmake currently handle multiple "-cargs", "-bargs" or "-largs" sections, however it is not currently possible to go back to the "normal" section, this is annoying for GNOME-like xxx-config tools. One wants to be able to build an Ada program using packages p1 and p2 in one short invocation: gnatmake main `p1-config` `p2-config` xxx-config providing the needed flags to go after specs and libraries. If one of such xxx-config needs to provide "normal" flags to gnatmake it can't do so since there is no way to tell gnatmake to process "normal" args after it has gone into "-xargs" mode. gcc/ada/make.adb: type Make_Program_Type is (None, Compiler, Binder, Linker); Program_Args : Make_Program_Type := None; ... -- Then check if we are dealing with a -cargs, -bargs or -largs elsif (Argv (1) = Switch_Character or else Argv (1) = '-') and then (Argv (2 .. Argv'Last) = "cargs" or else Argv (2 .. Argv'Last) = "bargs" or else Argv (2 .. Argv'Last) = "largs") then if not File_Name_Seen then Fail ("-cargs, -bargs, -largs ", "must appear after unit or file name"); end if; case Argv (2) is when 'c' => Program_Args := Compiler; when 'b' => Program_Args := Binder; when 'l' => Program_Args := Linker; when others => raise Program_Error; end case; The intended modification is to add a "-margs" going back in Program_Args = None, plus may be a few things I haven't thought about (detection of the target name probably). Are people okay with the idea before I really implement it? I'll submit a documentation patch of course, but since there's no doc file to patch against yet in CVS I have to wait a bit :). PS: the current workaround is something like: gnatmake `p1-config --margs` `p2-config --margs` main `p1-config --cargs --largs` `p2-config --cargs --largs` which is a bit cumbersome and defeats the original intent of simplicity. -- Laurent Guerby