-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Jan Engelhardt on 7/24/2009 3:25 AM:
> Hi,
> 
> 
> when one has a program that does something like
> 
>   if(strcmp(argv[0], "gunzip") == 0)
>     uncompress();
>   else
>     compress();

GNU Coding Standards frown on this practice:
http://www.gnu.org/software/automake/manual/standards.html#User-Interfaces

Instead, it should be done the way coreutils differentiates 'ls' from
'dir' behavior - the latter merely #defines a single variable to choose a
different set of defaults, then includes the source of the former.  But
the point is that they are two distinct applications, rather than one that
makes decisions based on argv[0].

That said, you are correct that not all programs follow GCS this closely,
so it would indeed be nice if libtool wrapper scripts could accomodate
this.  But better than creating a temporary file every time would be
figuring out ways to change argv[0] from the shell (although not all
shells support this, and those that do don't always do it in the same manner).

- --
Don't work too hard, make some time for fun as well!

Eric Blake             [email protected]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkppoXMACgkQ84KuGfSFAYCqTQCgtyaccnT7h+hZ6cpSJLqzXvTT
dXEAn2DLAphgb1sN0c4UJcLbGEz7+QK3
=boVj
-----END PGP SIGNATURE-----


_______________________________________________
http://lists.gnu.org/mailman/listinfo/libtool

Reply via email to