* [Ada] new "-margs" flag to gnatmake
@ 2001-12-04 12:14 guerby
2001-12-04 13:40 ` Florian Weimer
0 siblings, 1 reply; 4+ messages in thread
From: guerby @ 2001-12-04 12:14 UTC (permalink / raw)
To: gcc; +Cc: ebert
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 <guerby@acm.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Ada] new "-margs" flag to gnatmake
@ 2001-12-04 14:09 dewar
0 siblings, 0 replies; 4+ messages in thread
From: dewar @ 2001-12-04 14:09 UTC (permalink / raw)
To: fw, guerby; +Cc: ebert, gcc
I agree that -margs is a reasonable idea
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2001-12-04 22:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-04 12:14 [Ada] new "-margs" flag to gnatmake guerby
2001-12-04 13:40 ` Florian Weimer
2001-12-04 14:05 ` guerby
2001-12-04 14:09 dewar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).