This is the mail archive of the
insight@sourceware.org
mailing list for the Insight project.
Re: Single-executable patch
> From: Mikhail Teterin <mi+mx@aldan.algebra.com>
> Date: Wed, 17 May 2006 15:02:18 -0400
>
> It seems, all three of the gdb, gdbtui, and insight executables are the same
> except for their (tiny) main() functions.
>
> The attached sample patch allows to install just the gdb and link it to gdbtui
> and insight -- the program will behave differently depending on the name,
> under which it is invoked.
This is against the GNU coding standards. From standards.info:
Please don't make the behavior of a utility depend on the name used to
invoke it. It is useful sometimes to make a link to a utility with a
different name, and that should not change what it does.
Instead, use a run time option or a compilation switch or both to
select among the alternate behaviors.